Skip to content

Baggage creation breaks external APIs #1717

@raphaelm

Description

@raphaelm

How do you use Sentry?

Self-hosted/on-premise

Version

1.10.1

Steps to Reproduce

I just spent literal 5 hours debugging a very weird issue in our production system. A specific API call to an external system started to return an error code 400.

After a long search, I could pinpoint the change to our recent upgrade of sentry-sdk, and specifically to this pull request: #1589

Starting from 1.9.8, Sentry will add a Baggage request to all external HTTP targets we call with requests.get() by default. I'm sure this is really helpful when calling internal systems that are also sentry-instrumented, but in our case we happen to call an external API that happens to break when it sees that header.

Our temporary solution is now to set propagate_traces=False, which is sad, because it also breaks propagation to useful targets (such as celery). We'd very much appreciate a more detailed way to configure this.

Expected Result

Sentry is not modifying requests to external APIs by default.

Actual Result

Sentry is adding a Baggage header to requests to external APIs even though we never asked for it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions