Coming from Java/Scala background, I am used to libraries that provide vendor agnostic APIs, such as micrometer.io, Dropwizard, etc., where you can plug-in different monitoring backends: AWS CloudWatch, Datadog, Prometheus, etc., without changing the code.
Right now I want to add metrics to my Python application but I don't find any metrics library that does that. OpenTelemetry is not an option because it's not what I'm looking for: you need to setup Agents, Gateways, Collectors, etc., and in addition, their CloudWatch exporter is only EMF which is not what I need.
I've found one library which is "pymetrics" [1], which looks promising but it's in the beginning of its way, it has not much adoption, and it has only a few monitoring backends out-of-the-box.
What's left for me is to couple my code to the monitoring system I use, which means code changes whenever we want to migrate to another monitoring system.
Am I missing something?
[1] https://pypi.org/project/pymetrics/
ddtrace patches popular Python libraries to emit metrics which can be collected by any statsd-compatible endpoint. The trace spans may well be more specific to the Datadog API though.
[1] https://github.com/DataDog/dd-trace-py/
[2] https://datadogpy.readthedocs.io/en/latest/