Problem/Motivation
I run Drupal in Docker containers and inject SENTRY_ENVIRONMENT to distinguish between staging and production environments. I also have cron monitoring set up, but Drupal always reports the environment as production.
This is because the environment and release arguments are the wrong way round:
$checkIn = new CheckIn($slug, CheckInStatus::inProgress(), NULL, $options->getEnvironment(), $options->getRelease(), \Drupal::time()->getCurrentMicroTime() - \Drupal::time()->getRequestMicroTime());
vs
public function __construct(
string $monitorSlug,
CheckInStatus $status,
?string $id = null,
?string $release = null,
?string $environment = null,
$duration = null,
?MonitorConfig $monitorConfig = null
) {
$options->getRelease() is null in my case, which falls back in the Sentry code to production.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork raven-3475204
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
longwaveComment #8
mfboof :( Good catch, thanks!
Comment #9
mfbComment #10
mfbOops