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

Handle HTTP 2XX responses as successful in OTLP exporters #3623

Merged
merged 6 commits into from
Jan 26, 2024

Conversation

gshiva
Copy link
Contributor

@gshiva gshiva commented Jan 7, 2024

Description

This change modifies the OTLP exporters to treat HTTP 204 responses as successful. Previously, these were logged as errors and returned an error code, even though a 204 status code indicates a successful request. This change prevents unnecessary pollution of the logs.

Fixes #3621

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I tested this change locally by using the modified code and verified that it works as expected. Specifically, I sent logs to the Grafana OTLP endpoint and confirmed that a 204 status code no longer results in an error message or error code.

[x] Test A: Sent logs to Grafana OTLP endpoint and confirmed correct behavior

Does This PR Require a Contrib Repo Change?

  • [ X] No.

Checklist:

  • [ X] Followed the style guidelines of this project

@gshiva gshiva requested a review from a team January 7, 2024 04:09
Copy link

linux-foundation-easycla bot commented Jan 7, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@ocelotl
Copy link
Contributor

ocelotl commented Jan 10, 2024

Just for reference.

@ocelotl ocelotl self-requested a review January 11, 2024 17:59
Copy link
Contributor

@ocelotl ocelotl left a comment

Choose a reason for hiding this comment

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

Marking as request changes to avoid accidental merging, there is still an important question to answer here.

@ocelotl ocelotl enabled auto-merge (squash) January 25, 2024 23:36
auto-merge was automatically disabled January 25, 2024 23:42

Pull Request is not mergeable

@ocelotl ocelotl merged commit c4d17e9 into open-telemetry:main Jan 26, 2024
312 checks passed
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.

Exporters logs error message and returns error code for successful operations with return code 204
2 participants