You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/edot-python/migration.md
+41-6Lines changed: 41 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,13 +34,32 @@ The following are Elastic APM Python agent settings that you can migrate to EDOT
34
34
35
35
### `api_key`
36
36
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.
38
38
39
39
For example: `OTEL_EXPORTER_OTLP_HEADERS="Authorization=ApiKey an_api_key"`.
40
40
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
+
41
60
### `enabled`
42
61
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.
44
63
45
64
### `environment`
46
65
@@ -54,25 +73,37 @@ The Elastic [`global_labels`](apm-agent-python://reference/configuration.md#conf
54
73
55
74
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
56
75
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
+
57
80
### `metrics_interval`
58
81
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.
60
83
61
84
For example: `OTEL_METRIC_EXPORT_INTERVAL=30000`.
62
85
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
+
63
90
### `secret_token`
64
91
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.
66
93
67
94
For example: `OTEL_EXPORTER_OTLP_HEADERS="Authorization=ApiKey an_apm_secret_token"`.
68
95
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
+
69
100
### `server_url`
70
101
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.
72
103
73
104
### `service_name`
74
105
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.
76
107
77
108
You can also set the service name using [OTEL_RESOURCE_ATTRIBUTES](https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/#otel_resource_attributes).
78
109
@@ -84,6 +115,10 @@ The Elastic [`service_version`](apm-agent-python://reference/configuration.md#co
84
115
85
116
For example: `OTEL_RESOURCE_ATTRIBUTES=service.version=1.2.3`.
86
117
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
+
87
122
## Performance overhead
88
123
89
124
Evaluate the [differences in performance overhead](/reference/edot-python/overhead.md) between EDOT Python and Elastic APM Python agent.
0 commit comments