Skip to content

all: Support OpenTelemetry for traces exported from client methods #4237

Closed

Description

@ahmetb

Right now Cloud client libraries for Go have direct integration with OpenCensus, which is an amazing feature.

However, the Google recommendation is to use OpenTelemetry at this point:

Cloud Trace recommends using OpenTelemetry. OpenTelemetry is an open-source product from the merger between OpenCensus and OpenTracing. ​OpenTelemetry is an open-source product from the merger between OpenCensus and OpenTracing.

(I do not agree with this and I listed why at http://doc/1R82XXlE8dVt1C-kLYRH2gFLVCzSgKiRna0yroZTsjhs which is an internal friction log for reasons.)

Right now, if you use cloud.google.com/go packages but you have instrumented your app using OpenTelemetry, you can get traces using the opencensus-bridge which largely works (you just pay attention to not get yourself in an infinite loop).

So this is not very urgent, however we should probably do this in the long term since OT will be way to Go and it's better to come up with a migration plan (that is graceful to OpenCensus users) sooner than later.

Activity

  1. codyoss commented on Jun 9, 2021

    @codyoss
    Member

    Thanks for the request @ahmetb. I am going to close this issue in favor of #4234 which was opened just earlier today. If you want to add extra details in that issue feel free 😄

  2. ahmetb commented on Jun 9, 2021

    @ahmetb
    ContributorAuthor

    They don't look like the same thing though? That's about instrumenting streaming RPCs, this is about using a different instrumentation framework. @codyoss

  3. codyoss commented on Jun 9, 2021

    @codyoss
    Member

    Yes they are different but I guess I see them as getting, most likely, solved at the same time with a wholistic approach. I will reopen this issue for now though.

  4. reopened this on Jun 9, 2021
  5. added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    on Jun 9, 2021
  6. self-assigned this
    on Jun 9, 2021
  7. DONSA commented on Jun 17, 2021

    @DONSA

    The fact that Spanner is still integrating with OpenCensus is the reason why we haven't moved to OpenTelemetry yet.

  8. dustinmoris commented on Aug 30, 2023

    @dustinmoris

    Hello, just wondering what the current status is of this work? If it is tracked somewhere publicly would it be possible to add a link here so we can see how far this issue has progressed since it was opened more than 2 years ago?

  9. quartzmo commented on Aug 30, 2023

    @quartzmo
    Member

    @dustinmoris Are you currently using the Go client libraries in an application that you wish to migrate to OpenTelemetry? If so, have you tried using the OpenTelemetry-Go - OpenCensus Bridge?

  10. dustinmoris commented on Aug 31, 2023

    @dustinmoris

    I will try that, thanks for making me aware of the bridge. Still wondering when all the Go GCP libraries will natively integrate with OpenTelemetry since OpenCensus has been superseded by OpenTelemetry. If the bridge works it's obviously not a super pressing issue, but nevertheless would be nice to know a rough plan of when you think this will be delivered?

  11. quartzmo commented on Aug 31, 2023

    @quartzmo
    Member

    Hopefully we will be able to announce a timeline soon for OpenTelemetry tracing support, but we can't promise any specific timeline yet.

    If you get the chance to try out the bridge with a production application, please post a short summary of your experience here. I recently tried it myself in a demo app with Cloud Trace as the backend. I did not have any problems, but I would love to get wider confirmation from users of the Google Cloud Go client libraries.

    Here are some resources:

  12. dustinmoris commented on Sep 3, 2023

    @dustinmoris

    I've added the OpenCencus Bridge last night and so far it's looking good. 👍

  13. StevenACoffman commented on Sep 14, 2023

    @StevenACoffman

    FWIW The OpenCensus Bridge is working well in our GKE workloads at Khan Academy.

  14. quartzmo commented on Jan 11, 2024

    @quartzmo
    Member

    Please see timeline and instructions for transition to OpenTelemetry tracing here:

    https://github.com/googleapis/google-cloud-go/blob/main/debug.md#opencensus

  15. sonatard commented on Feb 16, 2024

    @sonatard

    @quartzmo Hi! Are you saying that the OpenCensus Bridge is no longer needed, and by just setting GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING=opentelemetry, one can record traces for Spanner and Storage? Or even with GOOGLE_API_GO_EXPERIMENTAL_TELEMETRY_PLATFORM_TRACING=opentelemetry specified, is the OpenCensus Bridge still required?

  16. quartzmo commented on Jun 10, 2024

    @quartzmo
    Member

    @sonatard OpenCensus Bridge is only needed to support components in your application other than these client libraries that use OpenCensus. The Go client libraries now use OpenTelemetry by default. See https://github.com/googleapis/google-cloud-go/blob/main/debug.md#opencensus for more details.

  17. codyoss commented on Jul 2, 2024

    @codyoss
    Member

    As this is now the default I will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    ⌂ 换网址