Skip to content

[Prototype] spaneventbridge: add processor that bridges log-based events back onto the current span as span events#8760

Open
pellared wants to merge 7 commits intoopen-telemetry:mainfrom
pellared:event-to-spans
Open

[Prototype] spaneventbridge: add processor that bridges log-based events back onto the current span as span events#8760
pellared wants to merge 7 commits intoopen-telemetry:mainfrom
pellared:event-to-spans

Conversation

@pellared
Copy link
Copy Markdown
Member

@pellared pellared commented Apr 1, 2026

@pellared pellared changed the title eventbridge: add processor that bridges log-based events back onto the current span as span events [Prototype] eventbridge: add processor that bridges log-based events back onto the current span as span events Apr 1, 2026
return attrs
}

func spanAttribute(kv log.KeyValue) attribute.KeyValue {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note that this won't be needed when Logs API is going to use attribute

@pellared pellared marked this pull request as ready for review April 1, 2026 15:23
@pellared pellared requested review from a team, MrAlias, XSAM, dashpole and dmathieu as code owners April 1, 2026 15:23
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 1, 2026

Codecov Report

❌ Patch coverage is 54.31034% with 53 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.2%. Comparing base (6b85d9a) to head (4d23156).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
processors/spaneventbridge/log_processor.go 54.3% 49 Missing and 4 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #8760     +/-   ##
=======================================
- Coverage   83.4%   83.2%   -0.3%     
=======================================
  Files        192     193      +1     
  Lines      15598   15722    +124     
=======================================
+ Hits       13024   13088     +64     
- Misses      2127    2185     +58     
- Partials     447     449      +2     
Files with missing lines Coverage Δ
processors/spaneventbridge/log_processor.go 54.3% <54.3%> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread processors/spaneventbridge/log_processor.go Outdated
Copy link
Copy Markdown
Contributor

@dashpole dashpole left a comment

Choose a reason for hiding this comment

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

I like this design a lot. I would consider spaneventbridge as a name.

@flc1125
Copy link
Copy Markdown
Member

flc1125 commented Apr 2, 2026

I think it’s quite good overall. One additional small suggestion:

Since log reporting needs to be tracked based on the ctx returned by span, it would be nice if this could be explicitly communicated to users. Because most users may use a ctx that does not contain span information, which could lead them to think the report was sent when it actually wasn’t.

One possible approach: use Warn output.

@pellared
Copy link
Copy Markdown
Member Author

pellared commented Apr 2, 2026

Since log reporting needs to be tracked based on the ctx returned by span, it would be nice if this could be explicitly communicated to users. Because most users may use a ctx that does not contain span information, which could lead them to think the report was sent when it actually wasn’t.

One possible approach: use Warn output.

We may want to improve the https://pkg.go.dev/go.opentelemetry.io/otel/log#Logger docs. Note that some log records may be emitted outside of any span.

@pellared pellared changed the title [Prototype] eventbridge: add processor that bridges log-based events back onto the current span as span events [Prototype] spaneventbridge: add processor that bridges log-based events back onto the current span as span events Apr 2, 2026
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.

3 participants