8000 Ability to set CreatedTimestamp on constant histogram metrics · Issue #1535 · prometheus/client_golang · GitHub
[go: up one dir, main page]

Skip to content

Ability to set CreatedTimestamp on constant histogram metrics #1535

@swar8080

Description

@swar8080

#1313 added created timestamp to the internal histogram data model:

https://github.com/ArthurSens/client_golang/blob/e5639d1dcb98e3f1027e110d11ab9eda54e36f34/prometheus/histogram.go#L1202-L1218

I don't see a way for clients to set the value for created timestamp? Specifically we are trying to use prometheus.NewConstHistogram

I think this is why we're not getting any results when trying to calculate histogram_quantile since our _bucket counts don't start at zero without created timestamp injection. It'd also be nice if the _sum and _count metrics had zero injection.


Curious to know if hiding created timestamp from clients is intentional here, like if this part of the feature is WIP.

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

      0