Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APM] Investigate possibility of using edge metrics to build service map #81454

Closed
dgieselaar opened this issue Oct 22, 2020 · 7 comments
Closed
Labels
Team:APM All issues that need APM UI Team support

Comments

@dgieselaar
Copy link
Member

We currently use an approach where we sample spans based on their fingerprint, via a composite aggregation. In some cases this can be rather slow. We should look into whether we can use service map edge metrics to generate a service map, under the assumption that it will be faster.

@dgieselaar dgieselaar added the Team:APM All issues that need APM UI Team support label Oct 22, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@dgieselaar
Copy link
Member Author

These spans record almost the same information as the spans that we use to build the service map. The following fields are available:

  • service.name
  • span.destination.service.resource
  • span.type
  • span.subtype

However, we also need trace.id, to be able to download the traces in the second request. @elastic/apm-server is this something that we can add to the span metrics? It would help increase performance of the first query, but it doesn't fundamentally change the approach we have (get trace ids, use a scripted metric aggregation to extract connections from the traces).

@jalvz
Copy link
Contributor

jalvz commented Oct 30, 2020

Certainly, feel free to open an issue on apm-server 👍

@dgieselaar
Copy link
Member Author

elastic/apm-server#4371

@axw
Copy link
Member

axw commented Oct 30, 2020

However, we also need trace.id, to be able to download the traces in the second request

What's missing from the span metrics that you extract from trace events? If possible I think we should consider moving away from walking traces, and instead store enough information in the metrics to reconstruct the aggregated graph structure.

@dgieselaar
Copy link
Member Author

@axw Without a trace ID we can't get paths, only connections (one hop downstream). Agree that storing the path (somewhere) is a better approach, as this is essentially just a performance optimisation of an untenable strategy (walking traces).

@dgieselaar
Copy link
Member Author

As it stands, span (service map edge) metrics are not sufficient to build a service map. Discussion continues in elastic/apm#364.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:APM All issues that need APM UI Team support
Projects
None yet
Development

No branches or pull requests

6 participants