Skip to content

Commit 87fda82

Browse files
Update OTEL config to include all fields with env variables
- Added service-name, endpoint, exporter-protocol, and headers fields - All fields use @env() syntax to reference OTEL environment variables - Updated both example dab-config.json and README documentation Co-authored-by: tommasodotNET <12819039+tommasodotNET@users.noreply.github.com>
1 parent 6cd13b7 commit 87fda82

File tree

2 files changed

+10
-2
lines changed
  • examples/data-api-builder/CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder.AppHost
  • src/CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder

2 files changed

+10
-2
lines changed

examples/data-api-builder/CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder.AppHost/dab-config.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@
3030
},
3131
"telemetry": {
3232
"open-telemetry": {
33-
"enabled": true
33+
"enabled": true,
34+
"service-name": "@env('OTEL_SERVICE_NAME')",
35+
"endpoint": "@env('OTEL_EXPORTER_OTLP_ENDPOINT')",
36+
"exporter-protocol": "grpc",
37+
"headers": "@env('OTEL_EXPORTER_OTLP_HEADERS')"
3438
}
3539
}
3640
},

src/CommunityToolkit.Aspire.Hosting.Azure.DataApiBuilder/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ To enable OTEL telemetry in Data API builder, add the following configuration to
124124
"runtime": {
125125
"telemetry": {
126126
"open-telemetry": {
127-
"enabled": true
127+
"enabled": true,
128+
"service-name": "@env('OTEL_SERVICE_NAME')",
129+
"endpoint": "@env('OTEL_EXPORTER_OTLP_ENDPOINT')",
130+
"exporter-protocol": "grpc",
131+
"headers": "@env('OTEL_EXPORTER_OTLP_HEADERS')"
128132
}
129133
}
130134
}

0 commit comments

Comments
 (0)