Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .mise/tasks/oats-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ pushd javaagent-declarative-configuration
../gradlew clean bootJar
popd

./gradlew :doc-snippets:extensions-testapp:jar :doc-snippets:extensions-minimal:shadowJar

oats -timeout 5m logging-k8s-stdout-otlp-json/
oats -timeout 5m javaagent-declarative-configuration/oats/
oats -timeout 5m doc-snippets/extensions-minimal/oats/
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that got lost before

17 changes: 7 additions & 10 deletions doc-snippets/extensions-minimal/oats/oats.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# OATS is an acceptance testing framework for OpenTelemetry - https://github.com/grafana/oats
oats-schema-version: 2

docker-compose:
files:
- ./docker-compose.yml
app-service: app
app-docker-tag: extensions-minimal:latest
app-docker-port: 8080

input:
- path: /hello
Expand All @@ -14,10 +12,9 @@ input:
expected:
traces:
- traceql: '{ span.http.route = "/hello" }'
spans:
- name: "GET /hello"
attributes:
http.request.method: "GET"
http.route: "/hello"
# This custom attribute is added by MySpanProcessor
custom.processor: "active"
equals: "GET /hello"
attributes:
http.request.method: "GET"
http.route: "/hello"
# This custom attribute is added by MySpanProcessor
custom.processor: "active"
15 changes: 8 additions & 7 deletions javaagent-declarative-configuration/oats/oats.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# OATS is an acceptance testing framework for OpenTelemetry - https://github.com/grafana/oats
oats-schema-version: 2

docker-compose:
files:
Expand All @@ -11,16 +12,16 @@ input:
# This endpoint should be traced normally
- path: /api/example
# This endpoint should NOT be traced (excluded by declarative config)
# We send the request but don't assert spans for it - the absence of spans
# for /actuator/health demonstrates the sampling rule is working
- path: /actuator/health

expected:
traces:
# Verify that /api/example creates a trace with SERVER span
- traceql: '{ span.http.route = "/api/example" }'
spans:
- name: "GET /api/example"
attributes:
http.request.method: "GET"
http.route: "/api/example"
equals: "GET /api/example"
attributes:
http.request.method: "GET"
http.route: "/api/example"
- traceql: '{ span.http.route = "/actuator/health" }'
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finally testing that the span filter is actually working

count:
max: 0
1 change: 1 addition & 0 deletions logging-k8s-stdout-otlp-json/oats.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# OATS is an acceptance testing framework for OpenTelemetry - https://github.com/grafana/oats
oats-schema-version: 2

kubernetes:
dir: k8s
Expand Down
2 changes: 1 addition & 1 deletion mise.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tools]
lychee = "0.21.0"
k3d = "5.8.2"
"go:github.com/grafana/oats" = "0.4.1"
"go:github.com/grafana/oats" = "0.6.0"
kubectl = "1.34.2"
markdownlint-cli2 = "0.19.1"

Expand Down
Loading