Skip to content
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

Forward line and file information from event metadata into opentelemetry events #1910

Closed
djc opened this issue Feb 7, 2022 · 1 comment · Fixed by #1911
Closed

Forward line and file information from event metadata into opentelemetry events #1910

djc opened this issue Feb 7, 2022 · 1 comment · Fixed by #1911
Labels
crate/opentelemetry Related to the `tracing-opentelemetry` crate.

Comments

@djc
Copy link
Contributor

djc commented Feb 7, 2022

Feature Request

As far as I can tell, the tracing-opentelemetry code currently does not use the file() and line() elements of event metadata when creating an opentelemetry event. These would be nice to have in addition to the target.

Crates

tracing-opentelemetry

Motivation

More accurate information will make it easier to pinpoint issues.

Proposal

The event attributes could carry "file" and "line" attributes if the metadata yields Some for the relevant methods.

cc @jtescher

@jtescher jtescher added the crate/opentelemetry Related to the `tracing-opentelemetry` crate. label Feb 7, 2022
@jtescher
Copy link
Collaborator

jtescher commented Feb 7, 2022

This sounds like a good addition! 👍

hawkw pushed a commit that referenced this issue Feb 9, 2022
This branch adds the source code file, module path, and line number to
OpenTelemetry events as the OpenTelemetry `code.filepath`,
`code.namespace`, and `code.lineno` fields, respectively, if they are
set in the `tracing` event's metadata.

Fixes #1910
hawkw pushed a commit that referenced this issue Feb 11, 2022
This branch adds the source code file, module path, and line number to
OpenTelemetry events as the OpenTelemetry `code.filepath`,
`code.namespace`, and `code.lineno` fields, respectively, if they are
set in the `tracing` event's metadata.

Fixes #1910
hawkw pushed a commit that referenced this issue Feb 11, 2022
This branch adds the source code file, module path, and line number to
OpenTelemetry events as the OpenTelemetry `code.filepath`,
`code.namespace`, and `code.lineno` fields, respectively, if they are
set in the `tracing` event's metadata.

Fixes #1910
hawkw pushed a commit that referenced this issue Feb 11, 2022
This branch adds the source code file, module path, and line number to
OpenTelemetry events as the OpenTelemetry `code.filepath`,
`code.namespace`, and `code.lineno` fields, respectively, if they are
set in the `tracing` event's metadata.

Fixes #1910
kaffarell pushed a commit to kaffarell/tracing that referenced this issue May 22, 2024
This branch adds the source code file, module path, and line number to
OpenTelemetry events as the OpenTelemetry `code.filepath`,
`code.namespace`, and `code.lineno` fields, respectively, if they are
set in the `tracing` event's metadata.

Fixes tokio-rs#1910
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate/opentelemetry Related to the `tracing-opentelemetry` crate.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants