Visitar URL original
otelconf: validate encoding configuration for OTLP HTTP exporters by sonalgaud12 · Pull Request #8772 · open-telemetry/opentelemetry-go-contrib · GitHub
Skip to content

otelconf: validate encoding configuration for OTLP HTTP exporters - #8772

Merged
pellared merged 6 commits into
open-telemetry:mainfrom
sonalgaud12:OTLPHttpExporter-encoding
Apr 7, 2026
Merged

pellared merged 6 commits into
open-telemetry:mainfrom
sonalgaud12:OTLPHttpExporter-encoding

Conversation

@sonalgaud12

@sonalgaud12 sonalgaud12 commented Apr 5, 2026 •

Copy link
Copy Markdown
Member

Related: #8398

  • The field was already defined on the struct but never read during exporter construction. Configs setting encoding were silently accepted regardless of value.

  • Adds validateOTLPHTTPEncoding to both otelconf/config_common.go and otelconf/x/config_common.go, called at the top of each otlpHTTP*Exporter function for trace, metric, and log signals.

@sonalgaud12
sonalgaud12 requested review from a team and pellared as code owners April 5, 2026 07:32
@github-actions
github-actions Bot requested a review from codeboten April 5, 2026 07:32
@codecov

codecov Bot commented Apr 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.4%. Comparing base (45977a4) to head (6162af7).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #8772   +/-   ##
=====================================
  Coverage   83.4%   83.4%           
=====================================
  Files        192     192           
  Lines      15578   15598   +20     
=====================================
+ Hits       13004   13024   +20     
  Misses      2127    2127           
  Partials     447     447           
Files with missing lines Coverage Δ
otelconf/config_common.go 92.5% <100.0%> (+0.2%) ⬆️
otelconf/log.go 99.2% <100.0%> (+<0.1%) ⬆️
otelconf/metric.go 90.7% <100.0%> (+<0.1%) ⬆️
otelconf/trace.go 99.5% <100.0%> (+<0.1%) ⬆️
otelconf/x/config_common.go 92.5% <100.0%> (+0.2%) ⬆️
otelconf/x/log.go 99.2% <100.0%> (+<0.1%) ⬆️
otelconf/x/metric.go 90.7% <100.0%> (+<0.1%) ⬆️
otelconf/x/trace.go 99.4% <100.0%> (+<0.1%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread CHANGELOG.md Resolved
@pellared

pellared commented Apr 7, 2026

Copy link
Copy Markdown
Member

@sonalgaud12, thanks!

@pellared pellared changed the title Implements encoding field support for OTLPHttpExporter as required by schema otelconf: validate encoding configuration for OTLP HTTP exporters Apr 7, 2026
@pellared
pellared merged commit 6b85d9a into open-telemetry:main Apr 7, 2026
30 checks passed
@sonalgaud12
sonalgaud12 deleted the OTLPHttpExporter-encoding branch April 8, 2026 06:28
@pellared pellared added this to the v1.44.0 milestone May 27, 2026
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.

4 participants