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

OpenTelemetry support needs to use its own context propagator #2005

Open
feywind opened this issue Dec 13, 2024 · 2 comments
Open

OpenTelemetry support needs to use its own context propagator #2005

feywind opened this issue Dec 13, 2024 · 2 comments
Assignees
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@feywind
Copy link
Collaborator

feywind commented Dec 13, 2024

Re this comment: #1389 (comment)

The Node Pub/Sub library should be using a private context propagator of type W3CTraceContextPropagator rather than the global one (which allows other libraries to stuff values that become invalid Pub/Sub attributes).

A separate issue is filed in regards to the x-cloud-trace-header that's the proximate problem here: GoogleCloudPlatform/opentelemetry-operations-js#781

(but this library should be immune to those kinds of issues, anyway...)

@feywind feywind added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. api: pubsub Issues related to the googleapis/nodejs-pubsub API. labels Dec 13, 2024
@feywind feywind self-assigned this Dec 13, 2024
@aabmass
Copy link
Contributor

aabmass commented Dec 18, 2024

The Node Pub/Sub library should be using a private context propagator of type W3CTraceContextPropagator rather than the global one

I feel a bit conflicted by this. If you look at PubSub as an asynchronous transport, why shouldn't the client support different propagation formats?

@feywind
Copy link
Collaborator Author

feywind commented Dec 18, 2024

I meant the "should" there in the sense that our spec for the work included using a private, custom propagator, and it isn't, currently. But the reasoning for that is basically this exact sort of thing, we're intending to pass along the trace ID through Pub/Sub attributes, but it's not a generic transport like HTTP. Attribute names are restrictive in some cases, and (IIRC) it can cost users to add more attributes unexpectedly. Our libraries are the expected producers and consumers of this attribute, so it makes more sense to control what goes there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

2 participants