Skip to content

feat(otlp-http): improve endpoint handling, add User-Agent header, an…#2074

Open
arjun-rajappa wants to merge 1 commit intoopen-telemetry:mainfrom
arjun-rajappa:add-tests-otlp-http
Open

feat(otlp-http): improve endpoint handling, add User-Agent header, an…#2074
arjun-rajappa wants to merge 1 commit intoopen-telemetry:mainfrom
arjun-rajappa:add-tests-otlp-http

Conversation

@arjun-rajappa
Copy link
Copy Markdown
Contributor

Fixes #1667

  • Add spec-compliant default User-Agent header with exporter version and Ruby runtime info
  • Fix endpoint path construction to properly handle OTEL_EXPORTER_OTLP_ENDPOINT with/without trailing slashes
  • Implement proper endpoint precedence: explicit endpoint > OTEL_EXPORTER_OTLP_TRACES_ENDPOINT > OTEL_EXPORTER_OTLP_ENDPOINT
  • Add metrics for compressed and uncompressed message sizes
  • Add specific error handling and logging for 404 responses
  • Refactor endpoint and header preparation into dedicated methods
  • Prevent header mutation by duplicating Hash parameters
  • Add comprehensive test coverage for endpoint path handling and User-Agent header

…d enhance metrics

- Add spec-compliant default User-Agent header with exporter version and Ruby runtime info
- Fix endpoint path construction to properly handle OTEL_EXPORTER_OTLP_ENDPOINT with/without trailing slashes
- Implement proper endpoint precedence: explicit endpoint > OTEL_EXPORTER_OTLP_TRACES_ENDPOINT > OTEL_EXPORTER_OTLP_ENDPOINT
- Add metrics for compressed and uncompressed message sizes
- Add specific error handling and logging for 404 responses
- Refactor endpoint and header preparation into dedicated methods
- Prevent header mutation by duplicating Hash parameters
- Add comprehensive test coverage for endpoint path handling and User-Agent header

Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make otlp-http, otlp-grpc, and otlp-common gems production-ready

1 participant