Skip to content

Initialize counters at zero #54

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 16 commits into from
Jun 28, 2023
Merged

Initialize counters at zero #54

merged 16 commits into from
Jun 28, 2023

Conversation

brettimus
Copy link
Collaborator

@brettimus brettimus commented Jun 16, 2023

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


This PR adds an initialize_at_zero method to the Prometheus and OpenTelemetry trackers, which is called when a function is initially decorated. The changes include tests.

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

Additionally, I removed old code that we won't be using anymore 🧹

@brettimus brettimus force-pushed the initialize-counters-at-zero branch from 6a64577 to 4e01aa1 Compare June 26, 2023 13:30
@brettimus brettimus self-assigned this Jun 28, 2023
@brettimus brettimus changed the title WIP Initialize counters at zero Initialize counters at zero Jun 28, 2023
Copy link
Contributor

@actualwitch actualwitch left a comment

Choose a reason for hiding this comment

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

nice work 🚀

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.

2 participants