Skip to content
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

Add metrics push gateway for supervisor #9815

Merged
merged 1 commit into from
May 10, 2022
Merged

Add metrics push gateway for supervisor #9815

merged 1 commit into from
May 10, 2022

Conversation

iQQBot
Copy link
Contributor

@iQQBot iQQBot commented May 6, 2022

Description

This PR allow prometheus to scrape metrics from supervisor, and allow IDE push metrics to supervisor

need manual add this CRD to clusters, this is another part for https://github.com/gitpod-io/observability

apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
  name: workspace
spec:
  selector:
    matchLabels:
      component: workspace
  podMetricsEndpoints:
  - port: supervisor

Related Issue(s)

Fixes #9515

How to test

  1. start a workspace with latest vscode
  2. try type something in order to active code suggestion
  3. look at prometheus

image
image
image

Release Notes

Adding metrics reporting to the IDE

Documentation

  • /werft no-preview

@iQQBot
Copy link
Contributor Author

iQQBot commented May 6, 2022

/hold
need delete DEBUG commit

@iQQBot iQQBot marked this pull request as ready for review May 6, 2022 08:12
@iQQBot iQQBot requested review from a team May 6, 2022 08:12
@github-actions github-actions bot added team: IDE team: workspace Issue belongs to the Workspace team labels May 6, 2022
WORKSPACE.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@sagor999 sagor999 left a comment

Choose a reason for hiding this comment

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

workspace portion LGTM

@akosyakov
Copy link
Member

@iQQBot Should there be changes in ws-proxy which prohibit access to metrics endpoint by anyone else but prometheus?

@iQQBot
Copy link
Contributor Author

iQQBot commented May 10, 2022

@iQQBot Should there be changes in ws-proxy which prohibit access to metrics endpoint by anyone else but prometheus?

No, We don't access from the ws-proxy, and besides, the supervisor endpoint can't be set to public, so there's no real point in preventing users from accessing it themselves; they can always access localhost:22999 from within the workspace

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.

lgtm

@iQQBot
Copy link
Contributor Author

iQQBot commented May 10, 2022

/unhold

@roboquat roboquat merged commit 801ac5f into main May 10, 2022
@roboquat roboquat deleted the pd/metrics branch May 10, 2022 13:36
@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed: IDE IDE change is running in production deployed Change is completely running in production labels May 12, 2022
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: workspace Workspace team change is running in production deployed Change is completely running in production release-note size/L team: IDE team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[supervisor] expose endpoints to collect workspace metrics
4 participants