MCPcopy
hub / github.com/grafana/tempo / Series

Method Series

pkg/traceql/engine_metrics.go:925–935  ·  view source on GitHub ↗

Series output. This is tweaked to match what prometheus does. For ungrouped metrics we fill in a placeholder metric name with the name of the aggregation. rate() => {__name__=rate}

()

Source from the content-addressed store, hash-verified

923// fill in a placeholder metric name with the name of the aggregation.
924// rate() => {__name__=rate}
925func (u *UngroupedAggregator) Series() SeriesSet {
926 labels := LabelsFromArgs(labels.MetricName, u.name)
927
928 return SeriesSet{
929 labels.MapKey(): {
930 Labels: labels,
931 Values: u.innerAgg.Samples(),
932 Exemplars: u.innerAgg.Exemplars(),
933 },
934 }
935}
936
937func (e *Engine) CompileMetricsQueryRangeNonRaw(req *tempopb.QueryRangeRequest, mode AggregateMode, opts ...CompileOption) (*MetricsFrontendEvaluator, error) {
938 if req.Exemplars > maxExemplars {

Callers

nothing calls this directly

Calls 4

LabelsFromArgsFunction · 0.85
SamplesMethod · 0.65
ExemplarsMethod · 0.65
MapKeyMethod · 0.45

Tested by

no test coverage detected