Skip to content

Conversation

marclop
Copy link
Contributor

@marclop marclop commented Jul 9, 2025

Updates the extension to return a status.Error type (which wraps the status.Status type) instead of a plain error type. This allows propagating the status code and message from the extension to the collector.

This is similar to what the upstream OTLP receiver does:

https://github.com/open-telemetry/opentelemetry-collector/blob/v0.129.0/receiver/otlpreceiver/otlphttp.go#L183-L192

Updates the extension to return a `status.Error` type (which wraps the
`status.Status` type) instead of a plain `error` type. This allows
propagating the status code and message from the extension to the
collector.

This is similar to what the upstream OTLP receiver does:

https://github.com/open-telemetry/opentelemetry-collector/blob/v0.129.0/receiver/otlpreceiver/otlphttp.go#L183-L192

Signed-off-by: Marc Lopez Rubio <[email protected]>
@marclop marclop requested a review from a team as a code owner July 9, 2025 08:17
@marclop marclop requested review from trentm and rockdaboot July 9, 2025 08:17
Copy link
Member

@axw axw left a comment

Choose a reason for hiding this comment

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

Looks good, main concern is the InvalidArgument case. It may leak information

Signed-off-by: Marc Lopez Rubio <[email protected]>
Signed-off-by: Marc Lopez Rubio <[email protected]>
@marclop marclop merged commit 906e3e8 into elastic:main Jul 9, 2025
13 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.

2 participants