Repository navigation
Transform OpenTelemetry log event names before export - #2827
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 3 files
Confidence score: 5/5
- The
transform_stringdocstring inlogfire/_internal/scrubbing.pyomits top-level log record event names, which are transformed at('otel_log_event_name',). Update the docstring to include them.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="logfire-sdk/logfire/_internal/scrubbing.py">
<violation number="1" location="logfire-sdk/logfire/_internal/scrubbing.py:271">
P3: The `transform_string` docstring still lists only span names, status descriptions, and event names. Add that top-level log record event names are also transformed, with path `('otel_log_event_name',)`, so callback authors know to handle that path.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
Contributor
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||
alexmojaki
commented
Nov 18, 2026
|
|
||
| Span names, status descriptions, and event names are also transformed, without pattern matching. | ||
| Span names, status descriptions, span event names, and OpenTelemetry log-record event names are also transformed, | ||
| without pattern matching. Log-record event names use the path `('otel_log_event_name',)`. |
Contributor
Author
There was a problem hiding this comment.
drop the last sentence
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
transform_stringto the top-level OpenTelemetry log-recordevent_namein the same processor aslogfire.msg.('otel_log_event_name',)callback path; retain the input if the callback raises.event.nameattribute path.Validation
pytest -q tests/test_secret_scrubbing.py tests/test_otel_logs.py tests/test_console_exporter.py tests/test_stdlib_logging.py(226 passed)This addresses only top-level OpenTelemetry log-record event-name transformation from pydantic/platform#38102.