| 1 |
// Copyright The OpenTelemetry Authors |
| 2 |
// SPDX-License-Identifier: Apache-2.0 |
| 3 |
|
| 4 |
package ast // import "go.opentelemetry.io/otel/schema/v1.0/ast" |
| 5 |
|
| 6 |
import "go.opentelemetry.io/otel/schema/v1.0/types" |
| 7 |
|
| 8 |
// Metrics corresponds to a section representing a list of changes that happened |
| 9 |
// to metrics schema in a particular version. |
| 10 |
type Metrics struct { |
| 11 |
Changes []MetricsChange |
| 12 |
} |
| 13 |
|
| 14 |
// MetricsChange corresponds to a section representing metrics change. |
| 15 |
type MetricsChange struct { |
| 16 |
RenameMetrics map[types.MetricName]types.MetricName `yaml:"rename_metrics"` |
| 17 |
RenameAttributes *AttributeMapForMetrics `yaml:"rename_attributes"` |
| 18 |
} |
| 19 |
|
| 20 |
// AttributeMapForMetrics corresponds to a section representing a translation of |
| 21 |
// attributes for specific metrics. |
| 22 |
type AttributeMapForMetrics struct { |
| 23 |
ApplyToMetrics []types.MetricName `yaml:"apply_to_metrics"` |
| 24 |
AttributeMap AttributeMap `yaml:"attribute_map"` |
| 25 |
} |