Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Fix: Sidecar URL issues fixed across spotlight #558
Fix: Sidecar URL issues fixed across spotlight #558
Changes from 1 commit
8cae97c
856dd15
278aa28
9abb991
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Speaking of hypocrisy... 😅 -- Same comment above, we should probably use some sort of a URL builder at this point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah lets use
new URL()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we go back to the
url.origin
we are not solving the problem reported in #524 as they want to be able to use the sidecar under a main root URL. That means we should let go of using.origin
and slice the path up and just strip the last/stream
to get the "root" sidecar URL. Makes sense?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like this should be the ground truth for the sidecarURL and we should not have anything stored in
sentryDataCache
regarding the URL?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @BYK, could you please explain what you meant here?
The sidecarURL is either provided by the user or defaults to a pre-set URL, and then it's passed here in this file. Ideally, to use the sidecarURL effectively, we should store it somewhere.
Are you suggesting that instead of storing it in SentryDataCache, we should store it somewhere else, like in a context, so that other integrations can also access the sidecarURL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No no no definitely not. The SDKs expect the
/stream
part and at this point we should keep it that way unfortunately.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, but ideally we should just ask for sidecar url.
I know initially, we were only having stream url i.e. why i guess we asked for stream url directly.
let me think if we could do something to support /stream url as well here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Shubhdeep12 I think a cheap hack is to see if we have the URL ending with
/stream
and try to guess from there.That said not having the
/stream
part in the SDKs is a no go, as it requires us to change all existing SDKs to support this and have a fallback or cut a major release. Don't want either so that ship seems to have sailed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I wasn't intending to remove the /stream path. I meant that the user should focus on just sending the sidecarURL while initializing Spotlight. We'll handle which path to use for different cases, like:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do this-
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just pushed this, let me know your thoughts on this.