Skip to content

Commit

Permalink
Remove bad headers typecast
Browse files Browse the repository at this point in the history
  • Loading branch information
frankh committed Apr 16, 2024
1 parent c4a96f1 commit f6ee732
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion posthog/settings/sentry.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def traces_sampler(sampling_context: dict) -> float:
force_sample = bool(sampling_context.get("wsgi_environ", {}).get("HTTP_FORCE_SAMPLE"))
if os.environ.get("SERVER_GATEWAY_INTERFACE") == "ASGI":
path = sampling_context.get("asgi_scope", {}).get("path")
headers = bool(sampling_context.get("asgi_scope", {}).get("headers"))
headers = sampling_context.get("asgi_scope", {}).get("headers")
for name, value in headers:
if name.lower().replace(b'_',b'-') == "force-sample":
force_sample = bool(value)
Expand Down

0 comments on commit f6ee732

Please sign in to comment.