Skip to content

Add x-client in ide-metrics component #16701

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 4 commits into from
Mar 7, 2023
Merged

Add x-client in ide-metrics component #16701

merged 4 commits into from
Mar 7, 2023

Conversation

mustard-mh
Copy link
Contributor

@mustard-mh mustard-mh commented Mar 7, 2023

Description

Add x-client a global setting in ide-metrics

TODOs

  • ‼️ After this PR, supervisor public api metrics will be broken, so we need to change ide supervisor public api SLO

Related Issue(s)

Fixes #

How to test

Check also test results #16701 (comment)

debug mode

  • Open this PR with Gitpod
  • Exec commands below
cd components/ide-metrics
# start metric server
go run main.go run --config config-example.json --json-log=false --verbose

# post curl
curl -X "POST" "http://localhost:3000/metrics-api/metrics/counter/add/gitpod_test_counter" \
     -H 'x-client: vscode' \
     -H 'Content-Type: application/json; charset=utf-8' 
  • /metrics endpoint at port 9500 should have metric_client field with vscode

Release Notes

NONE

Documentation

Build Options:

  • /werft with-github-actions
    Experimental feature to run the build with GitHub Actions (and not in Werft).
  • leeway-no-cache
    leeway-target=components:all
  • /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

@mustard-mh mustard-mh requested a review from a team March 7, 2023 09:00
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-hw-metrics-client.2 because the annotations in the pull request description changed
(with .werft/ from main)

@roboquat roboquat added the size/L label Mar 7, 2023
@mustard-mh mustard-mh changed the title Hw/metrics-client Add x-client in ide-metrics component Mar 7, 2023
@mustard-mh mustard-mh force-pushed the hw/metrics-client branch 2 times, most recently from db853fa to db4d047 Compare March 7, 2023 09:13
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-hw-metrics-client.5 because the annotations in the pull request description changed
(with .werft/ from main)

@mustard-mh
Copy link
Contributor Author

mustard-mh commented Mar 7, 2023

/werft run

👍 started the job as gitpod-build-hw-metrics-client.6
(with .werft/ from main)

@mustard-mh
Copy link
Contributor Author

mustard-mh commented Mar 7, 2023

✅ Metric for supervisor public api won't break + with correct metric_client=superviosr
image
✅ In debug mode
image
image

Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

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

code looks good, i did not try

/hold

unhold when are ready to merge

@mustard-mh
Copy link
Contributor Author

/unhold

@roboquat roboquat merged commit b48dc33 into main Mar 7, 2023
@roboquat roboquat deleted the hw/metrics-client branch March 7, 2023 10:36
@roboquat roboquat added deployed: IDE IDE change is running in production deployed Change is completely running in production labels Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed Change is completely running in production release-note-none size/L team: IDE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants