Skip to content

Conversation

@mattdurham
Copy link
Collaborator

@mattdurham mattdurham commented Aug 2, 2022

PR Description

Add support for passing prometheus register to components and wrapping them with the component id. I used component_id since I thought id might be used elsewhere since it is so generic. Adds ready endpoint that is triggered from the initial load/reload.

Which issue(s) this PR fixes

Closes #1938

Notes to the Reviewer

PR Checklist

  • Tests updated

@mattdurham mattdurham marked this pull request as ready for review August 3, 2022 14:24
@mattdurham mattdurham requested review from marctc and rfratto August 3, 2022 14:24
@mattdurham mattdurham changed the title WIP: Add component metrics to /metrics endpoint Add component metrics to /metrics endpoint Aug 3, 2022
@marctc
Copy link
Contributor

marctc commented Aug 4, 2022

I was wondering if instead to have an specific metric per component we could have generic metrics (accessed, errors, etc) with a label as component name. That would give us the ability to easily add metrics to new components without having to create new metrics per component, like in this ongoing PR

@mattdurham
Copy link
Collaborator Author

There is probably room for some generic cases: errors springs to mind. Could be once we have a stable of components see which ones have high commonality.

@mattdurham mattdurham requested a review from rfratto August 4, 2022 13:00
Copy link
Member

@rfratto rfratto left a comment

Choose a reason for hiding this comment

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

🎉 Nice!

I tested it out with a few reloads after removing / adding components and everything looks clean.

@mattdurham mattdurham enabled auto-merge (squash) August 4, 2022 14:31
@mattdurham mattdurham merged commit 7fcbc44 into main Aug 4, 2022
@mattdurham mattdurham deleted the metrics branch August 4, 2022 14:53
@github-actions github-actions bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Mar 21, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flow: allow components to expose metrics

3 participants