-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat(dev): App reference Spotlight specs for SDKs #15493
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
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
) ## DESCRIBE YOUR PR November 12th we update our retention periods. This updates the doc to match that change. ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [x] Other deadline: November 12 - [ ] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) --------- Co-authored-by: Shannon Anahata <[email protected]>
we shipped this for users during logs GA, spec is locked in now <!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR *Tell us what you're changing and why. If your PR **resolves an issue**, please link it so it closes automatically.* ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [ ] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [x] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## LEGAL BOILERPLATE <!-- Sentry employees and contractors can delete or ignore this section. --> 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. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
Bundle ReportChanges will increase total bundle size by 1.78kB (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: sentry-docs-client-array-pushAssets Changed:
view changes for bundle: sentry-docs-server-cjsAssets Changed:
|
Bundle ReportChanges will increase total bundle size by 1.19kB (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: sentry-docs-server-cjsAssets Changed:
view changes for bundle: sentry-docs-client-array-pushAssets Changed:
|
| - `false` or `undefined`/`null`: Spotlight is disabled | ||
| - `true`: Spotlight is enabled using the default URL (`http://localhost:8969/stream`) | ||
| - `string`: Spotlight is enabled using the provided 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.
how will this work when someone runs spotlight run and it chooses a dynamic port?
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.
See below? If this is explicitly set, we assume it's for a reason and ignore the env variabl.
philipphofmann
left a comment
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.
Thanks for adding the docs for Spotlight. I left a few comments.
|
|
||
| ## Configuration Options | ||
|
|
||
| SDKs should support Spotlight configuration through one of two approaches: |
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.
This document already uses uppercase for a couple of occurrences or "MUST", "SHOULD", and "MAY". So it seems like we're following: https://www.ietf.org/rfc/rfc2119.txt. Therefore, I would write all occurrences uppercase
| SDKs should support Spotlight configuration through one of two approaches: | |
| SDKs SHOULD support Spotlight configuration through one of two approaches: |
|
|
||
| ## Environment Variable Handling | ||
|
|
||
| SDKs must support the `SENTRY_SPOTLIGHT` environment variable. The value should be parsed according to the following rules: |
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.
We don't have that yet on Cocoa. Environment variables are not that common for mobile platforms. I would change this to a SHOULD or MAY
| SDKs must support the `SENTRY_SPOTLIGHT` environment variable. The value should be parsed according to the following rules: | |
| SDKs SHOULD support the `SENTRY_SPOTLIGHT` environment variable. The value should be parsed according to the following rules: |
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.
Unfortunately, no. Implementation of SENTRY_SPOTLIGHT is non-negotiable. How can we help support this in Cocoa?
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.
Exposing local env vars into the Xcode simulator would still require a developer to do this manually. So mobile SDKs have other constrains that make this work differently than e.g. running a Flask app on your machine.
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.
Implementation of SENTRY_SPOTLIGHT is non-negotiable.
Please elaborate on the reasons.
It's not uncommon to use env vars on mobile in combination with simulators. We already do that for disabling spotlight in our UI tests here https://github.com/getsentry/sentry-cocoa/blob/aa43aea663aa0be90964af89e670f18dc22dc146/Samples/iOS-Swift/iOS-Swift-UITests/BaseUITest.swift#L34-L45
Adding adds value, but I wouldn't give it the highest priority on mobile. If you say non-negiotable, I'd like to know the reasons.
|
|
||
| ### Sampling | ||
|
|
||
| - Enable **100% sample rate** for the Spotlight pipeline |
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'm pretty sure some SDKs don't meet that requirement. For example, on Cocoa, we have two transports. One sends to Sentry, the other to Spotlight. Sampling happens before the transport. So, currently, the sampling behavior is the same for both Spotlight and Sentry envelopes. I'm unsure if having two different sampling behaviours is actually worth the complexity. This could be tricky to set up in some SDKs. It could also confuse users.
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.
This document is defining the ideal state we should be in, not what the current state of the SDKs are. We will need to try evolving the SDKs towards these goals.
|
|
||
| - If the Spotlight server is unreachable, SDKs should: | ||
| - Log an error message (ideally once, not per-envelope) | ||
| - Implement exponential backoff retry logic |
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.
What drove you to add this? I'm unsure if it's worth adding this. Did we have any problems without the backoff retry logic? If yes, I would explain it a bit here, and clearly state it's optional if possible. I don't think we need this for example on mobile or desktop apps.
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.
What's your concern 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.
It's some work and complexity that seems not worth the effort on mobile or JS frontend. TLDR; We can add it, but it's work. If it's a SHOULD then I'm OK with it. The logging an error message is a MUST, IMO.
Co-authored-by: Philipp Hofmann <[email protected]>
Co-authored-by: Philipp Hofmann <[email protected]>
philipphofmann
left a comment
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.
Thanks you @BYK , LGTM
Fixes getsentry/spotlight#545