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

Initialize counters at zero #73

Merged
merged 2 commits into from
Jul 13, 2023
Merged

Initialize counters at zero #73

merged 2 commits into from
Jul 13, 2023

Conversation

laulauland
Copy link
Member

@laulauland laulauland commented Jun 19, 2023

Related to discussion: https://github.com/orgs/autometrics-dev/discussions/21

This PR enables wrapped functions and decorators to initialize counters at 0.

This will allow tooling that connects to Prometheus to be able to tell which functions are being tracked, even if those functions haven't been called since adding Autometrics to the codebase.

@laulauland laulauland force-pushed the initialize-at-zero branch from fb6b63e to b18a71b Compare June 22, 2023 13:52
@laulauland laulauland marked this pull request as ready for review June 22, 2023 14:38
@laulauland laulauland changed the title WIP initialize metrics at zero Initialize metrics at zero Jun 22, 2023
@laulauland laulauland changed the title Initialize metrics at zero WIP Initialize metrics at zero Jun 22, 2023
@laulauland laulauland force-pushed the initialize-at-zero branch from b18a71b to 37b3353 Compare June 28, 2023 13:16
@laulauland laulauland changed the title WIP Initialize metrics at zero Initialize metrics at zero Jul 6, 2023
@laulauland laulauland changed the title Initialize metrics at zero Initialize counters at zero Jul 6, 2023
@laulauland laulauland requested review from oscarvz and flenter July 6, 2023 09:55
Copy link
Member

@oscarvz oscarvz left a comment

Choose a reason for hiding this comment

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

🎉

Copy link
Member

@flenter flenter left a comment

Choose a reason for hiding this comment

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

Very nice! Can you also update the changelog?

@laulauland laulauland force-pushed the initialize-at-zero branch from 37b3353 to c20035b Compare July 13, 2023 08:59
@laulauland laulauland merged commit abb6b7c into main Jul 13, 2023
@laulauland laulauland deleted the initialize-at-zero branch July 13, 2023 09:43
@laulauland laulauland linked an issue Jul 14, 2023 that may be closed by this pull request
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.

Set the function call counters to zero at startup
3 participants