apm-agent-python icon indicating copy to clipboard operation
apm-agent-python copied to clipboard

Public API for metrics

Open basepi opened this issue 4 years ago • 0 comments

We should create some public API interfaces for dealing with metrics.

Currently, to create a histogram metric, a user has to fetch the Client object and then do something like this:

metricset = MetricsSet(MetricsRegistry(elasticapm_client))
hist = metricset.histogram("x", buckets=[1, 10, 100])

Since we're moving away from dealing directly with the Client object where possible, we can condense this down to a single public API call that abstracts most of the details away.

basepi avatar Jun 14 '21 15:06 basepi