elastic / elastic-agent

Elastic Agent - single, unified way to add monitoring for logs, metrics, and other types of data to a host.
Other
124 stars 134 forks source link

Use APM instrumentation to track Fleet Checkin requests #2517

Open pchila opened 1 year ago

pchila commented 1 year ago

Perhaps as a backlog item we should track this ID in APM instrumentation; we could add it as the request ID to track it in fleet-server as well. What do you think?

_Originally posted by @michel-laterman in https://github.com/elastic/elastic-agent/pull/2408#discussion_r1168828026_

PR #2408 introduced uuids associated to fleet checkin request in order to help with debugging of multiple requests being launched/cancelled. This id does not hold a specific meaning in elastic agent so we can use a span id for it with the additional advantage that we can track such spans across network boundaries as well.

AndersonQ commented 1 year ago

Just one thing, I haven't checked the details of our implementation, but what I saw in the past, on other APMs, was that if the APM instrumentation isn't enabled, you could still get a span and span ID, but it'd be a zero value id, like 000...0. Therefore you might end put not really tracking what you want. Besides most of the time the APM isn't enabled, making it even less effective.