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

Starting profiler for single binary with k8s metrics #3981

Merged
merged 4 commits into from
Sep 8, 2023

Conversation

hamersaw
Copy link
Contributor

Tracking issue

#2975

Describe your changes

Starting the profiler http endpoint for the single binary and exposing k8s metrics using a separate handler.

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Screenshots

NA

Note to reviewers

NA

eapolinario
eapolinario previously approved these changes Aug 23, 2023
@eapolinario
Copy link
Contributor

This looks reasonable, but CI check is failing. We're retrying in https://github.com/flyteorg/flyte/actions/runs/5944214374?pr=3981.

@@ -147,6 +147,20 @@ func startPropeller(ctx context.Context, cfg Propeller) error {
}

if !cfg.DisableWebhook || !cfg.Disabled {
handlers := map[string]http.Handler{
"/k8smetrics": promhttp.HandlerFor(metrics.Registry, promhttp.HandlerOpts{
Copy link
Contributor

Choose a reason for hiding this comment

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

why a separate endpoint? we want to do it so that scraping can be specialized?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The controller-runtime package automatically populates a prometheus Registry as metrics.Registry. So this was just the easiest way to surface that registry (ie. separate HTTP endpoint). We could wrap both the controller-runtime prometheus registry and our registry (buried in flytestdlib) into a single entity, but it would require a good deal of refactoring. Also it does allowed for specialized scraping too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any advantage to unifying the registries?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@eapolinario AFAIK just that there would be a single endpoint to retrieve all metrics.

Copy link
Contributor

@eapolinario eapolinario left a comment

Choose a reason for hiding this comment

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

Won't block the PR on the question I asked.

@hamersaw hamersaw merged commit 6c39c0d into master Sep 8, 2023
10 checks passed
@hamersaw hamersaw deleted the feature/expose-k8s-prom-metrics branch September 8, 2023 15:08
eapolinario pushed a commit that referenced this pull request Sep 13, 2023
* starting profile for single binary

Signed-off-by: Daniel Rammer <[email protected]>

* updating datacatalog

Signed-off-by: Daniel Rammer <[email protected]>

---------

Signed-off-by: Daniel Rammer <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
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