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

Use SENTRY_SPOTLIGHT as default value for Spotlight options #1789

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stayallive
Copy link
Collaborator

This reads SENTRY_SPOTLIGHT environment variable as source of truth and also allows passing the URL directly to the spotlight option.

Related getsentry/spotlight#545

@stayallive stayallive marked this pull request as ready for review November 14, 2024 11:51
Copy link
Member

@BYK BYK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but won't approve until someone from the PHP SDK team takes a look at this.

@@ -1187,7 +1191,7 @@ private function configureOptions(OptionsResolver $resolver): void
$resolver->setAllowedTypes('in_app_exclude', 'string[]');
$resolver->setAllowedTypes('in_app_include', 'string[]');
$resolver->setAllowedTypes('logger', ['null', LoggerInterface::class]);
$resolver->setAllowedTypes('spotlight', 'bool');
$resolver->setAllowedTypes('spotlight', ['bool', 'string', 'null']);
$resolver->setAllowedTypes('spotlight_url', 'string');
Copy link
Member

@BYK BYK Nov 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably obsolete now. (this referring to spotlight_url)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this should be marked as deprecated, can't remove it yet but will be slated to be removed in 5.x will update the code to mark it as such!

Comment on lines +675 to +683
return [
['', false, $defaultSpotlightUrl],
['true', true, $defaultSpotlightUrl],
['1', true, $defaultSpotlightUrl],
['false', false, $defaultSpotlightUrl],
['0', false, $defaultSpotlightUrl],
['null', false, $defaultSpotlightUrl],
['http://localhost:1234', true, 'http://localhost:1234'],
['some invalid looking value', false, $defaultSpotlightUrl],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Successfully merging this pull request may close these issues.

2 participants