Skip to content

Commit

Permalink
feat(environment): Add support for environment config parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
x7airworker committed Aug 29, 2024
1 parent 7df3ddc commit d9fc314
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public function boot(IBootContext $context): void {
'release' => $config->getServerVersion(),
'traces_sample_rate' => $config->getSamplingRate(),
'profiles_sample_rate' => $config->getProfilesSamplingRate(),
'environment' => $config->getEnvironment(),
]);
}
});
Expand Down
4 changes: 4 additions & 0 deletions lib/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,8 @@ public function getProfilesSamplingRate(): float {
default => 0.1,
};
}

public function getEnvironment(): string {
return $this->config->getSystemValue('sentry.environment', 'production');
}
}

0 comments on commit d9fc314

Please sign in to comment.