r/OpenTelemetry • u/Abi9988 • 1h ago
OpenTelemetry Python contrib 0.66b3 redacts presigned S3 URLs in spans. Checked in Splunk APM: signed values in all 10 download traces on 0.66b2, none on 0.66b3.
If a Python service fetches S3 presigned URLs with requests, the signature, key ID and session token can end up in your traces. opentelemetry-python-contrib 0.66b3 redacts X-Amz-Signature, X-Amz-Credential and X-Amz-Security-Token.
I ran the same downloads through a zero-code Flask service under gunicorn on EKS, on 0.66b2 and on 0.66b3, two runs each, and read every trace back from Splunk APM by trace ID:
- 0.66b2: url.full on the requests span held all three in clear, and url.query and http.target on the server span held signed values, in all 10 download traces.
- 0.66b3: REDACTED in all four attributes for all 10 downloads that reached S3. Bucket, object key, X-Amz-Date and X-Amz-Expires stayed readable.
- Spans stored before the upgrade keep their values.
- One gap: when the request fails to connect, exception.message, exception.stacktrace and otel.status_description on the client span still held a signed value on 0.66b3.
Setup: Flask 3.1.3, gunicorn 23.0.0, requests 2.34.2, boto3 signing with a placeholder key (no real secret, so S3 answered 403), Splunk OTel Collector chart 0.163.1.
Write-up with every lab file:
https://showmerit.com/abhimanyu/articles/presigned-s3-urls-in-splunk-apm-what-opentelemetry-python-0/
Has anyone handled the failed-request case, for example with a span processor?
I work at Splunk, part of Cisco.