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

OpenTelemetry tracing errors should use RecordError function #2384

Open
lucasoares opened this issue Feb 16, 2024 · 0 comments · May be fixed by #2386
Open

OpenTelemetry tracing errors should use RecordError function #2384

lucasoares opened this issue Feb 16, 2024 · 0 comments · May be fixed by #2386
Labels
bughancement It's kind of a bug, but mostly an enhancement. observability A bug relating to observability components (metrics, logging, tracing, etc)

Comments

@lucasoares
Copy link
Contributor

lucasoares commented Feb 16, 2024

OpenTelemetry contains two functions called RecordError and SetStatus on the span struct to record errors in the spans.

Currently, this is how we are storing errors on spans:

		span.SetTag("error", "true")
		span.LogKV(
			"event", "error",
			"type", err.Error(),
		)

This doesn't follow OpenTelemetry's specification on error handling, and then spans will not be tagged as an "error" on tracing visualization platforms.

Since we have this on the docs:

WARNING: Although the configuration spec of this component is stable the format of spans, tags and logs created by Benthos is subject to change as it is tuned for improvement.

We can change the behavior, right?

lucasoares added a commit to lucasoares/benthos that referenced this issue Feb 17, 2024
@lucasoares lucasoares linked a pull request Feb 17, 2024 that will close this issue
lucasoares added a commit to lucasoares/benthos that referenced this issue Feb 17, 2024
Fixes redpanda-data#2385
Fixes redpanda-data#2384

Signed-off-by: Lucas Soares <lucasoares3@gmail.com>
@Jeffail Jeffail added bughancement It's kind of a bug, but mostly an enhancement. observability A bug relating to observability components (metrics, logging, tracing, etc) labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bughancement It's kind of a bug, but mostly an enhancement. observability A bug relating to observability components (metrics, logging, tracing, etc)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants