Skip to content

Conversation

gersure
Copy link

@gersure gersure commented Apr 6, 2021

we can use like this:

auto& family = BuildHistogram()
          .Name(name)
          .Help(help)
          .Labels(const_labels)
          .LabelNamesVec(variable_labels)
          .BucketBoundaries({Histogram::BucketBoundaries{1, 2}})
          .Register(registry);
  family.WithLabelValues(variable_values1).Observe(1.0);
  family.WithLabelValues(variable_values2).Observe(2.0);


  auto& family = BuildSummary()
          .Name(name)
          .Help(help)
          .Labels(const_labels)
          .LabelNamesVec(variable_labels)
          .Quantiles(Summary::Quantiles{})
          .Register(registry);
  family.WithLabelValues(variable_values1).Observe(1);
  family.WithLabelValues(variable_values2).Observe(2);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant