Repository navigation
fix: propagate agent name/version to otel service.name - #285
Merged
Merged
Conversation
edenreich
reviewed
Jul 15, 2026
Co-authored-by: Eden Reich <[email protected]>
inference-gateway-releaser Bot
added a commit
that referenced
this pull request
Jul 15, 2026
## [0.48.4](v0.48.3...v0.48.4) (2026-07-15) ### 🐛 Bug Fixes * propagate agent name/version to otel service.name ([#285](#285)) ([108edd7](108edd7))
Contributor
|
🎉 This PR is included in version 0.48.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Generated Go
main.godeclared build-timeAgentName/Versionldflags vars but never assigned them into the ADK config, so every telemetry-enabled agent exported OTLP traces and metrics with an emptyservice.name/service.versionresource attribute (spans unattributable in Jaeger,infer traces, etc.).The ADK builds its OTel resource from
cfg.AgentName/cfg.AgentVersion(server/otel/otel.go):Both fields are documented as
// Build-time metadata, not configurable via environment(noenvtag), so envconfig never populates them. Per the OpenTelemetry resource docs,service.namemust be set explicitly (SDK default isunknown_service) - and the ADK overrides even that default with an empty string.Change
internal/templates/languages/go/main.go.tmpl: afterenvconfig.Process, propagate the build-time metadata into the config before anything reads it:Unconditional (not gated on telemetry) so
cfg.A2Aalways reflects the real build metadata. The TypeScript path already did this correctly (serviceName: card.name); Rust does not support telemetry, so no change there.Tests
internal/generator/telemetry_test.go: extendedTestGenerator_TelemetryEnabled_EndToEndto assert the renderedmain.gopropagates both fields intocfg.A2A.Notes
The optional ADK-side fallback (merge
resource.Default()soOTEL_SERVICE_NAMEworks) remains a separate ADK concern, as noted in the issue.Closes #284