Skip to content
Open
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
5 changes: 1 addition & 4 deletions .mise/tasks/oats-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,4 @@ set -euo pipefail
:opentelemetry-examples-logging-k8s-stdout-otlp-json:assemble \
:opentelemetry-examples-spring-declarative-configuration:bootJar

oats -timeout 5m doc-snippets/extensions-minimal/oats/
oats -timeout 5m javaagent-declarative-configuration/oats/
oats -timeout 5m logging-k8s-stdout-otlp-json/
oats -timeout 5m spring-declarative-configuration/oats/
oats --no-cache --timeout=10m .
22 changes: 22 additions & 0 deletions doc-snippets/extensions-minimal/oats/oats-case.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: extensions minimal traces custom processor attribute
fixture:
compose:
template: lgtm
file: ./docker-compose.yml
interval: 5s
seed:
type: app
input:
- path: /hello
expected:
traces:
- traceql: '{ span.http.route = "/hello" }'
match_spans:
- name: GET /hello
attributes:
- key: http.request.method
value: GET
- key: http.route
value: /hello
- key: custom.processor
value: active
21 changes: 0 additions & 21 deletions doc-snippets/extensions-minimal/oats/oats.yaml

This file was deleted.

25 changes: 25 additions & 0 deletions javaagent-declarative-configuration/oats/oats-case.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: javaagent declarative config excludes actuator health traces
fixture:
compose:
template: lgtm
file: ./docker-compose.yml
seed:
type: app
input:
- path: /api/example
- path: /actuator/health
- path: /api/remote
expected:
traces:
- traceql: '{ span.http.route = "/api/example" }'
match_spans:
- name: GET /api/example
attributes:
- key: http.request.method
value: GET
- key: http.route
value: /api/example
- traceql: '{ span.http.route = "/actuator/health" }'
absent: true
- traceql: '{ span.peer.service = "example-backend" }'
count: '>= 1'
31 changes: 0 additions & 31 deletions javaagent-declarative-configuration/oats/oats.yaml

This file was deleted.

5 changes: 5 additions & 0 deletions logging-k8s-stdout-otlp-json/k8s/lgtm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ spec:
protocol: TCP
port: 3200
targetPort: 3200
- name: pyroscope # needed for automated tests
protocol: TCP
port: 4040
targetPort: 4040
---
apiVersion: apps/v1
kind: Deployment
Expand All @@ -55,6 +59,7 @@ spec:
- containerPort: 9090 # needed for automated tests
- containerPort: 3100 # needed for automated tests
- containerPort: 3200 # needed for automated tests
- containerPort: 4040 # needed for automated tests
readinessProbe:
exec:
command:
Expand Down
20 changes: 20 additions & 0 deletions logging-k8s-stdout-otlp-json/oats-case.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: logging k8s stdout otlp json emits structured logs
fixture:
k3d:
k8s_dir: k8s
app_service: dice
app_docker_file: Dockerfile
app_docker_tag: dice:1.1-SNAPSHOT
app_port: 8080
input:
- path: /rolldice
expected:
logs:
- logql: '{service_name="dice"} |~ `.*Anonymous player is rolling the dice:.*`'
regex: 'Anonymous player is rolling the dice: [0-9]+'
count: '>= 1'
- logql: '{service_name="dice"} |~ `.*simulating an error.*`'
contains:
- 'Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: java.lang.RuntimeException: simulating an error] with root cause'
- 'java.lang.RuntimeException: simulating an error'
count: '>= 1'
53 changes: 0 additions & 53 deletions logging-k8s-stdout-otlp-json/oats.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion mise.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[tools]
"aqua:grafana/oats" = "0.7.0"
"aqua:grafana/gcx" = "v0.5.0"
"aqua:grafana/oats" = "0.8.0"
k3d = "5.8.3"
kubectl = "1.36.2"

Expand Down
8 changes: 8 additions & 0 deletions oats-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
meta:
version: 3

cases:
- doc-snippets/extensions-minimal/oats/oats-case.yaml
- javaagent-declarative-configuration/oats/oats-case.yaml
- spring-declarative-configuration/oats/oats-case.yaml
- logging-k8s-stdout-otlp-json/oats-case.yaml
22 changes: 22 additions & 0 deletions spring-declarative-configuration/oats/oats-case.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: spring declarative config excludes actuator health traces
fixture:
compose:
template: lgtm
file: ./docker-compose.yml
seed:
type: app
input:
- path: /api/example
- path: /actuator/health
expected:
traces:
- traceql: '{ span.http.route = "/api/example" }'
match_spans:
- name: GET /api/example
attributes:
- key: http.request.method
value: GET
- key: http.route
value: /api/example
- traceql: '{ span.http.route = "/actuator/health" }'
absent: true
24 changes: 0 additions & 24 deletions spring-declarative-configuration/oats/oats.yaml

This file was deleted.

Loading