redpanda-data / redpanda-data/connect

OpenTelemetry tracing errors should use RecordError function

Open
#2,384 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bughancement observability
Dominant language
Go
Stars
8.8k
Forks
969
Avg merge
1d 13h
Merged PRs (30d)
64

Description

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the Go repository for the shown span.SetTag("error", "true") and span.LogKV calls, then inspect the surrounding OpenTelemetry tracing error paths. Confirm that error spans use RecordError and SetStatus according to the specification, and verify the resulting error status in the tracing output or relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.