Skip to content

Rework Desc and ConstMetrics #222

@beorn7

Description

@beorn7
  • Desc needs to also include bucket layout and type.
  • Desc creation needs to be easier. Consider creating a Desc from an Opts instance, give it a Desc() method. Give Desc a method AddLabelNames.
  • Remove NewInvalidDesc, not needed anywhere (especially with the option of not returning a Desc in Describe at all).
  • ConstMetric creation can then be streamlined: no type parameter needed anymore. Could also take Opts directly but that has a higher performance cost as a Desc has some things precalculated. Needs vetting.
  • There is probably no need for hashing within Desc. It has the risk of hash collisions, and it is not really in the critical path, so it can as well use strings as keys.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions