Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
version: v2025.11.10
sha256: 6231d2fb730d60fcf2806019d19ab09f0a4051b3b486bae91f77b0c68583b5c7
- name: Run acceptance tests
run: ./scripts/run-acceptance-tests.sh ${{ github.event.pull_request.head.sha }}
run: mise run acceptance-tests ${{ github.event.pull_request.head.sha }}
12 changes: 12 additions & 0 deletions .mise/tasks/acceptance-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
#MISE description="Run OATs acceptance tests against LGTM builds"
#USAGE arg "<version>" help="The version tag for docker" default=""

set -euo pipefail

version=${usage_version:-$(date +%Y%m%d%H%M%S)}

echo "using version $version"

mise run build-lgtm "$version"
oats -timeout 5m -lgtm-version "$version" examples/
1 change: 1 addition & 0 deletions scripts/super-linter.sh → .mise/tasks/super-linter.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
#MISE description="Run Super-Linter on the repository"

set -euo pipefail

Expand Down
11 changes: 5 additions & 6 deletions examples/dotnet/oats.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# OATS is an acceptance testing framework for OpenTelemetry
# https://github.com/grafana/oats/tree/main/yaml
oats-schema-version: 2
docker-compose:
files:
- ./docker-compose.oats.yml
Expand All @@ -8,15 +9,13 @@ input:
expected:
traces:
- traceql: '{ span.http.route = "/rolldice/{player?}" }'
spans:
- name: "GET /rolldice/{player?}" # should be "GET /rolldice"
attributes:
otel.library.name: Microsoft.AspNetCore
equals: "GET /rolldice/{player?}" # should be "GET /rolldice"
attributes:
otel.library.name: Microsoft.AspNetCore
# https://opentelemetry.io/docs/specs/semconv/dotnet/dotnet-http-metrics/#metric-httpclientactive_requests
metrics:
- promql: 'http_server_active_requests{http_request_method="GET"}'
value: ">= 0"
logs:
- logql: '{service_name="rolldice"} |~ `Anonymous player is rolling the dice.*`'
contains:
- "Anonymous player is rolling the dice"
regexp: "Anonymous player is rolling the dice"
3 changes: 2 additions & 1 deletion examples/ebpf-profiler/oats.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# OATS is an acceptance testing framework for OpenTelemetry
# https://github.com/grafana/oats/tree/main/yaml
oats-schema-version: 2
docker-compose:
files:
- ./docker-compose.oats.yml
Expand All @@ -10,7 +11,7 @@ expected:
# go
- query: 'process_cpu:cpu:nanoseconds:cpu:nanoseconds{process_executable_name=~"rolldice"}'
flamebearers:
contains: "main.rolldice"
equals: "main.rolldice"
# python and java are flaky
# - query: 'process_cpu:cpu:nanoseconds:cpu:nanoseconds{process_executable_name=~"python.*"}'
# flamebearers:
Expand Down
8 changes: 4 additions & 4 deletions examples/go/oats.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
# OATS is an acceptance testing framework for OpenTelemetry
# https://github.com/grafana/oats/tree/main/yaml
oats-schema-version: 2
docker-compose:
files:
- ./docker-compose.oats.yml
Expand All @@ -9,10 +10,9 @@ input:
expected:
traces:
- traceql: '{ span.http.route = "/rolldice" }'
spans:
- name: "/" # should be "GET /rolldice"
attributes:
otel.library.name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
equals: "/" # should be "GET /rolldice"
attributes:
otel.library.name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
metrics:
- promql: "go_goroutine_count{}"
value: "> 0"
11 changes: 5 additions & 6 deletions examples/nodejs/oats.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# OATS is an acceptance testing framework for OpenTelemetry
# https://github.com/grafana/oats/tree/main/yaml
oats-schema-version: 2
docker-compose:
files:
- ./docker-compose.oats.yml
Expand All @@ -8,14 +9,12 @@ input:
expected:
traces:
- traceql: '{ span.http.route = "/rolldice" }'
spans:
- name: 'GET /rolldice'
attributes:
otel.library.name: '@opentelemetry/instrumentation-http'
equals: 'GET /rolldice'
attributes:
otel.library.name: '@opentelemetry/instrumentation-http'
metrics:
- promql: 'dice_lib_rolls_counter_total{service_name="dice-server"}'
value: '>= 0'
logs:
- logql: '{service_name="dice-server"} |~ `Received request to roll dice`'
contains:
- 'Received request to roll dice'
equals: 'Received request to roll dice'
11 changes: 5 additions & 6 deletions examples/python/oats.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# OATS is an acceptance testing framework for OpenTelemetry
# https://github.com/grafana/oats/tree/main/yaml
oats-schema-version: 2
docker-compose:
files:
- ./docker-compose.oats.yml
Expand All @@ -14,14 +15,12 @@ expected:
- "The OpenTelemetry collector and the Grafana LGTM stack are up and running. (created /tmp/ready)"
traces:
- traceql: '{ span.http.route = "/rolldice" }'
spans:
- name: "GET /rolldice"
attributes:
otel.library.name: opentelemetry.instrumentation.flask
equals: "GET /rolldice"
attributes:
otel.library.name: opentelemetry.instrumentation.flask
metrics:
- promql: 'http_server_active_requests{http_method="GET"}'
value: ">= 0"
logs:
- logql: '{service_name="rolldice"} |~ `Anonymous player is rolling the dice.*`'
contains:
- "Anonymous player is rolling the dice"
regexp: "Anonymous player is rolling the dice"
25 changes: 19 additions & 6 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# pin all versions to avoid GitHub rate litit
# pin all versions to avoid GitHub rate limit
[tools]
go = "1.25.4"
"go:github.com/grafana/oats" = "0.4.1"
"go:github.com/grafana/oats" = "0.6.0"
java = "temurin-25.0.1+8.0.LTS"
lychee = "0.20.1"
markdownlint-cli2 = "0.19.1"
Expand All @@ -23,10 +23,6 @@ depends = ["lint", "lint-links"]
description = "All lints not covered by super linter"
depends = ["lint-links"]

[tasks.test]
description = "Run integration tests"
run = './scripts/run-acceptance-tests.sh {{arg(name="tag", default="latest")}}'

[tasks.lgtm]
run = './run-lgtm.sh {{arg(name="tag", default="latest")}}'

Expand All @@ -35,8 +31,25 @@ description = "Run locally built LGTM image"
run = './run-lgtm.sh latest true'

[tasks.example]
alias = "example-java"
run = "./run-example.sh"

[tasks.example-nodejs]
dir = "examples/nodejs"
run = "./run.sh"

[tasks.example-python]
dir = "examples/python"
run = "./run.sh"

[tasks.example-go]
dir = "examples/go"
run = "./run.sh"

[tasks.example-dotnet]
dir = "examples/dotnet"
run = "./run.sh"

[tasks.generate-traffic]
run = "./generate-traffic.sh"

Expand Down
15 changes: 0 additions & 15 deletions scripts/lint.sh

This file was deleted.

10 changes: 0 additions & 10 deletions scripts/run-acceptance-tests.sh

This file was deleted.