| 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 |
// ExemplarValueType specifies the type of Exemplar measurement value. |
| 7 |
type ExemplarValueType int32 |
| 8 |
|
| 9 |
const ( |
| 10 |
// ExemplarValueTypeEmpty means that exemplar value is unset. |
| 11 |
ExemplarValueTypeEmpty ExemplarValueType = iota |
| 12 |
ExemplarValueTypeInt |
| 13 |
ExemplarValueTypeDouble |
| 14 |
) |
| 15 |
|
| 16 |
// String returns the string representation of the ExemplarValueType. |
| 17 |
func (nt ExemplarValueType) String() string { |
| 18 |
switch nt { |
| 19 |
case ExemplarValueTypeEmpty: |
| 20 |
return "Empty" |
| 21 |
case ExemplarValueTypeInt: |
| 22 |
return "Int" |
| 23 |
case ExemplarValueTypeDouble: |
| 24 |
return "Double" |
| 25 |
} |
| 26 |
return "" |
| 27 |
} |