Autometrics is an open source framework that makes it easy to understand the error rate, response time, and production usage of any function in your code. Available in Rust, TypeScript, Python and Go.
Hi all, I’m the creator of Autometrics, a set of open source libraries that makes it super easy to instrument your code with metrics and writes Prometheus queries for you to help make sense of the data.
While trying to make debugging incidents more efficient at Fiberplane, we kept running into the problem that querying observability data is hard. Logs, metrics, and traces are all useful signals for debugging production issues. However, you need to craft the right formula to pull the answer to a specific question out of the data. This is a painful process for developers like me. What’s worse is that once you write a query and are looking at a chart, it’s hard to be completely sure that the data you’re looking at actually answers your question. Queries can be syntactically correct but statistically meaningless — and this is a really bad thing to realize while investigating an incident.
Autometrics is a new take on observability that instruments code with useful metrics and writes the queries to help make sense of the generated data. The open source libraries can be used to track the error rate, response time, and production usage of any function in your source code. By tying metrics to code and standardizing the names and labels, we can automatically generate useful queries for each function or for groups of functions.
The most fun feature of Autometrics is that the libraries can insert links to live charts directly into the documentation of each function, so you can quickly jump from your IDE to looking at production data.
Autometrics also makes it easy to define useful alerts based on best practices around Service-Level Objectives (SLOs) right in your code. And, it comes with pre-built Grafana dashboards to give you an overview of how your code is performing in production.
Despite the snazzy-looking website, Autometrics is a very new project. We’d love to hear what you think about the project and we’re looking for developers that are interested in adding Autometrics to their projects and giving us feedback!
Report
@evan_schwartz1 does this work with popular frameworks out of the box (React, Django, etc)?
@oseanman Great question!
Right now, it should work with any backend framework.
Getting this type of metric from the frontend is a little tricky, but we're working on it. In short, we need to either ensure that the bundler doesn't mangle the function names or use sourcemaps. Also, Prometheus was built to scrape metrics from services, rather than having them pushed, so an extra component like https://github.com/zapier/prom-a... is needed to collect them. We're working on some things to make that experience nicer, so stay tuned for more on this!
Looks cool, one feedback is, when I see the example wrapping whole function with autometrics, I was almost passing it. But then I saw that we can wrap with decorators too, which is cool. My suggestion would be to add NestJS support.
@tiemen_waterreus Glad you think so! I don't know if you saw but we just released some Grafana dashboards that work with Autometrics projects https://github.com/autometrics-d.... I'd love to talk to you or others at Grafana about the project if you're interested!
Report
Congratulations on your launch! Looks super interesting.
Good Luck!
@mert_deveci1 Thanks -- I definitely agree that metrics are underrated relative to their usefulness and cost-effectiveness! Trying to improve the DX so that they're more approachable :)
Replies
Autometrics
Autometrics
Autometrics
Basement
Refine
Autometrics
Mibo
Autometrics
Autometrics
Autometrics
Vadoo AI
Autometrics
Deta Surf
Autometrics
GodmodeHQ ✊ | Custom AI agents for sales
Autometrics