Skip to content

Commit bc4b3d0

Browse files
committed
docs/reference/migration: add more options that have counterparts in OTel
1 parent 0434c41 commit bc4b3d0

File tree

1 file changed

+41
-6
lines changed

1 file changed

+41
-6
lines changed

docs/reference/edot-python/migration.md

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,32 @@ The following are Elastic APM Python agent settings that you can migrate to EDOT
3434

3535
### `api_key`
3636

37-
The Elastic [`api_key`](apm-agent-python://reference/configuration.md#config-api-key) option corresponds to the OpenTelemetry [OTEL_EXPORTER_OTLP_HEADERS](https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_headers) option.
37+
The Elastic [`api_key`](apm-agent-python://reference/configuration.md#config-api-key) option corresponds to the OpenTelemetry [OTEL_EXPORTER_OTLP_HEADERS](https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_headers) environment variable.
3838

3939
For example: `OTEL_EXPORTER_OTLP_HEADERS="Authorization=ApiKey an_api_key"`.
4040

41+
### `capture_headers`
42+
43+
The Elastic [`capture_headers`](apm-agent-python://reference/configuration.md#config-capture-headers) option corresponds to the OpenTelemetry Python `OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_REQUEST` and `OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_RESPONSE` environment variables, see [OpenTelemetry documentation](https://github.com/open-telemetry/opentelemetry.io/edit/main/content/en/docs/zero-code/python/example.md/#capture-http-request-and-response-headers).
44+
45+
For sanitization of these captured headers you can use the `OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SANITIZE_FIELDS` environment variable.
46+
For example `OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SANITIZE_FIELDS=".*session.*,set-cookie"` will replace the value of headers such as `session-id` and `set-cookie` with `[REDACTED]` in the span.
47+
48+
### `cloud_provider`
49+
50+
The Elastic [`cloud_provider`](apm-agent-python://reference/configuration.md#config-cloud-provider) option corresponds to listing individual resource detectors using the OpenTelemetry Python `OTEL_EXPERIMENTAL_RESOURCE_DETECTORS` environment variable, see [default value of OTEL_EXPERIMENTAL_RESOURCE_DETECTORS](/reference/edot-python/setup/configuration.md##differences-from-opentelemetry-python). The default value is dynamic based on the platform and is analogous to `auto`.
51+
52+
### `django_autoinsert_middleware`
53+
54+
The Elastic [`django_transaction_name_from_route`](apm-agent-python://reference/configuration.md#config-django-autoinsert-middleware) option does not have a correspondant option but is enabled by default in OpenTelemetry Python.
55+
56+
### `django_transaction_name_from_route`
57+
58+
The Elastic [`django_transaction_name_from_route`](apm-agent-python://reference/configuration.md#config-django-transaction-name-from-route) option does not have a correspondant option but is enabled by default in OpenTelemetry Python.
59+
4160
### `enabled`
4261

43-
The Elastic [`enabled`](apm-agent-python://reference/configuration.md#config-enabled) option corresponds to the OpenTelemetry [OTEL_SDK_DISABLED](https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#general-sdk-configuration) option.
62+
The Elastic [`enabled`](apm-agent-python://reference/configuration.md#config-enabled) option corresponds to the OpenTelemetry [OTEL_SDK_DISABLED](https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#general-sdk-configuration) environment_variable.
4463

4564
### `environment`
4665

@@ -54,25 +73,37 @@ The Elastic [`global_labels`](apm-agent-python://reference/configuration.md#conf
5473

5574
For example: `OTEL_RESOURCE_ATTRIBUTES=alice=first,bob=second`. Such labels will result in resource.attributes.key=value attributes on the server, e.g. resource.attributes.alice=first
5675

76+
### `include_process_args`
77+
78+
The Elastic [`include_process_args`](apm-agent-python://reference/configuration.md#config-include-process-args) option corresponds to include the `ProcessResourceDetector` to `OTEL_EXPERIMENTAL_RESOURCE_DETECTORS` environment variable, see [default value of OTEL_EXPERIMENTAL_RESOURCE_DETECTORS](/reference/edot-python/setup/configuration.md##differences-from-opentelemetry-python).
79+
5780
### `metrics_interval`
5881

59-
The Elastic [`metrics_interval`](apm-agent-python://reference/configuration.md#config-metrics_interval) corresponds to the OpenTelemetry [OTEL_METRIC_EXPORT_INTERVAL](https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#periodic-exporting-metricreader) option.
82+
The Elastic [`metrics_interval`](apm-agent-python://reference/configuration.md#config-metrics_interval) corresponds to the OpenTelemetry [OTEL_METRIC_EXPORT_INTERVAL](https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#periodic-exporting-metricreader) environment variable.
6083

6184
For example: `OTEL_METRIC_EXPORT_INTERVAL=30000`.
6285

86+
### `sanitize_field_names`
87+
88+
The Elastic [`sanitize_field_names`](apm-agent-python://reference/configuration.md#config-sanitize-fieldnames) option used not have a complete counterpart, for captured headers sanitization see [capture_headers](#capture-headers).
89+
6390
### `secret_token`
6491

65-
The Elastic [`secret_token`](apm-agent-python://reference/configuration.md#config-secret-token) option corresponds to the OpenTelemetry [OTEL_EXPORTER_OTLP_HEADERS](https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_headers) option.
92+
The Elastic [`secret_token`](apm-agent-python://reference/configuration.md#config-secret-token) option corresponds to the OpenTelemetry [OTEL_EXPORTER_OTLP_HEADERS](https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_headers) environment variable.
6693

6794
For example: `OTEL_EXPORTER_OTLP_HEADERS="Authorization=ApiKey an_apm_secret_token"`.
6895

96+
### `server_timeout`
97+
98+
The Elastic [`server_timeout`](apm-agent-python://reference/configuration.md#config-server-timeout) option corresponds to the OpenTelemetry [`OTEL_EXPORTER_OTLP_TIMEOUT`](https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/#otel_exporter_otlp_timeout) environment variable.
99+
69100
### `server_url`
70101

71-
The Elastic [`server_url`](apm-agent-python://reference/configuration.md#config-server-url) option corresponds to the OpenTelemetry [`OTEL_EXPORTER_OTLP_ENDPOINT`](https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_endpoint) option.
102+
The Elastic [`server_url`](apm-agent-python://reference/configuration.md#config-server-url) option corresponds to the OpenTelemetry [`OTEL_EXPORTER_OTLP_ENDPOINT`](https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/#otel_exporter_otlp_endpoint) environment variable.
72103

73104
### `service_name`
74105

75-
The Elastic [`service_name`](apm-agent-python://reference/configuration.md#config-service-name) option corresponds to the OpenTelemetry [OTEL_SERVICE_NAME](https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/#otel_service_name) option.
106+
The Elastic [`service_name`](apm-agent-python://reference/configuration.md#config-service-name) option corresponds to the OpenTelemetry [OTEL_SERVICE_NAME](https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/#otel_service_name) environment variable.
76107

77108
You can also set the service name using [OTEL_RESOURCE_ATTRIBUTES](https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/#otel_resource_attributes).
78109

@@ -84,6 +115,10 @@ The Elastic [`service_version`](apm-agent-python://reference/configuration.md#co
84115

85116
For example: `OTEL_RESOURCE_ATTRIBUTES=service.version=1.2.3`.
86117

118+
### `transaction_ignore_patterns` and `transaction_ignore_urls`
119+
120+
The Elastic [`transaction_ignore_patterns`](apm-agent-python://reference/configuration.md#config-transaction-ignore-patterns) and [`transaction_ignore_urls`](apm-agent-python://reference/configuration.md#config-transaction-ignore-urls) options correspond to setting the [OTEL_PYTHON_EXCLUDED_URLS](https://opentelemetry.io/docs/zero-code/python/configuration/#excluded-urls) environment variable.
121+
87122
## Performance overhead
88123

89124
Evaluate the [differences in performance overhead](/reference/edot-python/overhead.md) between EDOT Python and Elastic APM Python agent.

0 commit comments

Comments
 (0)