Repository navigation
fix(append-opentelemetry): emit code.module.name instead of code.function.name - #337
Merged
Merged
Conversation
…name Rust compile-time logging callsites only expose `module_path!()`, not the enclosing function or method name. Recording a module path under `code.function.name` conflates distinct functions in the same module when backends aggregate by `code.function.name` (tracked upstream in open-telemetry/opentelemetry-rust#3896 and open-telemetry/semantic-conventions#4440). Emit `Record::module_path` under `module_path` while retaining `code.file.path`, `code.line.number`, and `code.column.number` for file, line, and column metadata. Signed-off-by: tison <wander4096@gmail.com>
This was referenced Dec 3, 2026
Signed-off-by: tison <wander4096@gmail.com>
Emit `Record::module_path` under `code.module.name` alongside `code.file.path`, `code.line.number`, and `code.column.number`, matching the three-segment `code.<object>.<property>` Semantic Conventions naming model proposed in open-telemetry/semantic-conventions#4440. Signed-off-by: tison <wander4096@gmail.com>
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
Record::module_pathunder the"code.module.name"attribute key instead of"code.function.name"inlogforth-append-opentelemetry, keeping all four source-location attributes under thecode.*namespace (code.module.name,code.file.path,code.line.number, andcode.column.number).appenders/opentelemetry/README.md,CHANGELOG.md, and OpenTelemetry integration tests.Context
Rust compile-time logging callsites (
core::module_path!()) only know the module path, never the enclosing function or method name. Emitting module paths undercode.function.nameconflates distinct functions within the same module when backends aggregate bycode.function.name, whilecode.namespaceis deprecated and does not follow Semantic Conventions'<object>.<property>naming model.Upstream tracking issues:
Test Plan
cargo x checkcargo x testcargo x lint