Skip to content

Commit

Permalink
Add tests for beyla metrics and traces:
Browse files Browse the repository at this point in the history
Signed-off-by: Pete Wall <pete.wall@grafana.com>
  • Loading branch information
petewall committed Nov 13, 2024
1 parent 6306c66 commit 36b8dcd
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ datasources:
type: prometheus
url: http://prometheus-server.prometheus.svc:9090
isDefault: true
- name: Tempo
type: tempo
url: http://tempo.tempo.svc:3100
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ prerequisites:
chart: prometheus
namespace: prometheus
valuesFile: charts/k8s-monitoring/tests/integration/auto-instrumentation/configs/prometheus.yaml
- type: helm
name: loki
repo: https://grafana.github.io/helm-charts
chart: loki
namespace: loki
valuesFile: .configs/loki.yaml
- type: helm
name: tempo
repo: https://grafana.github.io/helm-charts
chart: tempo
namespace: tempo

- type: helm
name: grafana
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@
tests:
- env:
PROMETHEUS_URL: http://prometheus-server.prometheus.svc:9090/api/v1/query
TEMPO_URL: http://tempo.tempo.svc:3100/api/search
queries:
# Self reporting metrics
- query: grafana_kubernetes_monitoring_build_info{cluster="auto-instrumentation-integration-test"}
type: promql
- query: grafana_kubernetes_monitoring_feature_info{cluster="auto-instrumentation-integration-test", feature="autoInstrumentation"}
type: promql

# Beyla metrics
- query: beyla_build_info{cluster="auto-instrumentation-integration-test"}
type: promql
- query: beyla_internal_build_info{cluster="auto-instrumentation-integration-test"}
type: promql

# Traces from Beyla
- query: "{.k8s.cluster.name=\"auto-instrumentation-integration-test\" && resource.otel.library.name=\"github.com/grafana/beyla\"}"
type: traceql
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,40 @@ destinations:
- name: localPrometheus
type: prometheus
url: http://prometheus-server.prometheus.svc:9090/api/v1/write
- name: localLoki
type: loki
url: http://loki.loki.svc:3100/loki/api/v1/push
tenantId: "1"
auth:
type: basic
username: loki
password: lokipassword
- name: localTempo
type: otlp
url: tempo.tempo.svc:4317
tls:
insecure: true
insecureSkipVerify: true

autoInstrumentation:
enabled: true

applicationObservability:
enabled: true
receivers:
grpc:
enabled: true

selfReporting: {scrapeInterval: 1m} # Force self-report to be generated within test time

alloy-metrics:
enabled: true

alloy-receiver:
enabled: true
alloy:
extraPorts:
- name: otlp-grpc
port: 4317
targetPort: 4317
protocol: TCP

0 comments on commit 36b8dcd

Please sign in to comment.