GoogleCloudPlatform / opentelemetry-operations-java

Apache License 2.0
71 stars 41 forks source link

<Question> Query on Trace ID propogation ? #326

Closed Santosh-Kumar-Perumal closed 3 months ago

Santosh-Kumar-Perumal commented 4 months ago

If we have auto instrumentation enabled for two applications with the below approach in the cloud trace do I see same Trace ID for both these applications? Basically, trying to understand if the Trace ID is propagated through the services when I run an end-to-end flow having unique Trace ID make sense while debugging the cloud traces.

https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/tree/main/exporters/auto

psx95 commented 4 months ago

Trace ID should be propagated when using auto-exporter with auto-instrumentation. Can you share your approach and exact problem you're running into ?

Santosh-Kumar-Perumal commented 4 months ago

In my case I am not able to see the Trace ID propagated as I have a composer DAG in between these two applications. So I understand I should also instrument composer.

Flow Composer DAG -> Calls Application 1 (Auto instrumented) In sequence once the Application 1 gives response back to Composer DAG the same DAG calls Application 2 (Auto instrumented)

I mean to say though both of my Java Application 1 and 2 is auto instrumented they are not called immediately as I have a composer In between which calls them.

psx95 commented 4 months ago

I see, thanks for providing the details.

I think this has more to do with the Apache Airflow/Cloud Composer support for OpenTelemertry rather than adding support to the gcp-propagator in this repository.

I saw an open issue in the Apache Airflow's Github repository for adding support for OTel traces, which makes me think that currently, OTel traces are not yet supported in Cloud Composer. Perhaps this question could be better answered by the Cloud Composer/Apache Airflow community.

Santosh-Kumar-Perumal commented 3 months ago

Thanks @psx95 for confirming that OTel traces are not yet supported in Cloud Composer.