opentelemetry-java-instrumentation icon indicating copy to clipboard operation
opentelemetry-java-instrumentation copied to clipboard

Enable opentelemetry-api and opentelemetry-instrumentation-annotations even when default-enabled is false

Open trask opened this issue 3 years ago • 3 comments

Based on @laurit's suggestion https://cloud-native.slack.com/archives/C0150QF88FL/p1668593837751519?thread_ts=1668521229.495469&cid=C0150QF88FL

This has been a source of confusion on multiple occasions.

also related: https://opentelemetry.io/docs/instrumentation/java/automatic/agent-config/#enable-manual-instrumentation-only

trask avatar Nov 16 '22 17:11 trask

@carolabadeer can you please look into this?

dyladan avatar May 15 '24 16:05 dyladan

I see a link on /receive trace to /send trace but I see that regardless of sqsExtractContextPropagationFromPayload being true or false.

In SQS the receive span is not a child of the send span. Because you can only get a batch it would be required to have multiple parents in order to make that work. The option you referenced only changes the mechanism used to get the context from the send to the receive span. This is required in some cases where MessageAttributes are not propagated by SQS/SNS. They are linked together using span links which is correct according to the current semantic convention. I believe this is working as intended.

dyladan avatar Aug 28 '24 16:08 dyladan

You can read more about the SNS/SQS integration here https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/plugins/node/opentelemetry-instrumentation-aws-sdk/doc/sns.md#integration-with-sqs

dyladan avatar Aug 28 '24 16:08 dyladan

@arun0009 does this answer your question? :thinking:

pichlermarc avatar Sep 04 '24 16:09 pichlermarc

Yes, but I'm not sure if I can search for child traces that get spawned by this parent in Jaeger or New Relic? I posted this on Jaeger org as well. Feel free to close this if its not relevant.

arun0009 avatar Sep 06 '24 17:09 arun0009