Skip to content

Commit 549ed02

Browse files
Combine OATS cases
Combine the OATS tests into a single file to speed up the execution time by avoiding spinning containers up and down so much.
1 parent e3f4e49 commit 549ed02

File tree

10 files changed

+73
-139
lines changed

10 files changed

+73
-139
lines changed

docker/docker-compose-aspnetcore/attributes/oats-template.yml

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

docker/docker-compose-aspnetcore/attributes/oats.default-resource-attributes.yaml

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

docker/docker-compose-aspnetcore/http/oats-template.yaml

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

docker/docker-compose-aspnetcore/http/oats.http-get.yaml

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

docker/docker-compose-aspnetcore/http/oats.http-geterror.yaml

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

docker/docker-compose-aspnetcore/oats.mssql-query.yaml

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

docker/docker-compose-aspnetcore/oats.mssql-sproc.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
include:
2+
- ./oats-template.yml
3+
input:
4+
- path: /api/HttpClient/Get
5+
- path: /api/HttpClient/GetError
6+
- path: /api/MsSql/ServerInfo
7+
- path: /api/MsSql/Tables
8+
- path: /api/Redis/LeftPush
9+
expected:
10+
logs:
11+
- logql: '{service_name="aspnetcore"} |~ `Application started.`'
12+
contains:
13+
- 'Application started'
14+
metrics:
15+
- promql: http_client_request_duration_seconds_count{}
16+
value: '>= 0'
17+
- promql: http_client_request_duration_seconds_count{http_request_method="GET", http_response_status_code="200"}
18+
value: '>= 0'
19+
traces:
20+
- traceql: '{ resource.process.pid > 0 }'
21+
spans:
22+
- name: 'GET'
23+
- traceql: '{ span.http.route =~ "api/HttpClient/Get" }'
24+
spans:
25+
- name: 'GET api/HttpClient/Get'
26+
attributes:
27+
http.request.method: GET
28+
- name: 'GET api/HttpClient/Get'
29+
attributes:
30+
service.name: aspnetcore
31+
service.version: 1.0.0.0
32+
telemetry.distro.name: grafana-opentelemetry-dotnet
33+
telemetry.distro.version: regex:.+
34+
deployment.environment: production
35+
process.runtime.description: regex:.NET.+
36+
process.runtime.name: .NET
37+
process.runtime.version: regex:.+
38+
host.name: regex:.+
39+
telemetry.sdk.name: opentelemetry
40+
telemetry.sdk.language: dotnet
41+
telemetry.sdk.version: regex:.+
42+
- traceql: '{ span.http.route =~ "api/HttpClient/GetError" }'
43+
spans:
44+
- name: 'GET api/HttpClient/GetError'
45+
attributes:
46+
http.request.method: GET
47+
- name: 'GET'
48+
attributes:
49+
error.type: '500'
50+
http.request.method: GET
51+
http.response.status_code: '500'
52+
- traceql: '{ span.http.route =~ "api/MsSql/ServerInfo"}'
53+
spans:
54+
- name: 'master'
55+
attributes:
56+
db.system: mssql
57+
db.name: master
58+
db.statement: sp_server_info
59+
otel.library.name: OpenTelemetry.Instrumentation.SqlClient
60+
- traceql: '{ span.http.route =~ "api/MsSql/Tables"}'
61+
spans:
62+
- name: 'master'
63+
attributes:
64+
db.system: mssql
65+
db.name: master
66+
otel.library.name: OpenTelemetry.Instrumentation.SqlClient
67+
- traceql: '{ span.http.route =~ "api/Redis/LeftPush" }'
68+
spans:
69+
- name: 'LPUSH'
70+
attributes:
71+
db.statement: LPUSH
72+
db.system: redis
73+
net.peer.name: redis

docker/docker-compose-aspnetcore/redis/oats-template.yaml

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

docker/docker-compose-aspnetcore/redis/oats.redis-lpush.yaml

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

0 commit comments

Comments
 (0)