Getting started in Python
Here's how to get started with Python in a new or existing project.
pip install autometrics
from autometrics import autometrics @autometrics def create_user(name): # ...
Use the environment variable
AUTOMETRICS_TRACKER to set the metrics collection
library. The default is
opentelemetryto collect and expose metrics
prometheus_clientto collect and expose metrics
Autometrics Explorer is an open source accompanying utility to preview and validate your metrics locally. It will automatically run Prometheus under the hood for you and show you Autometrics-instrumented functions in a web UI.
See Local Development for more information.
brew install autometrics-dev/tap/am am start <YOUR_APP_METRICS_ENDPOINT>
Install the Autometrics VSCode extension (opens in a new tab) to get generated queries in your tooltips in your IDE.
You can now navigate your code in your IDE, hover over the instrumented functions and you will see links for generated queries for your metrics.
If you have Grafana you can also import the Autometrics dashboard (opens in a new tab) for an overview and detailed view of the function metrics.