Skip to content

[common-go] Composable log fields #16860

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

Merged
merged 5 commits into from
Mar 16, 2023
Merged

[common-go] Composable log fields #16860

merged 5 commits into from
Mar 16, 2023

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented Mar 15, 2023

Description

  • Adds helper methods to construct structured fields for logs.
  • Keeps the existing OWI helper the same, but re-uses the composition
  • Adds an alias for Team/Org on log fields

Related Issue(s)

Fixes #

How to test

Release Notes

NONE

Documentation

Build Options:

  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish Options
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer Options
  • with-ee-license
  • with-dedicated-emulation
  • with-ws-manager-mk2
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated

Preview Environment Options:

  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh

@easyCZ easyCZ requested a review from a team March 15, 2023 13:11
@roboquat roboquat added size/XL and removed size/L labels Mar 15, 2023
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Mar 15, 2023
return String(WorkspaceInstanceIDField, instanceID)
}

func ProjectID(projectID string) log.Fields {
Copy link
Member Author

Choose a reason for hiding this comment

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

These helpers allow us to control centrally the common fields, and be able to adjust the naming of the fields should we choose to do so.

Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

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

👍

@easyCZ easyCZ requested a review from a team March 15, 2023 21:10
@github-actions github-actions bot added the team: workspace Issue belongs to the Workspace team label Mar 15, 2023
@easyCZ
Copy link
Member Author

easyCZ commented Mar 16, 2023

ws-man-mk2 is timing out during the build

@roboquat roboquat merged commit 59e58f9 into main Mar 16, 2023
@roboquat roboquat deleted the mp/common-go-log-fields-2 branch March 16, 2023 19:57
@roboquat roboquat added the deployed: webapp Meta team change is running in production label Mar 20, 2023
@roboquat roboquat added the deployed: workspace Workspace team change is running in production label Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed: workspace Workspace team change is running in production release-note-none size/XL team: staff-engineers team: webapp Issue belongs to the WebApp team team: workspace Issue belongs to the Workspace team
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

5 participants