willkg / markus

Markus is a Python library for generating metrics
Mozilla Public License 2.0
70 stars 8 forks source link

Add .extend_prefix() to hone a MetricsInterface prefix (#142) #144

Closed willkg closed 4 months ago

willkg commented 4 months ago

This makes it possible to iteratively hone a MetricsInterface prefix. So you can do things like this:

    # prefix here is "module"
    metrics = markus.get_metrics("module")

    # prefix here is "module.somefunc"
    func_metrics = metrics.extend_prefix("somefunc")

Fixes #142