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

OTLP HTTP Exporter: Propagate HTTP 429s #9905

Merged
merged 9 commits into from
Apr 18, 2024

Conversation

jaronoff97
Copy link
Contributor

@jaronoff97 jaronoff97 commented Apr 5, 2024

Description:
Changes otlphttp status code handling to propagate the error code as a grpc status code. This follows the logic that was implemented for the http receiver here.

Link to tracking Issue: #9892

Testing: local tests were updated, going to test a local build.

Documentation: none yet...

Copy link

codecov bot commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.79%. Comparing base (e8cabb7) to head (4546b03).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9905   +/-   ##
=======================================
  Coverage   91.79%   91.79%           
=======================================
  Files         358      359    +1     
  Lines       16576    16578    +2     
=======================================
+ Hits        15216    15218    +2     
  Misses       1037     1037           
  Partials      323      323           

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

@jaronoff97 jaronoff97 marked this pull request as ready for review April 9, 2024 22:25
@jaronoff97 jaronoff97 requested review from a team and codeboten April 9, 2024 22:25
Copy link
Contributor

@evan-bradley evan-bradley left a comment

Choose a reason for hiding this comment

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

Overall looks good to me.

exporter/otlphttpexporter/otlp.go Outdated Show resolved Hide resolved
@jaronoff97
Copy link
Contributor Author

NOTE! before merging this, I'm going to run some tests to be sure this does exactly what we expect! I'll report back

exporter/otlphttpexporter/otlp.go Outdated Show resolved Hide resolved
exporter/otlphttpexporter/otlp.go Outdated Show resolved Hide resolved
exporter/otlphttpexporter/otlp.go Outdated Show resolved Hide resolved
@jaronoff97
Copy link
Contributor Author

Screenshot 2024-04-12 at 4 38 09 PM
Okay I ran this in my dev environment and confirmed this indeed works!

@jaronoff97 jaronoff97 requested a review from TylerHelmuth April 12, 2024 20:47
@jaronoff97 jaronoff97 changed the title Potential fix for http status code handling OTLP HTTP Exporter: Propagate HTTP 429s Apr 15, 2024
Copy link
Member

@TylerHelmuth TylerHelmuth left a comment

Choose a reason for hiding this comment

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

This looks good to me as an intermediary step towards #9041

exporter/otlphttpexporter/otlp_test.go Show resolved Hide resolved
c = codes.ResourceExhausted
case http.StatusBadGateway, http.StatusServiceUnavailable, http.StatusGatewayTimeout:
c = codes.Unavailable
default:
Copy link
Member

Choose a reason for hiding this comment

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

I would add 413 -> codes.FailedPrecondition, 408 -> codes.DeadlineExceeded etc. Not suggesting to do it in this PR though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah that should be done in a followup, I want this to be focused on the 429 bug

Copy link
Member

@songy23 songy23 left a comment

Choose a reason for hiding this comment

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

LGTM

@codeboten codeboten merged commit dc48d0e into open-telemetry:main Apr 18, 2024
49 checks passed
@github-actions github-actions bot added this to the next release milestone Apr 18, 2024
@jaronoff97 jaronoff97 deleted the fix-429-logic branch April 19, 2024 02:21
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.

6 participants