autometrics-dev / autometrics-py

Easily add metrics to your code that actually help you spot and debug issues in production. Built on Prometheus and OpenTelemetry.
https://autometrics.dev
Apache License 2.0
214 stars 7 forks source link

Add an option to instrument blocks of code via context manager #70

Open actualwitch opened 1 year ago

actualwitch commented 1 year ago

Approximate syntax:

with AutometricsSpan("span_name"):
    # your code here