Repository navigation
ref(cli): Template telemetry endpoints with the API catalog's paths #2229
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
Open
sentry-junior
wants to merge
2
commits into
bt/code-mode-path-matcher
from
fix/cli-telemetry-catalog-templates
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
Should this also come from the
@sentry/apipackage? We can make it happenThere 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.
Yes, I think it should.
@sentry/apidoesn't export the API prefix today, in 0.428.0 on this branch or 1.59.0 onmain. Toolkit defines"/api/0"privately in three places:toolkit-core/src/api-client/core.ts,cli/src/commands/api.ts, and nowerror-reporting.ts. An export from@sentry/api, for example next tobuildSentryApiUrl, would let all three share it.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.
Well then, make it happen. Ideally this would come all the way from the source in getsentry/sentry so we don't drift.
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.
I looked at what it would take to source this from the spec:
serversentry is justhttps://{region}.sentry.io./api/0is spelled out at the start of every path in the spec, so the prefix isn't a separate field there today.@sentry/api): the prefix is private there too. It's aconst API_PREFIXinlib/api-client/core.ts, plus hard-coded/api/0/inapi-path.tsandapi-path-scope.ts.To avoid drift,
sentry-api-schemacould derive the prefix from the spec's paths at build time and export it. toolkit's three copies would then import it. Moving/api/0intoserversin getsentry/sentry would also work, but it changes the spec for every client.This is a change in other repos, so I'm checking the scope with @betegon before I start. I'll leave this thread open until then.