Skip to content

Update log, metrics and trace exporters to return response code in addition to success/failure flag#5295

Open
rads-1996 wants to merge 5 commits into
open-telemetry:mainfrom
rads-1996:modify-exporters
Open

Update log, metrics and trace exporters to return response code in addition to success/failure flag#5295
rads-1996 wants to merge 5 commits into
open-telemetry:mainfrom
rads-1996:modify-exporters

Conversation

@rads-1996

@rads-1996 rads-1996 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Description

Surface the underlying HTTP response code from the trace, span, and metric exporters in opentelemetry-exporter-otlp-proto-http.

The OTLP HTTP exporters only return a coarse SUCCESS/FAILURE status from export(). When a failure occurs, callers have no programmatic way to determine why it failed — was it a 4xx client error, a 5xx server error, a transient network issue, etc. Without that signal, downstream code can't make informed decisions (e.g. whether to retry, alert, or fail fast), and operators have no insight beyond logs.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Unit tests

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@rads-1996 rads-1996 requested a review from a team as a code owner June 11, 2026 21:37
@rads-1996 rads-1996 marked this pull request as draft June 11, 2026 21:41
@rads-1996 rads-1996 marked this pull request as ready for review June 11, 2026 22:28
@herin049

Copy link
Copy Markdown
Contributor

I don't think this is something we want to support, given that processors don't currently use this value. Furthermore, this would be a breaking change to exporters, which is not something we want to introduce unnecessarily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants