Skip to content

Support http/json in otlpmetrichttp#7804

Open
petern48 wants to merge 7 commits intoopen-telemetry:mainfrom
petern48:otlpmetrichttp_json
Open

Support http/json in otlpmetrichttp#7804
petern48 wants to merge 7 commits intoopen-telemetry:mainfrom
petern48:otlpmetrichttp_json

Conversation

@petern48
Copy link
Contributor

Add support for encoding in protojson format and make it configurable, keeping proto as the default option.

closes #7803

This is needed for the following:

open-telemetry/opentelemetry-go-contrib#6339
open-telemetry/opentelemetry-go-contrib#8399

@codecov
Copy link

codecov bot commented Jan 18, 2026

Codecov Report

❌ Patch coverage is 38.46154% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.4%. Comparing base (34cd3a7) to head (9c18965).

Files with missing lines Patch % Lines
exporters/otlp/otlpmetric/otlpmetrichttp/client.go 36.8% 0 Missing and 12 partials ⚠️
...pmetric/otlpmetricgrpc/internal/otest/collector.go 0.0% 8 Missing ⚠️
...pmetric/otlpmetrichttp/internal/otest/collector.go 12.5% 1 Missing and 6 partials ⚠️
exporters/otlp/otlpmetric/otlpmetrichttp/config.go 40.0% 3 Missing ⚠️
...tlpmetric/otlpmetricgrpc/internal/oconf/options.go 83.3% 0 Missing and 1 partial ⚠️
...tlpmetric/otlpmetrichttp/internal/oconf/options.go 83.3% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #7804     +/-   ##
=======================================
- Coverage   86.1%   85.4%   -0.8%     
=======================================
  Files        302     302             
  Lines      22046   22106     +60     
=======================================
- Hits       18989   18883    -106     
- Misses      2676    2702     +26     
- Partials     381     521    +140     
Files with missing lines Coverage Δ
...tlpmetric/otlpmetricgrpc/internal/oconf/options.go 77.9% <83.3%> (-11.9%) ⬇️
...tlpmetric/otlpmetrichttp/internal/oconf/options.go 80.3% <83.3%> (-12.7%) ⬇️
exporters/otlp/otlpmetric/otlpmetrichttp/config.go 78.9% <40.0%> (-9.0%) ⬇️
...pmetric/otlpmetrichttp/internal/otest/collector.go 39.2% <12.5%> (-21.4%) ⬇️
...pmetric/otlpmetricgrpc/internal/otest/collector.go 16.5% <0.0%> (-6.2%) ⬇️
exporters/otlp/otlpmetric/otlpmetrichttp/client.go 55.6% <36.8%> (-25.2%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@petern48
Copy link
Contributor Author

The check-links job is failing due to links that were already in the .tmpl files.
https://github.com/open-telemetry/opentelemetry-go/actions/runs/21115879038/job/60721331105?pr=7804

The failing codecov CI makes sense to me as well. The modifications to collector.go are tested (and needed) in client_test.go, but codecov just doesn't detect that.

I'm just going to leave the PR here and await feedback.

@petern48 petern48 marked this pull request as ready for review January 18, 2026 17:58
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.

Support http/json in otlpmetrichttp

1 participant