fix: Change logger scope in log appender#2796
Merged
cijothomas merged 2 commits intoopen-telemetry:mainfrom Mar 13, 2025
Merged
fix: Change logger scope in log appender#2796cijothomas merged 2 commits intoopen-telemetry:mainfrom
cijothomas merged 2 commits intoopen-telemetry:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2796 +/- ##
=======================================
- Coverage 79.6% 79.6% -0.1%
=======================================
Files 124 124
Lines 23174 23179 +5
=======================================
+ Hits 18456 18458 +2
- Misses 4718 4721 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cijothomas
reviewed
Mar 12, 2025
Member
If target is None, then get everything from InstrumentationScope itself. If target is there, then it should be used for name/ver/schema_url. But we should still copy the Attributes from Scope. (This requires some more investigation, so we can tackle it later) |
cijothomas
approved these changes
Mar 13, 2025
takumi-earth
pushed a commit
to earthlings-dev/opentelemetry-rust
that referenced
this pull request
Jan 27, 2026
djvcom
added a commit
to djvcom/opentelemetry-rust
that referenced
this pull request
Jan 29, 2026
When logs have a target set, the InstrumentationScope's version and attributes were being discarded during OTLP export. The target parameter now correctly overrides only the scope name, preserving other metadata. This behaviour was introduced in PR open-telemetry#1869 to avoid exporting the appender crate's version when the scope name was overridden by target. However, PRs open-telemetry#2735 and open-telemetry#2796 subsequently changed both appenders to use empty scopes, so this concern no longer applies. Additionally, users who explicitly create scopes via logger_with_scope() would reasonably expect their metadata to be preserved. Fixes open-telemetry#3276
djvcom
added a commit
to djvcom/opentelemetry-rust
that referenced
this pull request
Jan 29, 2026
When logs have a target set, the InstrumentationScope's version and attributes were being discarded during OTLP export. The target parameter now correctly overrides only the scope name, preserving other metadata. This behaviour was introduced in PR open-telemetry#1869 to avoid exporting the appender crate's version when the scope name was overridden by target. However, PRs open-telemetry#2735 and open-telemetry#2796 subsequently changed both appenders to use empty scopes, so this concern no longer applies. Additionally, users who explicitly create scopes via logger_with_scope() would reasonably expect their metadata to be preserved. Fixes open-telemetry#3276
djvcom
added a commit
to djvcom/opentelemetry-rust
that referenced
this pull request
Jan 29, 2026
When logs have a target set, the InstrumentationScope's version and attributes were being discarded during OTLP export. The target parameter now correctly overrides only the scope name, preserving other metadata. This behaviour was introduced in PR open-telemetry#1869 to avoid exporting the appender crate's version when the scope name was overridden by target. However, PRs open-telemetry#2735 and open-telemetry#2796 subsequently changed both appenders to use empty scopes, so this concern no longer applies. Additionally, users who explicitly create scopes via logger_with_scope() would reasonably expect their metadata to be preserved. Fixes open-telemetry#3276
4 tasks
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.
Fixes #2747
Changes
opentelemetry-rust/opentelemetry-proto/src/transform/common.rs
Line 57 in 1ddecb0
set all the values to empty strings/vec, if target is
None?Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial, user-facing changes