Skip to content

Commit 855ef55

Browse files
mergify[bot]xrmx
andauthored
observability/apm: reduce python specific doc for OTEL_EXPORTER_OTLP_HEADERS (#4280) (#4295)
* observability/apm: reduce python specific doc for OTEL_EXPORTER_OTLP_HEADERS Special treatment of headers is not needed anymore since latest release so reduce the text to a note. * Looks like callouts do not work in tables * Update docs/en/observability/apm/otel-direct.asciidoc Co-authored-by: Colleen McGinnis <[email protected]> --------- Co-authored-by: Colleen McGinnis <[email protected]> (cherry picked from commit 53aaf31) Co-authored-by: Riccardo Magliocchetti <[email protected]>
1 parent 60c0c8b commit 855ef55

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

docs/en/observability/apm/otel-direct.asciidoc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,7 @@ For information on how to format an API key, see
126126

127127
Please note the required space between `Bearer` and `an_apm_secret_token`, and `ApiKey` and `an_api_key`.
128128

129-
The Python OpenTelemetry agent requires the content of the header to be URL-encoded. For the `Bearer` token that would mean substituting the space between `Bearer` and the token with `%20`, e.g. `"Authorization=Bearer%20an_apm_secret_token"`, for encoding an API key you can use the following snippet:
130-
131-
[source,python]
132-
----
133-
from urllib.parse import quote
134-
quote("ApiKey an_api_key")
135-
----
129+
NOTE: If you are using a version of the Python OpenTelemetry agent _before_ 1.27.0, the content of the header _must_ be URL-encoded. You can use the Python standard library's `urllib.parse.quote` function to encode the content of the header.
136130

137131
| `OTEL_METRICS_EXPORTER` | Metrics exporter to use. See https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#exporter-selection[exporter selection] for more information.
138132

0 commit comments

Comments
 (0)