Skip to content

Metric values no longer increasing monotonically #182

@breed808

Description

@breed808

With the metric clearing introduced in #177 , metric values are now increasing or decreasing over time. I.E. not behaving like Counters.

Example:

Image

I think there's two options to consider here:

  1. Reverting the change in Fix memory leak: clear stale metrics for each zone/account before fetching #177 and continuing to Add() observed Cloudflare values to the Counter metrics, or
  2. Switch affected metrics from CounterVecs to GaugeVecs and Set() the metric based on the observed value from Cloudflare.

I'm partial to the second option, as the exporter has been observing requests over a time period, rather than request totals. As a result I think Gauges better reflect the data being exposed here.

That said I'm just a single user of the exporter, so it'd be worth discussing here.

EDIT: I should mention I'm happy to raise a PR if the second option is desirable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions