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

amqplib looses Baggage #1351

Closed
nerumo opened this issue Jan 11, 2023 · 4 comments · Fixed by #1354
Closed

amqplib looses Baggage #1351

nerumo opened this issue Jan 11, 2023 · 4 comments · Fixed by #1354
Labels
bug Something isn't working priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect

Comments

@nerumo
Copy link
Contributor

nerumo commented Jan 11, 2023

What version of OpenTelemetry are you using?

amqplib: 0.32.0

What version of Node are you using?

19.4.0

What did you do?

I'm using baggage propagators and I realized that I loose the baggage when I consume messages.

What did you expect to see?

propagator.getBaggage(context.active()) should return the baggage of the amqp header

What did you see instead?

I get null/empty

Additional context

I already found the problem: the wrong context is passed into the setSpan method.

image

Right now, the context.active() is passed in, but actually the parentContext must be passed in since only this one contains the baggage.

@nerumo nerumo added the bug Something isn't working label Jan 11, 2023
@Flarna
Copy link
Member

Flarna commented Jan 11, 2023

This seems to be not limited to amqplib, e.g. grpc-js looks similar.

@nerumo
Copy link
Contributor Author

nerumo commented Jan 11, 2023

agreed, but there the active context actually should have changed since they are doing a context.with(...) (Code), but IMHO it should be solved with a single context.with

@Flarna
Copy link
Member

Flarna commented Jan 11, 2023

right, I haven't seen this additional context.with(). I looked into http and grpc and http shows more or less what you propose (code).

@blumamir
Copy link
Member

Thanks @nerumo
Would you like to contribute a PR with a fix?

@dyladan dyladan added the priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect label Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:p2 Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants