Skip to content

Conversation

@deer-wmde
Copy link
Contributor

@deer-wmde deer-wmde commented Dec 16, 2025

  • adjusts the service name by environment
    • used for logging into GCP to distinguish between erros occurring in staging and production
  • needs mw 0.14.0: add MW_ENVIRONMENT charts#211
    • backwards compatible; does not change anything when env var is not present

https://phabricator.wikimedia.org/T412862

$payload[ 'severity' ] = $level;
$payload[ 'serviceContext' ] = [
'service' => 'WBaaS MediaWiki',
'service' => 'WBaaS MediaWiki' . $envString,
Copy link
Contributor

@dati18 dati18 Dec 17, 2025

Choose a reason for hiding this comment

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

should we separate these? Add 'environment' => $envString instead of merging it with service

Copy link
Contributor Author

Choose a reason for hiding this comment

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

excellent question! That would be cleaner, yes, and I think I will just add it to the context array too.

The reason I combined it with the service name here is so that it will show up separately in Google Cloud Console:
image

@deer-wmde deer-wmde requested a review from dati18 December 18, 2025 10:00
@deer-wmde deer-wmde merged commit f13db70 into main Dec 18, 2025
9 checks passed
@deer-wmde deer-wmde deleted the de/loggingEnv branch December 18, 2025 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants