-
Notifications
You must be signed in to change notification settings - Fork 496
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
Hide LogRecord attributes Implementation Details from exporters #1985
Hide LogRecord attributes Implementation Details from exporters #1985
Conversation
self.attributes.as_ref().map_or(0, |attrs| attrs.len()) | ||
} | ||
|
||
/// Returns true if the `LogRecord` contains the specified attribute. |
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.
I think this is not required to be public. If an exporter needs it, then can write a helper function to get this by using the above 2 methods.
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.
I think we need to offer API to modify an existing entry, remove an existing entry too. These are critical to ensure we allow redaction, enrichment capabilities. Lets track it as separate issue for adding in the future.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1985 +/- ##
=====================================
Coverage 74.8% 74.9%
=====================================
Files 122 122
Lines 20429 20473 +44
=====================================
+ Hits 15299 15341 +42
- Misses 5130 5132 +2 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Cijo Thomas <[email protected]>
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.
LGTM.
Its probably better not to expose len() method initially, not a blocker if we expose it as well.
…opentelemetry-rust into hide-logrecord-attr-impl-details
Changes
Hide the implementation details of LogRecord attributes by:
These changes will enable modifications to the internal implementation of these attributes without requiring any changes in the exporter code.
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial, user-facing changes