Debian Codegraph @

pdata/pmetric/metric_type.go

raw symbols SCIP
1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
3
4 package pmetric // import "go.opentelemetry.io/collector/pdata/pmetric"
5
6 // MetricType specifies the type of data in a Metric.
7 type MetricType int32
8
9 const (
10 // MetricTypeEmpty means that metric type is unset.
11 MetricTypeEmpty MetricType = iota
12 MetricTypeGauge
13 MetricTypeSum
14 MetricTypeHistogram
15 MetricTypeExponentialHistogram
16 MetricTypeSummary
17 )
18
19 // String returns the string representation of the MetricType.
20 func (mdt MetricType) String() string {
21 switch mdt {
22 case MetricTypeEmpty:
23 return "Empty"
24 case MetricTypeGauge:
25 return "Gauge"
26 case MetricTypeSum:
27 return "Sum"
28 case MetricTypeHistogram:
29 return "Histogram"
30 case MetricTypeExponentialHistogram:
31 return "ExponentialHistogram"
32 case MetricTypeSummary:
33 return "Summary"
34 }
35 return ""
36 }