Skip to content
This repository was archived by the owner on Oct 22, 2019. It is now read-only.
This repository was archived by the owner on Oct 22, 2019. It is now read-only.

Allow setting value of counter metrics #68

@leedm777

Description

@leedm777

I have the need for counter metrics that are set explicitly, instead of being incremented. I don't have access to the system tracking the metric, I only have whatever the current value is. One good example of this is to provide an uptime metric.

$u = getCurrentUptime();
$uptime = $registry->registerCounter($ns, 'uptime_seconds_total', 'Current uptime in seconds');
$uptime->set($u);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions