Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

PubSub Tracing in Spring

Hi community,

I'm trying to trace PubSub messaging across different Spring microservices. We are running two Spring microservices on GKE. Service 1 publishes to PubSub and Service 2 subscribes to the same topic. We use the spring-cloud-gcp-trace lib for Tracing in our services. 

I see two approaches to trace PubSubMessages 

  1. OpenTelemetry Tracing in the Publisher & Subscriber https://cloud.google.com/pubsub/docs/open-telemetry-tracing
  2. Using TracePubSubAutoConfiguration with spring-cloud-gcp-trace

There are no examples for the second option. With option 1 I see an examples where I can trace the message from the publisher to subscriber with time spent in the client libraries. But with option 2 I'm not sure if we will be able to do that. As the spring-cloud-gcp-trace uses Brave instrumentation and not necessarily OpenTelemetry,

The questions are

  1. 1. Are these two different things and can coexist?
  2. Can I use the trace lib to get the kind of tracing I would get from the open telemetry option?

Thanks

Kishore

0 0 241
0 REPLIES 0