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

ref: span normalization allowed host config #3245

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aldy505
Copy link
Collaborator

@aldy505 aldy505 commented Aug 4, 2024

Waiting for PR on sentry to be merged first: getsentry/sentry#74195

Relay PR: getsentry/relay#3813
Feature request issues: getsentry/relay#3572 and getsentry/relay#3573

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Copy link

codecov bot commented Aug 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.01%. Comparing base (3cf3238) to head (4bbd04c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3245   +/-   ##
=======================================
  Coverage   99.01%   99.01%           
=======================================
  Files           3        3           
  Lines         203      203           
=======================================
  Hits          201      201           
  Misses          2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Barsoomx
Copy link

For those who jumped on enabling this today(don't):
getsentry/relay#3936

@aldy505
Copy link
Collaborator Author

aldy505 commented Aug 16, 2024

For those who jumped on enabling this today(don't): getsentry/relay#3936

😆 Sorry about that!

@Barsoomx
Copy link

Barsoomx commented Aug 16, 2024

For those who did that anyway and trying to revert but relay keeps fetching the old config:

(resetting/changing the option in sentry.conf.py keeps it in cache and the errors continue)

relay-1  | {"timestamp":"2024-08-16T08:09:43.045065Z","level":"ERROR","message":"Error deserializing global config option: relay_dynamic_config::global::Options","error":"expected `,` or `}` at line 1 column 24783","target":"relay_dynamic_config::global","filename":"relay-dynamic-config/src/global.rs","line_number":365}
relay-1  | {"timestamp":"2024-08-16T08:09:43.045271Z","level":"ERROR","message":"failed to fetch global config from upstream","error":"could not send request","target":"relay_server::services::global_config","filename":"relay-server/src/services/global_config.rs","line_number":337}

Do this:

docker exec -ti sentry-web-1 bash
from sentry import options
options.get("relay.span-normalization.allowed_hosts")

Verify it's set to your "broken" value

>>> options.get("relay.span-normalization.allowed_hosts")
['cloudflarestorage.com', 'yourdomain.com']

Then you can delete it so it's reset on next call

>>> options.delete("relay.span-normalization.allowed_hosts")
True
>>> options.get("relay.span-normalization.allowed_hosts")
[]

Now relay should fetch the correct config:

relay-1  | {"timestamp":"2024-08-16T08:12:54.213680Z","level":"INFO","message":"received global config from upstream","target":"relay_server::services::global_config","filename":"relay-server/src/services/global_config.rs","line_number":317}

Hope that spares someone an hour (or more)

@aldy505
Copy link
Collaborator Author

aldy505 commented Sep 3, 2024

@Barsoomx the fix is merged and available on Dockerhub if you want to try it. I'm going to try this in a few hours.

Use this tag for relay: getsentry/relay:87357fb5e50c9e7e47111709b8a345e778231961 (link: https://hub.docker.com/layers/getsentry/relay/87357fb5e50c9e7e47111709b8a345e778231961/images/sha256-b3ab1bc8336c318d540a610fa2b884ba482f7e252c7b2a14a8129c0f6756afd3?context=explore)

@aldy505
Copy link
Collaborator Author

aldy505 commented Sep 3, 2024

@hubertdeng123 tested on my instance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants