/
valid-example.yaml
138 lines (123 loc) · 6.15 KB
/
valid-example.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
file_format: 1.0.0
schema_url: https://opentelemetry.io/schemas/1.1.0
versions:
1.1.0:
# Section "all" applies to attributes names for all data types: resources, spans, logs,
# span events, metric labels.
#
# The translations in "all" section are performed first (for each particular version).
# Only after that the translations in the specific section ("resources", "traces",
# "metrics" or "logs") that corresponds to the data type are applied.
#
# The only translation possible in section "all" is renaming of attributes in
# versions. For human readability versions are listed in reverse chronological
# order, however note that the translations are applied in the order defined by
# semver ordering.
all:
changes:
- rename_attributes:
# Mapping of attribute names (label names for metrics). The key is the old name
# used prior to this version, the value is the new name starting from this version.
# Rename k8s.* to kubernetes.*
k8s.cluster.name: kubernetes.cluster.name
k8s.namespace.name: kubernetes.namespace.name
k8s.node.name: kubernetes.node.name
k8s.node.uid: kubernetes.node.uid
k8s.pod.name: kubernetes.pod.name
k8s.pod.uid: kubernetes.pod.uid
k8s.container.name: kubernetes.container.name
k8s.replicaset.name: kubernetes.replicaset.name
k8s.replicaset.uid: kubernetes.replicaset.uid
k8s.cronjob.name: kubernetes.cronjob.name
k8s.cronjob.uid: kubernetes.cronjob.uid
k8s.job.name: kubernetes.job.name
k8s.job.uid: kubernetes.job.uid
k8s.statefulset.name: kubernetes.statefulset.name
k8s.statefulset.uid: kubernetes.statefulset.uid
k8s.daemonset.name: kubernetes.daemonset.name
k8s.daemonset.uid: kubernetes.daemonset.uid
k8s.deployment.name: kubernetes.deployment.name
k8s.deployment.uid: kubernetes.deployment.uid
service.namespace: service.namespace.name
# Like "all" the "resources" section may contain only attribute renaming translations.
# The only translation possible in this section is renaming of attributes in
# versions.
resources:
changes:
- rename_attributes:
# Mapping of attribute names. The key is the old name
# used prior to this version, the value is the new name starting from this version.
telemetry.auto.version: telemetry.auto_instr.version
spans:
changes:
# Sequence of translations to apply to convert the schema from a prior version
# to this version. The order in this sequence is important. Translations are
# applied from top to bottom in the listed order.
- rename_attributes:
# Rename attributes of all spans, regardless of span name.
# The keys are the old attribute name used prior to this version, the values are
# the new attribute name starting from this version.
attribute_map:
peer.service: peer.service.name
span_events:
changes:
# Sequence of translations to apply to convert the schema from a prior version
# to this version. The order in this sequence is important. Translations are
# applied from top to bottom in the listed order.
- rename_events:
# Rename events. The keys are old event names, the values are the new event names.
name_map: {exception.stacktrace: exception.stack_trace}
- rename_attributes:
# Rename attributes of events.
# The keys are the old attribute name used prior to this version, the values are
# the new attribute name starting from this version.
attribute_map:
peer.service: peer.service.name
apply_to_events:
# Optional event names to apply to. If empty applies to all events.
# Conditions in apply_to_spans and apply_to_events are logical AND-ed,
# both should match for transformation to be applied.
- exception.stack_trace
metrics:
changes:
# Sequence of translations to apply to convert the schema from a prior version
# to this version. The order in this sequence is important. Translations are
# applied from top to bottom in the listed order.
- rename_labels:
# Rename labels of all metrics, regardless of metric name.
# The keys are the old label name used prior to this version, the values are
# the new label name starting from this version.
label_map:
http.status_code: http.response_status_code
- rename_metrics:
# Rename metrics. The keys are old metric names, the values are the new metric names.
container.cpu.usage.total: cpu.usage.total
container.memory.usage.max: memory.usage.max
- rename_labels:
apply_to_metrics:
# Name of the metric to apply this rule to. If empty the rule applies to all metrics.
- system.cpu.utilization
- system.memory.usage
- system.memory.utilization
- system.paging.usage
label_map:
# The keys are the old label name used prior to this version, the values are
# the new label name starting from this version.
status: state
logs:
changes:
- rename_logs:
# map of key/values. The keys are the old log name used
# the previous version, the values are the new log name
# starting from this version.
ProcessStarted: otel.process.started
- rename_attributes:
attribute_map:
process.executable_name: process.executable.name
apply_to_logs:
# Optional. If it is missing the transformation is applied
# to all logs. If it is present the transformation is applied
# only to the logs with the name that is found in the sequence
# specified below.
- otel.process.started
1.0.0: