elastic / apm-agent-java

https://www.elastic.co/guide/en/apm/agent/java/current/index.html
Apache License 2.0
567 stars 319 forks source link

System on service map is not connected #2290

Closed ghost closed 2 years ago

ghost commented 2 years ago

Describe the bug

We are currently using v1.27.0 of the JVM agent with a reactive configuration. When inspecting a trace over multiple teams we can see our system in the "Trace Sample" chain. Our system is connected to a AWS SQS.

On the other hand we do not see our system connected to the AWS SQS on the service map. We encountered this issue often. We have seen our system to be connected in v.1.26.0, but this could be a misleading conclusion.

The referred system has tracing on 100% so every trace for this SQSListener should have data. There should be no missing data, which could lead to a misrepresentation on the service map.

SylvainJuge commented 2 years ago

Hi @kamilwozniak4213 ,

So if I understand correctly:

Can you please clarify the following:

ghost commented 2 years ago

Hi @SylvainJuge,

So if I understand correctly:

Can you please clarify the following:

SylvainJuge commented 2 years ago

From what I understand you might be using the agent API to capture and create your own transactions and spans, is that correct ? This is what allows you to selectively instrument only reception of messages and not when sending them.

When receiving messages, a transaction should be created, which is what you appear to be already doing.

When sending messages within a transaction (thus creating a span), you can use the destination resource, this is later used to build the map links from Spans.

However, for Transactions we don't have an API and related field to store the upstream "origin" of the message yet.

ghost commented 2 years ago

Hi @SylvainJuge

However, for Transactions we don't have an API and related field to store the upstream "origin" of the message yet.

Are there any plans for this feature?

SylvainJuge commented 2 years ago

Not in the short/mid-term of the Java agent roadmap for now, but it's definitely something that we will have to provide at some point.

However, we already have the service.origin.* fields that are part of the 8.0 ECS schema (see spec) which is the spec for the data model used by Elastic products including APM.

ghost commented 2 years ago

Thank you for the info