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

[Heartbeat] Cross linking APM with Synthetics #36249

Open
vigneshshanmugam opened this issue Aug 5, 2023 · 2 comments
Open

[Heartbeat] Cross linking APM with Synthetics #36249

vigneshshanmugam opened this issue Aug 5, 2023 · 2 comments
Labels
enhancement Heartbeat Stalled Team:obs-ds-hosted-services Label for the Observability Hosted Services team

Comments

@vigneshshanmugam
Copy link
Member

vigneshshanmugam commented Aug 5, 2023

Describe the enhancement:

As part of the Crosslinking effort in associating the trace from the Synthetics waterfall to the relevant APM data and vice versa, we need to inject specific information from the Heartbeat side to the underlying Synthetics agent to propagate the information to the downstream services

Meta issue - https://github.com/elastic/apm-dev/issues/1024

Implementation details

To be able to associate a synthetics trace to the APM trace details and also make this account for the future proofing needs, We need to propagate the following information.

  1. ELASTIC_SYNTHETICS_MONITOR_ID - monitor id of the synthetics monitor
  2. ELASTIC_SYNTHETICS_TRACE_ID - checkgroup/exec that begins the synthetics journey, distinct for HTTP monitors
  3. ELASTIC_SYNTHETICS_MONITOR_LOCATION - location where the synthetics monitor is run from
  4. ELASTIC_SYNTHETICS_MONITOR_TYPE - type of the synthetics monitor (browser, http, tcp, etc)
  5. Sampling decision - Transaction sampling rate with default being all are sampled.

Relevant PR on the synthetics agent side for browser monitors - elastic/synthetics#595

HTTP monitors

  • Heartbeat would do the heavy lifting for the HTTP based monitors and add the baggage and tracestate headers as the synthetics agent is not involved for these tests.

Config Options

  • trace_urls - urls where relevant headers would be propagated to the downstream services via the baggage header .
  • sample_rate - sampling decision that will be propagated via the tracestate header.
heartbeat.monitors: 
  - type: lightweight
     apm:
        sample_rate: 1 //ranges from [0,1] 

  - type: browser
     apm:
        trace_urls: ["**/*", "api/**"] // glob or RegExp patterns
        sample_rate: 0.5

NOTE: It will be APM agents responsibility to add these baggage and tracestate information to all the transactions and error data which will be indexed to ES by the APM server.

Relevant Issues on APM

@vigneshshanmugam vigneshshanmugam added the Team:obs-ds-hosted-services Label for the Observability Hosted Services team label Aug 5, 2023
@elasticmachine
Copy link
Collaborator

Pinging @elastic/uptime (Team:Uptime)

@botelastic
Copy link

botelastic bot commented Aug 4, 2024

Hi!
We just realized that we haven't looked into this issue in a while. We're sorry!

We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1.
Thank you for your contribution!

@botelastic botelastic bot added the Stalled label Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Heartbeat Stalled Team:obs-ds-hosted-services Label for the Observability Hosted Services team
Projects
None yet
Development

No branches or pull requests

2 participants