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

Open Telemetry Tracing Support #543

Open
mikesmith37 opened this issue Nov 27, 2021 · 8 comments
Open

Open Telemetry Tracing Support #543

mikesmith37 opened this issue Nov 27, 2021 · 8 comments
Assignees
Labels
api: pubsub Issues related to the googleapis/python-pubsub API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@mikesmith37
Copy link

Hi,

This link lead me here but I assume its now an old PR? #149

Can anyone advise of current approach for tracing processes that use google pubsub for exchanging information?

If so does this work with push subscriptions?

Thanks!
Mike S

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/python-pubsub API. label Nov 27, 2021
@mikesmith37
Copy link
Author

Perhaps setting the traceId message attribute as per https://dev.to/michaltalaga/tracing-logs-in-gcp-when-exchanging-message-through-pubsub-in-java-b87 ?

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Nov 28, 2021
@plamut plamut added type: question Request for information or clarification. Not an issue. and removed triage me I really want to be triaged. labels Nov 30, 2021
@plamut
Copy link
Contributor

plamut commented Nov 30, 2021

@mikesmith37 Yes, that PR is stale. Nevertheless, support for OpenTelemetry is still planned, currently the specifications are being developed. I think they should be complete by the end of the year, but it is just my opinion, not an official statement.

In the meantime, what kind of tracing would you need for your project? Perhaps it might be possible to use something else until OpenTelemetry is supported.

@steve-marmalade
Copy link

steve-marmalade commented Jun 22, 2022

Came here looking for this as I noticed the TraceID for my Cloud Run request is not being propagated in the PubSub messages it is publishing (as evidenced in CloudTrace by seeing one trace for the CloudRun request and then many automatic PubSub traces to /_ah/push-handlers/pubsub/projects/...).

This there a way to configure the PubSub client such that the messages it sends will include the trace information from the current environment? Or, if not, is there an attribute I could add to the message that PubSub would recognize as containing trace information (e.g. traceparent or X-Cloud-Trace-Context)?

@bgarcial
Copy link

bgarcial commented Jan 7, 2023

Hi @plamut and @mikesmith37

I see the PR #149 was or it is intended to provide tracing to a message from a publisher and how this is received in the subscriber part just to get the possibility to get track about what could be happening when things go wrong in the point the message is sent (publisher) and the message is received (subscriber) right?

In addition, you've mentioned:

support for OpenTelemetry is still planned, currently the specifications are being developed. I think they should be complete by the end of the year, but it is just my opinion, not an official statement.

Does the python client for google pub sub actually support OTEL? or is this still on planning?

On the other hand, I see in the OTEL collector project the Google Cloud Pub Sub exporter and the Google Cloud Pub Sub Receiver modules, how is this different from the purpose of the above here mentioned PR?

I guess under collector perspective those modules are for sending traces (already in OTEL collector) from an application perspective to a pub sub-topic (exporter) and for getting OTEL messages from a subscription (receiver), but not to trace the messages that a publisher send and a subscriber receive?

@plamut
Copy link
Contributor

plamut commented Jan 8, 2023

@bgarcial IIRC that PR was opened by a then-intern at Google, but it was not ready to be merged yet at the time.

I unfortunately don't know if OTEL support is still planned or not, as I no longer maintain this library. Maybe @acocuzzo knows more, AFAIK she's one of the Google maintainers currently...

@acocuzzo
Copy link
Contributor

@bgarcial Support is planned for this year, will continue to update this bug as progress is made

@acocuzzo acocuzzo self-assigned this Feb 14, 2023
@acocuzzo acocuzzo added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed type: question Request for information or clarification. Not an issue. labels Feb 14, 2023
@acocuzzo acocuzzo removed their assignment Jun 12, 2023
@hongalex hongalex changed the title Open Telemetry Support Open Telemetry Tracing Support Jul 17, 2023
@liuyunnnn liuyunnnn assigned pradn and unassigned liuyunnnn Oct 24, 2023
@AndreasBergmeier6176
Copy link

@bgarcial Support is planned for this year, will continue to update this bug as progress is made

Is there a spec to have a look at?

@crossk3
Copy link

crossk3 commented Apr 11, 2024

@plamut @acocuzzo @mukund-ananthu Any updates on this? I see assignment shuffling which makes me nervous...

googleapis/nodejs-pubsub has had otel support via message attributes for about 4 years now and I'd love to have an officially supported way to pass parent trace context through PubSub in Python.

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/python-pubsub API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests