Repository navigation
feat(observability): configure opt-in OpenTelemetry export #271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nerdalert
merged 9 commits into
praxis-proxy:main
from
nerdalert:feat/issue-260-opentelemetry
Oct 6, 2026
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e1b50dd
feat(observability): configure gateway OpenTelemetry tracing
nerdalert 832d027
fix(observability): align telemetry config and validation
nerdalert be7fd7b
test(helm): verify telemetry URL rejection across Helm versions
nerdalert 7ec1631
docs(otel): align trace claims and telemetry schema
nerdalert 2e51473
fix(gateway): lock OpenTelemetry dependencies
nerdalert 29326b7
fix(otel): enforce telemetry bounds and endpoint security
nerdalert eedb73c
style(gateway): satisfy pinned rustfmt
nerdalert 27a3f11
fix(gateway): guard credentialed OTLP transport
nerdalert 5e7981d
test(helm): use HTTPS in credentialed telemetry fixture
nerdalert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,156 @@ | ||
| suite: gateway telemetry | ||
| templates: | ||
| - templates/gateway-config.yaml | ||
| - templates/deployment.yaml | ||
| tests: | ||
| - it: emits telemetry and W3C propagation from explicit settings | ||
| template: templates/gateway-config.yaml | ||
| set: | ||
| image.flavor: grid-gateway | ||
| gatewayConfig.render: true | ||
| gatewayConfig.localSite: edge | ||
| gatewayConfig.model: test-model | ||
| gatewayConfig.auth.mode: none | ||
| gatewayConfig.backends: | ||
| site-a: | ||
| endpoint: 203.0.113.20:8080 | ||
| transport: | ||
| mode: plaintext | ||
| gatewayConfig.telemetry.enabled: true | ||
| gatewayConfig.telemetry.otlpEndpoint: https://otel-collector.observability:4317 | ||
| gatewayConfig.telemetry.samplingRate: 0.25 | ||
| gatewayConfig.telemetry.serviceName: grid-edge | ||
| gatewayConfig.telemetry.batchIntervalSecs: 3 | ||
| gatewayConfig.telemetry.batchSize: 32 | ||
| env: | ||
| - name: OTEL_EXPORTER_OTLP_HEADERS | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: collector-credentials | ||
| key: headers | ||
| asserts: | ||
| - matchRegex: | ||
| path: data["praxis.yaml"] | ||
| pattern: "(?s)telemetry:\\n\\s+otlp_endpoint: \\\"https://otel-collector\\.observability:4317\\\".*sampling_rate: 0.25.*service_name: \\\"grid-edge\\\".*batch_interval_secs: 3.*batch_size: 32" | ||
| - matchRegex: | ||
| path: data["praxis.yaml"] | ||
| pattern: "(?s)filters:\\n\\s+- filter: trace_context" | ||
| - equal: | ||
| path: spec.template.spec.containers[?(@.name == "praxis")].env[?(@.name == "OTEL_EXPORTER_OTLP_HEADERS")].valueFrom.secretKeyRef.name | ||
| value: collector-credentials | ||
| template: templates/deployment.yaml | ||
| - equal: | ||
| path: spec.template.spec.containers[?(@.name == "praxis")].env[?(@.name == "OTEL_EXPORTER_OTLP_HEADERS")].valueFrom.secretKeyRef.key | ||
| value: headers | ||
| template: templates/deployment.yaml | ||
| - exists: | ||
| path: spec.template.metadata.annotations["checksum/telemetry"] | ||
| template: templates/deployment.yaml | ||
|
|
||
| - it: accepts the lower sampling boundary | ||
| template: templates/gateway-config.yaml | ||
| set: | ||
| image.flavor: grid-gateway | ||
| gatewayConfig.render: true | ||
| gatewayConfig.localSite: edge | ||
| gatewayConfig.model: test-model | ||
| gatewayConfig.auth.mode: none | ||
| gatewayConfig.backends: | ||
| site-a: | ||
| endpoint: 203.0.113.20:8080 | ||
| transport: | ||
| mode: plaintext | ||
| gatewayConfig.telemetry.enabled: true | ||
| gatewayConfig.telemetry.samplingRate: 0.0 | ||
| asserts: | ||
| - matchRegex: | ||
| path: data["praxis.yaml"] | ||
| pattern: "sampling_rate: 0" | ||
|
|
||
| - it: accepts the upper sampling boundary | ||
| template: templates/gateway-config.yaml | ||
| set: | ||
| image.flavor: grid-gateway | ||
| gatewayConfig.render: true | ||
| gatewayConfig.localSite: edge | ||
| gatewayConfig.model: test-model | ||
| gatewayConfig.auth.mode: none | ||
| gatewayConfig.backends: | ||
| site-a: | ||
| endpoint: 203.0.113.20:8080 | ||
| transport: | ||
| mode: plaintext | ||
| gatewayConfig.telemetry.enabled: true | ||
| gatewayConfig.telemetry.samplingRate: 1.0 | ||
| asserts: | ||
| - matchRegex: | ||
| path: data["praxis.yaml"] | ||
| pattern: "sampling_rate: 1" | ||
|
|
||
| - it: renders an empty telemetry mapping for environment-only settings | ||
| template: templates/gateway-config.yaml | ||
| set: | ||
| image.flavor: grid-gateway | ||
| gatewayConfig.render: true | ||
| gatewayConfig.localSite: edge | ||
| gatewayConfig.model: test-model | ||
| gatewayConfig.auth.mode: none | ||
| gatewayConfig.backends: | ||
| site-a: | ||
| endpoint: 203.0.113.20:8080 | ||
| transport: | ||
| mode: plaintext | ||
| gatewayConfig.telemetry.enabled: true | ||
| asserts: | ||
| - matchRegex: | ||
| path: data["praxis.yaml"] | ||
| pattern: "(?s)telemetry:\\n\\s+\\{\\}" | ||
|
|
||
| - it: treats an empty endpoint as environment fallback | ||
| template: templates/gateway-config.yaml | ||
| set: | ||
| image.flavor: grid-gateway | ||
| gatewayConfig.render: true | ||
| gatewayConfig.localSite: edge | ||
| gatewayConfig.model: test-model | ||
| gatewayConfig.auth.mode: none | ||
| gatewayConfig.backends: | ||
| site-a: | ||
| endpoint: 203.0.113.20:8080 | ||
| transport: | ||
| mode: plaintext | ||
| gatewayConfig.telemetry.enabled: true | ||
| gatewayConfig.telemetry.otlpEndpoint: "" | ||
| asserts: | ||
| - matchRegex: | ||
| path: data["praxis.yaml"] | ||
| pattern: "(?s)telemetry:\\n\\s+\\{\\}" | ||
| - notMatchRegex: | ||
| path: data["praxis.yaml"] | ||
| pattern: "otlp_endpoint:" | ||
|
|
||
| - it: requires a Grid gateway image when telemetry is enabled | ||
| template: templates/deployment.yaml | ||
| set: | ||
| gatewayConfig.render: true | ||
| gatewayConfig.localSite: edge | ||
| gatewayConfig.model: test-model | ||
| gatewayConfig.auth.mode: none | ||
| gatewayConfig.backends: | ||
| site-a: | ||
| endpoint: 203.0.113.20:8080 | ||
| transport: | ||
| mode: plaintext | ||
| gatewayConfig.telemetry.enabled: true | ||
| asserts: | ||
| - failedTemplate: | ||
| errorPattern: "gatewayConfig.telemetry.enabled needs image.flavor grid-gateway" | ||
|
|
||
| - it: requires generated Praxis config before enabling telemetry | ||
| template: templates/deployment.yaml | ||
| set: | ||
| image.flavor: grid-gateway | ||
| gatewayConfig.telemetry.enabled: true | ||
| asserts: | ||
| - failedTemplate: | ||
| errorPattern: "gatewayConfig.telemetry.enabled needs gatewayConfig.render true" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.