Jaeger integration
editJaeger integration
editThis 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 started
editConnect your preexisting Jaeger setup to Elastic APM in three steps:
There are caveats to this integration.
Configure Jaeger agents
editAPM Server serves Jaeger gRPC over the same host and port as the Elastic APM agent protocol.
- 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.
-
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 APM Server as a collector for your Jaeger agents.
As of this writing, the Jaeger agent binary offers the
--reporter.grpc.host-port
CLI flag. Use this to define the host and port that APM Server is listening on:--reporter.grpc.host-port=<apm-endpoint:8200>
-
(Optional) Enable encryption
When SSL/TLS is enabled in APM Server, Jaeger agents must also enable TLS communication:
--reporter.grpc.tls.enabled=true
-
(Optional) Enable token-based authorization
A secret token or API key can be used to ensure only authorized Jaeger agents can send data to the APM Server. When enabled, use an agent level tag to authorize Jaeger agent communication with the APM Server:
--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 Sampling
editAPM 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)
editCentral 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.
APM Agent central configuration requires the Kibana endpoint to be configured.
To enable the kibana endpoint, set apm-server.kibana.enabled
to true
,
and point apm-server.kibana.host
at the Kibana host that APM Server will communicate with.
Once configured, visit the Agent configuration page in the APM app to add a new sampling rate.
Local sampling in each Jaeger client
editIf 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 data
editThat’s it! Data sent from Jaeger clients to the APM Server can now be viewed in the APM app.