Skip to content

Auto-populate OTLP resource attributes for metrics#539

Merged
lbwexler merged 7 commits intodevelopfrom
otelTune
Apr 10, 2026
Merged

Auto-populate OTLP resource attributes for metrics#539
lbwexler merged 7 commits intodevelopfrom
otelTune

Conversation

@lbwexler
Copy link
Copy Markdown
Member

@lbwexler lbwexler commented Apr 9, 2026

Summary

  • Auto-populates otlp.resourceAttributes on MetricsService from the same standard OTEL resource attributes that TraceService uses (service.name, service.instance.id, deployment.environment.name, service.version), ensuring metrics and traces arrive at the collector with consistent service identity.
  • Extracts the four default resource attributes into an overridable getOtelResourceAttributes() method on ClusterConfig, so apps can customize values (e.g. mapping Developmentdev to match platform conventions) before services initialize.
  • Both TraceService and MetricsService now consume this shared source of truth via ClusterService.otelResourceAttributes.

Closes #536
Closes #537

Test plan

  • Verify OTLP metrics export includes service.name, service.instance.id, deployment.environment.name, service.version resource attributes
  • Verify OTLP traces continue to include the same resource attributes
  • Verify overriding getOtelResourceAttributes() in an app's ClusterConfig subclass customizes both metrics and traces
  • Verify existing otlpConfig settings (endpoint, timeout, headers) continue to work on both services

🤖 Generated with Claude Code

@lbwexler lbwexler marked this pull request as ready for review April 10, 2026 00:05
@lbwexler lbwexler merged commit 056b331 into develop Apr 10, 2026
6 checks passed
@lbwexler lbwexler deleted the otelTune branch April 10, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants