Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Used the wrong escape character '\'? #12391

Open
Nomango opened this issue Jan 20, 2025 · 1 comment
Open

Used the wrong escape character '\'? #12391

Nomango opened this issue Jan 20, 2025 · 1 comment

Comments

@Nomango
Copy link

Nomango commented Jan 20, 2025

SDK

Python SDK

Description

For example, in this document, there is a backslash in the regular expression string.

import sentry_sdk

sentry_sdk.init(
    dsn="xxx",
    trace_propagation_targets=[
        "https://myproject.org",
+       "https://.*\.otherservice.org/.*",
    ],
    # ...
)

Suggested Solution

Use raw string instead

import sentry_sdk

sentry_sdk.init(
    dsn="xxx",
    trace_propagation_targets=[
        "https://myproject.org",
-       "https://.*\.otherservice.org/.*",
+       r"https://.*\.otherservice.org/.*",
    ],
    # ...
)
@getsantry
Copy link
Contributor

getsantry bot commented Jan 20, 2025

Assigning to @getsentry/support for routing ⏲️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Support
Development

No branches or pull requests

1 participant