Jaeger integrationedit

This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.

Elastic APM integrates with Jaeger, an open-source, distributed tracing system. This integration allows users with an existing Jaeger setup to switch from the default Jaeger backend, to the Elastic Stack — transform data with APM Server, store data in Elasticsearch, and visualize traces in the Kibana APM app. Best of all, no instrumentation changes are needed in your application code.

Get startededit

Connect your preexisting Jaeger setup to Elastic APM in three steps:

There are caveats to this integration.

Configure Jaeger agentsedit

APM Server serves Jaeger gRPC over the same host and port as the Elastic APM agent protocol.

  1. Log into Elastic Cloud and select your deployment. Copy your APM endpoint and APM Server secret token; you’ll need these in the next step.
  2. Configure APM Server as a collector for your Jaeger agents.

    As of this writing, the Jaeger agent binary offers the following CLI flags, which can be used to enable TLS, output to Elastic Cloud, and set the APM Server secret token:

    --reporter.grpc.tls.enabled=true
    --reporter.grpc.host-port=<apm-endpoint:443>
    --agent.tags="elastic-apm-auth=Bearer <secret-token>"

For the equivalent environment variables, change all letters to upper-case and replace punctuation with underscores (_). See the Jaeger CLI flags documentation for more information.

Configure Samplingedit

APM Server supports probabilistic sampling, which can be used to reduce the amount of data that your agents collect and send. Probabilistic sampling makes a random sampling decision based on the configured sampling value. For example, a value of .2 means that 20% of traces will be sampled.

There are two different ways to configure the sampling rate of your Jaeger agents:

APM Agent central configuration (default)edit

Central sampling, with APM Agent central configuration, allows Jaeger clients to poll APM Server for the sampling rate. This means sample rates can be configured on the fly, on a per-service and per-environment basis.

Visit the Agent configuration page in the APM app to add a new sampling rate.

Local sampling in each Jaeger clientedit

If you don’t have access to the APM app, you’ll need to change the Jaeger client’s sampler.type and sampler.param. This enables you to set the sampling configuration locally in each Jaeger client. See the official Jaeger sampling documentation for more information.

Start sending span dataedit

That’s it! Data sent from Jaeger clients to the APM Server can now be viewed in the APM app.