Skip to content

Log a warning if OTLP endpoint port is likely incorrect given the protocol#6813

Merged
jack-berg merged 1 commit into
open-telemetry:mainfrom
jack-berg:otlp-port-protocol-warning
Oct 22, 2024
Merged

Log a warning if OTLP endpoint port is likely incorrect given the protocol#6813
jack-berg merged 1 commit into
open-telemetry:mainfrom
jack-berg:otlp-port-protocol-warning

Conversation

@jack-berg

Copy link
Copy Markdown
Member

The OpenTelemetry java agent switched the default OTLP protocol from grpc to http/protobuf in the 2.0 release. This is misaligned with the autoconfigure default, which is stuck with the protocol being grpc until a major version bump, which there are no plans for.

This causes confusion for users.

To relieve some of the confusion, this PR adds logging when the the endpoint port is not aligned with version of the protocol. I.e. log when port is 4318 and protocol is grpc, or when port is 43117 and protocol is http/protobuf.

Thanks to @laurit for the recommendation.

@jack-berg
jack-berg requested a review from a team as a code owner October 21, 2024 22:44
@codecov

codecov Bot commented Oct 21, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.37%. Comparing base (628db61) to head (86b41c9).
Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6813      +/-   ##
============================================
- Coverage     90.37%   90.37%   -0.01%     
- Complexity     6577     6584       +7     
============================================
  Files           731      731              
  Lines         19714    19722       +8     
  Branches       1926     1931       +5     
============================================
+ Hits          17817    17824       +7     
  Misses         1300     1300              
- Partials        597      598       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@trask trask left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jack-berg
jack-berg merged commit 45b8c13 into open-telemetry:main Oct 22, 2024
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