Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[exporter/otlphttpexporter] Partial success HTTP response handling #8270

Merged

Conversation

atoulme
Copy link
Contributor

@atoulme atoulme commented Aug 23, 2023

Description:
Fix the handling of the HTTP response to ignore responses not encoded as protobuf

Link to tracking Issue:
Fixes #8263

@atoulme atoulme requested review from a team and djaglowski August 23, 2023 07:37
@codecov
Copy link

codecov bot commented Aug 23, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.10% ⚠️

Comparison is base (ebed8dd) 90.27% compared to head (f3ee1b4) 90.18%.
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8270      +/-   ##
==========================================
- Coverage   90.27%   90.18%   -0.10%     
==========================================
  Files         301      302       +1     
  Lines       15596    15775     +179     
==========================================
+ Hits        14080    14227     +147     
- Misses       1227     1254      +27     
- Partials      289      294       +5     
Files Changed Coverage Δ
exporter/otlphttpexporter/otlp.go 92.34% <100.00%> (+0.36%) ⬆️

... and 11 files with indirect coverage changes

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

@atoulme
Copy link
Contributor Author

atoulme commented Aug 23, 2023

@evan-bradley would you please take a look as well?

Copy link

@breedx-splk breedx-splk left a comment

Choose a reason for hiding this comment

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

👍🏻

@dmitryax dmitryax merged commit cdbe8e7 into open-telemetry:main Aug 24, 2023
30 checks passed
func metricsPartialSuccessHandler(protoBytes []byte) error {
func metricsPartialSuccessHandler(protoBytes []byte, contentType string) error {
if contentType != protobufContentType {
return nil
Copy link
Member

Choose a reason for hiding this comment

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

@atoulme Why ignore the response if it is not Protobuf? It can be OTLP/JSON which is a valid content type and which can be decoded, right?

Copy link
Member

Choose a reason for hiding this comment

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

Nevermind, I see OTLP/JSON is not yet implemented by this exporter.

@codeboten codeboten added this to the next release milestone Aug 24, 2023
@atoulme atoulme deleted the fix_otlphttp_response_handling branch September 5, 2023 19:22
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.

OTLPHTTP exporter ignores response code and content-type, retries and logs anyway
6 participants