Skip to content

Latest commit

 

History

History
102 lines (65 loc) · 6.26 KB

migrate.md

File metadata and controls

102 lines (65 loc) · 6.26 KB

Migrate to the Elastic distribution

This documentation describes how to update applications using the Elastic APM Java agent to use the Elastic Distribution of OpenTelemetry Java (EDOT Java).

Start by installing EDOT Java following the steps outlined in Get started. Then update existing APM Java agent configuration options in your application with the equivalent OpenTelemetry SDK configuration variables (listed below).

Option reference

This is a list of all APM Java agent configuration options grouped by their category. Select one of the following for more information.

Elastic to OpenTelemetry mapping

server_url

The Elastic server_url option corresponds to the OpenTelemetry OTEL_EXPORTER_OTLP_ENDPOINT option.

server_urls

The Elastic server_urls option has no equivalent OpenTelemetry option - you can only specify one endpoint. Use OTEL_EXPORTER_OTLP_ENDPOINT instead.

secret_token

The Elastic secret_token option corresponds to the OpenTelemetry OTEL_EXPORTER_OTLP_HEADERS option. For example: OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer an_apm_secret_token".

api_key

The Elastic api_key option corresponds to the OpenTelemetry OTEL_EXPORTER_OTLP_HEADERS option. For example:OTEL_EXPORTER_OTLP_HEADERS="Authorization=ApiKey an_api_key".

service_name

The Elastic service_name option corresponds to the OpenTelemetry OTEL_SERVICE_NAME option. The service name value can also be set using OTEL_RESOURCE_ATTRIBUTES. For example: OTEL_RESOURCE_ATTRIBUTES=service.name=myservice. If OTEL_SERVICE_NAME is set, it takes precedence over the resource attribute.

enabled

The Elastic enabled option corresponds to the OpenTelemetry OTEL_JAVAAGENT_ENABLED option.

service_version

The Elastic service_version option corresponds to setting the service.version key in OTEL_RESOURCE_ATTRIBUTES. For example: OTEL_RESOURCE_ATTRIBUTES=service.version=1.2.3.

environment

The Elastic environment option corresponds to setting the deployment.environment key in OTEL_RESOURCE_ATTRIBUTES. For example: OTEL_RESOURCE_ATTRIBUTES=deployment.environment=testing.

global_labels

The Elastic global_labels option corresponds to adding key=value comma separated pairs in OTEL_RESOURCE_ATTRIBUTES. For example: OTEL_RESOURCE_ATTRIBUTES=alice=first,bob=second. Such labels will result in labels.key=value attributes on the server, e.g. labels.alice=first