Get started
editGet started
editThis guide assumes you’ve already instrumented your services with the OpenTelemetry API and/or SDK. If you haven’t, see the Elastic APM install and run guide to get started with Elastic APM Agents instead.
Plan your deployment
editOpenTelemetry Collectors can be run as an Agent, or as standalone collectors. They can be deployed as often as necessary and scaled up or out.
Deployment planning resources are available in OpenTelemetry’s Getting Started documentation, and Collector Performance research.
Download the collector
editThe Elastic exporter lives in the opentelemetry-collector-contrib repository
,
and the latest release can be downloaded from GitHub releases page.
Docker images are available on dockerhub:
docker pull otel/opentelemetry-collector-contrib-dev
You can also build the collector-contrib repository by cloning it and running:
make otelcontribcol
Configure the collector
editCreate a yaml
configuration file.
At a minimum, you must define the URL of the APM Server instance you are sending data to. For example:
exporters: elastic: apm_server_url: "https://elasticapm.example.com"
See the configuration reference for additional configuration options, like specifying an API key, secret token, or TLS settings.
The Elastic exporter must also be defined in service.pipelines.traces.exporters
.
For example:
service: pipelines: traces: exporters: [elastic]
If we put everything together, here’s an example configuration file that accepts input from an OpenTelemetry Agent, processes the data, and sends it to an Elasticsearch Service instance.
receivers: otlp: endpoint: localhost:55680 processors: batch: timeout: 1s send_batch_size: 1024 exporters: elastic: apm_server_url: "https://elasticapm.example.com" secret_token: "ESS_TOKEN" service: pipelines: traces: receivers: [otlp] processors: [batch] exporters: [elastic]
For more information about getting started with an OpenTelemetry Collector, see the OpenTelemetry collector docs.