-
Notifications
You must be signed in to change notification settings - Fork 64
feat: user-events logs exporter - add support for Resource attributes #288
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
feat: user-events logs exporter - add support for Resource attributes #288
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #288 +/- ##
=======================================
- Coverage 48.3% 48.1% -0.2%
=======================================
Files 69 69
Lines 9479 9529 +50
=======================================
+ Hits 4581 4589 +8
- Misses 4898 4940 +42 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds optional Resource attribute forwarding to the user-events log exporter, allowing selected Resource keys to be emitted alongside each log.
- Extends
ProcessorBuilder
with awith_resource_attributes
option and passes chosen keys to the exporter - Updates
UserEventsExporter
to store, convert, and include those Resource attributes in PartC of the event payload - Adjusts tests and changelog to cover the new feature
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/logs/processor.rs | Added resource_attributes field, with_resource_attributes builder, and new constructor parameter |
src/logs/exporter.rs | Extended exporter state, set_resource logic, PartC emission, and conversion helper |
src/lib.rs | Updated test setup to configure and assert on resource attributes |
CHANGELOG.md | Documented the new with_resource_attributes method |
Comments suppressed due to low confidence (1)
opentelemetry-user-events-logs/src/logs/exporter.rs:22
- The code refers to
Key
andAnyValue
on this line but neither is imported. Adduse opentelemetry::Key;
and importAnyValue
from the crate where it's defined (e.g.use eventheader::AnyValue;
) so the code compiles.
attributes_from_resource: Vec<(Key, AnyValue)>,
Adding opt-in support for Resource attributes.