-
Notifications
You must be signed in to change notification settings - Fork 701
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
opentelemetry: on_event respects event's explicit parent #2296
Conversation
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.
Good fix, on_event
should respect explicit event parents. Thanks @wprzytula
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.
overall, this looks good! however, i had one small suggestion for how we could potentially simplify the code.
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.
@wprzytula would you mind changing this branch to target master
rather than v0.1.x
, so that the fix can land on the tracing
0.2 development branch? Maintainers will then handle backporting this change to v0.1.x
and publishing a new tracing-opentelemetry
version from that branch.
Thank you!
One can want to have an event added from outside context of a span, especially in an async code (e.g. between polls of the future, or between polling multiple futures instrumented with that span). Then it is expected that the event will be attached indeed to the span specified as the parent and not the contextual one.
c64afe5
to
248ee2d
Compare
@hawkw I followed your suggestions and the PR is ready. |
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.
thanks, this looks good to me!
Any estimations when this fix gets backported to |
We typically do it whenever we do a release; I'm doing some backports right now and will ping you when it's ready. |
…#2296) One can want to have an event added from outside context of a span, especially in an async code (e.g. between polls of the future, or between polling multiple futures instrumented with that span). Then it is expected that the event will be attached indeed to the span specified as the parent and not the contextual one. Fixes: #2295 See #2295
…#2296) One can want to have an event added from outside context of a span, especially in an async code (e.g. between polls of the future, or between polling multiple futures instrumented with that span). Then it is expected that the event will be attached indeed to the span specified as the parent and not the contextual one. Fixes: #2295 See #2295
…#2296) One can want to have an event added from outside context of a span, especially in an async code (e.g. between polls of the future, or between polling multiple futures instrumented with that span). Then it is expected that the event will be attached indeed to the span specified as the parent and not the contextual one. Fixes: #2295 See #2295
### Breaking Changes - Upgrade to `v0.18.0` of `opentelemetry` (#2303) For list of breaking changes in OpenTelemetry, see the [v0.18.0 changelog](https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry/CHANGELOG.md#v0180). ### Fixed - `on_event` respects event's explicit parent (#2296)
…tokio-rs#2296) One can want to have an event added from outside context of a span, especially in an async code (e.g. between polls of the future, or between polling multiple futures instrumented with that span). Then it is expected that the event will be attached indeed to the span specified as the parent and not the contextual one. Fixes: tokio-rs#2295 See tokio-rs#2295
### Breaking Changes - Upgrade to `v0.18.0` of `opentelemetry` (tokio-rs#2303) For list of breaking changes in OpenTelemetry, see the [v0.18.0 changelog](https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry/CHANGELOG.md#v0180). ### Fixed - `on_event` respects event's explicit parent (tokio-rs#2296)
One can want to have an event added from outside context of a span,
especially in an async code (e.g. between polls of the future, or
between polling multiple futures instrumented with that span). Then it
is expected that the event will be attached indeed to the span specified
as the parent and not the contextual one.
Fixes: #2295
Motivation
see #2295
Solution
see #2295