Skip to content

Commit 5157282

Browse files
committed
Replace pilot OATS files in place
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
1 parent 165cbde commit 5157282

11 files changed

Lines changed: 58 additions & 156 deletions

File tree

examples/ebpf-profiler/oats-v2.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.

examples/ebpf-profiler/oats.yaml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,11 @@
1-
# OATS is an acceptance testing framework for OpenTelemetry
2-
# https://github.com/grafana/oats/tree/main/yaml
3-
oats-schema-version: 2
4-
docker-compose:
5-
files:
6-
- ./docker-compose.oats.yml
1+
oats: 2
2+
name: ebpf profiler captures rolldice profile symbols
3+
seed:
4+
type: app
75
input:
86
- path: /rolldice
97
expected:
108
profiles:
11-
# go
129
- query: 'process_cpu:cpu:nanoseconds:cpu:nanoseconds{"process.executable.name"=~"rolldice"}'
13-
flamebearers:
14-
equals: "main.rolldice"
15-
# python and java are flaky
16-
# - query: 'process_cpu:cpu:nanoseconds:cpu:nanoseconds{process_executable_name=~"python.*"}'
17-
# flamebearers:
18-
# # not very useful, because the python function names are not in the flamegraph
19-
# contains: "python"
20-
# - query: 'process_cpu:cpu:nanoseconds:cpu:nanoseconds{process_executable_name="java"}'
21-
# flamebearers:
22-
# contains: "void org.springframework.boot.SpringApplication.refreshContext(org.springframework.context.ConfigurableApplicationContext)"
10+
match:
11+
- name: main.rolldice

examples/nodejs/oats-v2.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

examples/nodejs/oats.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
# OATS is an acceptance testing framework for OpenTelemetry
2-
# https://github.com/grafana/oats/tree/main/yaml
3-
oats-schema-version: 2
4-
docker-compose:
5-
files:
6-
- ./docker-compose.oats.yml
1+
oats: 2
2+
name: nodejs rolldice emits traces metrics and logs
3+
seed:
4+
type: app
75
input:
86
- path: /rolldice?rolls=5
97
expected:
108
traces:
119
- traceql: '{ span.http.route = "/rolldice" }'
12-
equals: "GET /rolldice"
13-
attributes:
14-
otel.library.name: "@opentelemetry/instrumentation-http"
10+
match:
11+
- name: GET /rolldice
12+
attributes:
13+
otel.library.name: '@opentelemetry/instrumentation-http'
1514
metrics:
16-
- promql: 'dice_lib_rolls_counter_total{service_name="dice-server"}'
17-
value: ">= 0"
15+
- promql: dice_lib_rolls_counter_total{service_name="dice-server"}
16+
value: '>= 0'
1817
logs:
1918
- logql: '{service_name="dice-server"} |~ `Received request to roll dice`'
20-
equals: "Received request to roll dice"
19+
match:
20+
- name: Received request to roll dice

examples/obi/oats-v2.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.

examples/obi/oats.yaml

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,24 @@
1-
---
2-
# OATS is an acceptance testing framework for OpenTelemetry
3-
# https://github.com/grafana/oats/tree/main/yaml
4-
oats-schema-version: 2
5-
docker-compose:
6-
files:
7-
- ./docker-compose.oats.yml
8-
# No input: section — OATS only supports a single application port, but this
9-
# test exercises 5 services on different ports. The generate-traffic sidecar
10-
# sends requests to all services instead.
1+
oats: 2
2+
name: obi sidecar traffic yields spans and metrics across services
3+
seed:
4+
type: app
115
expected:
126
traces:
13-
# Java (port 8080) - reuses ../java source, no OTel agent
147
- traceql: '{ span.url.path = "/rolldice" && span.server.port = 8080 }'
15-
equals: "GET /rolldice"
16-
# Go (port 8081) - minimal source, no OTel SDK
8+
match:
9+
- name: GET /rolldice
1710
- traceql: '{ span.url.path = "/rolldice" && span.server.port = 8081 }'
18-
equals: "GET /rolldice"
19-
# Python (port 8082) - reuses ../python source, no opentelemetry-distro
11+
match:
12+
- name: GET /rolldice
2013
- traceql: '{ span.url.path = "/rolldice" && span.server.port = 8082 }'
21-
equals: "GET /rolldice"
22-
# .NET (port 8083) - minimal source, no OTel NuGet packages
14+
match:
15+
- name: GET /rolldice
2316
- traceql: '{ span.url.path = "/rolldice" && span.server.port = 8083 }'
24-
equals: "GET /rolldice"
25-
# Node.js (port 8084) - minimal source, no @opentelemetry/* packages
17+
match:
18+
- name: GET /rolldice
2619
- traceql: '{ span.url.path = "/rolldice" && span.server.port = 8084 }'
27-
equals: "GET /rolldice"
20+
match:
21+
- name: GET /rolldice
2822
metrics:
29-
- promql: 'http_server_request_duration_seconds_count{http_route="/rolldice"}'
30-
value: "> 0"
23+
- promql: http_server_request_duration_seconds_count{http_route="/rolldice"}
24+
value: '> 0'

examples/python/oats-v2.yaml

Lines changed: 0 additions & 23 deletions
This file was deleted.

examples/python/oats.yaml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
1-
# OATS is an acceptance testing framework for OpenTelemetry
2-
# https://github.com/grafana/oats/tree/main/yaml
3-
oats-schema-version: 2
4-
docker-compose:
5-
files:
6-
- ./docker-compose.oats.yml
1+
oats: 2
2+
name: python rolldice emits traces metrics logs and lgtm readiness
3+
seed:
4+
type: app
75
input:
86
- path: /rolldice
97
expected:
10-
# this is checking that the health check is working
11-
# this is usually not needed - because we check the functionality of the app
12-
# but some cases are missing, e.g. that grafana is up and running
13-
# We also check that this exact log line is present in the logs, which some users rely on
14-
compose-logs:
15-
- "The OpenTelemetry collector and the Grafana LGTM stack are up and running. (created /tmp/ready)"
8+
custom-checks:
9+
- script: ./scripts/check-lgtm-ready.sh
1610
traces:
1711
- traceql: '{ span.http.route = "/rolldice" }'
18-
equals: "GET /rolldice"
19-
attributes:
20-
otel.library.name: opentelemetry.instrumentation.flask
12+
match:
13+
- name: GET /rolldice
14+
attributes:
15+
otel.library.name: opentelemetry.instrumentation.flask
2116
metrics:
22-
- promql: 'http_server_active_requests{http_method="GET"}'
23-
value: ">= 0"
17+
- promql: http_server_active_requests{http_method="GET"}
18+
value: '>= 0'
2419
logs:
2520
- logql: '{service_name="rolldice"} |~ `Anonymous player is rolling the dice.*`'
26-
regexp: "Anonymous player is rolling the dice"
21+
match:
22+
- match_type: regexp
23+
name: Anonymous player is rolling the dice
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33
cd "$(dirname "$0")/.."
4-
docker compose -f ../../ci/oats-v2/docker-compose.lgtm.yml -f docker-compose.oats.yml logs lgtm \
4+
docker compose -f ../../ci/oats/docker-compose.lgtm.yml -f docker-compose.oats.yml logs lgtm \
55
| grep -F "The OpenTelemetry collector and the Grafana LGTM stack are up and running. (created /tmp/ready)"

0 commit comments

Comments
 (0)