-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
metadata-schema.yaml
177 lines (165 loc) · 9.5 KB
/
metadata-schema.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# Required: The type of the component - Usually the name. The type and class combined uniquely identify the component (eg. receiver/otlp) or subcomponent (eg. receiver/hostmetricsreceiver/cpu)
type:
# Required for subcomponents: The type of the parent component.
parent: string
# Optional: Scope name for the telemetry generated by the component. If not set, name of the go package will be used.
scope_name: string
# Optional: The name of the package that mdatagen generates. If not set, the name "metadata" will be used.
generated_package_name: string
# Required for components (Optional for subcomponents): A high-level view of the development status and use of this component
status:
# Required: The class of the component (For example receiver)
class: <receiver|processor|exporter|connector|extension|cmd|pkg>
# Required: The stability of the component - See https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#stability-levels
stability:
development: [<metrics|traces|logs|traces_to_metrics|metrics_to_metrics|logs_to_metrics|extension>]
alpha: [<metrics|traces|logs|traces_to_metrics|metrics_to_metrics|logs_to_metrics|extension>]
beta: [<metrics|traces|logs|traces_to_metrics|metrics_to_metrics|logs_to_metrics|extension>]
stable: [<metrics|traces|logs|traces_to_metrics|metrics_to_metrics|logs_to_metrics|extension>]
deprecated: [<metrics|traces|logs|traces_to_metrics|metrics_to_metrics|logs_to_metrics|extension>]
unmaintained: [<metrics|traces|logs|traces_to_metrics|metrics_to_metrics|logs_to_metrics|extension>]
# Optional: The distributions that this component is bundled with (For example core or contrib). See statusdata.go for a list of common distros.
distributions: [string]
# Optional: A list of warnings that should be brought to the attention of users looking to use this component
warnings: [string]
# Optional: Metadata related to codeowners of the component
codeowners:
active: [string]
emeritus: [string]
unsupported_platforms: [<linux|windows>]
# Optional: OTel Semantic Conventions version that will be associated with the scraped metrics.
# This attribute should be set for metrics compliant with OTel Semantic Conventions.
sem_conv_version: 1.9.0
# Optional: map of resource attribute definitions with the key being the attribute name.
resource_attributes:
<attribute.name>:
# Required: whether the resource attribute is added the emitted metrics by default.
enabled: bool
# Required: description of the attribute.
description:
# Optional: array of attribute values if they are static values (currently, only string type is supported).
enum: [string]
# Required: attribute value type.
type: <string|int|double|bool|bytes|slice|map>
# Optional: warnings that will be shown to user under specified conditions.
warnings:
# A warning that will be displayed if the resource_attribute is enabled in user config.
# Should be used for deprecated default resource_attributes that will be removed soon.
if_enabled:
# A warning that will be displayed if `enabled` field is not set explicitly in user config.
# Should be used for resource_attributes that will be turned from default to optional or vice versa.
if_enabled_not_set:
# A warning that will be displayed if the resource_attribute is configured by user in any way.
# Should be used for deprecated optional resource_attributes that will be removed soon.
if_configured:
# Optional: map of attribute definitions with the key being the attribute name and value
# being described below.
attributes:
<attribute.name>:
# Optional: this field can be used to override the actual attribute name defined by the key.
# It should be used if multiple metrics have different attributes with the same name.
name_override:
# Required: description of the attribute.
description:
# Optional: array of attribute values if they are static values (currently, only string type is supported).
enum: [string]
# Required: attribute value type.
type: <string|int|double|bool|bytes|slice|map>
# Optional: map of metric names with the key being the metric name and value
# being described below.
metrics:
<metric.name>:
# Required: whether the metric is collected by default.
enabled: bool
# Required: metric description.
description:
# Optional: extended documentation of the metric.
extended_documentation:
# Optional: warnings that will be shown to user under specified conditions.
warnings:
# A warning that will be displayed if the metric is enabled in user config.
# Should be used for deprecated default metrics that will be removed soon.
if_enabled:
# A warning that will be displayed if `enabled` field is not set explicitly in user config.
# Should be used for metrics that will be turned from default to optional or vice versa.
if_enabled_not_set:
# A warning that will be displayed if the metrics is configured by user in any way.
# Should be used for deprecated optional metrics that will be removed soon.
if_configured:
# Required: metric unit as defined by https://ucum.org/ucum.html.
unit:
# Required: metric type with its settings.
<sum|gauge>:
# Required for sum and gauge metrics: type of number data point values.
value_type: <int|double>
# Required for sum metric: whether the metric is monotonic (no negative delta values).
monotonic: bool
# Required for sum metric: whether reported values incorporate previous measurements
# (cumulative) or not (delta).
aggregation_temporality: <delta|cumulative>
# Optional: Indicates the type the metric needs to be parsed from. If set, the generated
# functions will parse the value from string to value_type.
input_type: string
# Optional: array of attributes that were defined in the attributes section that are emitted by this metric.
attributes: [string]
# Lifecycle tests generated for this component.
tests:
config: # {} by default, specific testing configuration for lifecycle tests.
# Skip lifecycle tests for this component. Not recommended for components that are not in development.
skip_lifecycle: false # false by default
# Skip shutdown tests for this component. Not recommended for components that are not in development.
skip_shutdown: false # false by default
# Whether it's expected that the Consume[Logs|Metrics|Traces] method will return an error with the given configuration.
expect_consumer_error: true # false by default
goleak: # {} by default generates a package_test to enable check for leaks
skip: false # set to true if goleak tests should be skipped
setup: string # Optional: supports configuring a setup function that runs before goleak checks
teardown: string # Optional: supports configuring a teardown function that runs before goleak checks
ignore:
top: [string] # Optional: array of strings representing functions that should be ignore via IgnoreTopFunction
any: [string] # Optional: array of strings representing functions that should be ignore via IgnoreAnyFunction
# Optional: map of metric names with the key being the metric name and value
# being described below.
telemetry:
# Optional: level allows components to specify the minimum telemetry level for metrics to be produced. defaults to basic if not set.
level: string
metrics:
<metric.name>:
# Required: whether the metric is collected by default.
enabled: bool
# Required: metric description.
description:
# Optional: the stability level of the metric. Set to alpha by default.
stability: [alpha|stable|deprecated]
# Optional: extended documentation of the metric.
extended_documentation:
# Optional: whether or not this metric is optional. Optional metrics may only be initialized
# if certain features are enabled or configured.
optional: bool
# Optional: warnings that will be shown to user under specified conditions.
warnings:
# A warning that will be displayed if the metric is enabled in user config.
# Should be used for deprecated default metrics that will be removed soon.
if_enabled:
# A warning that will be displayed if `enabled` field is not set explicitly in user config.
# Should be used for metrics that will be turned from default to optional or vice versa.
if_enabled_not_set:
# A warning that will be displayed if the metrics is configured by user in any way.
# Should be used for deprecated optional metrics that will be removed soon.
if_configured:
# Required: metric unit as defined by https://ucum.org/ucum.html.
unit:
# Required: metric type with its settings.
<sum|gauge|histogram>:
# Optional: Whether this metric is asynchronous. If async, a mechanism is required to be able to
# pass in options to the callbacks that are called when the metric is observed.
async: bool
# Required: type of number data point values.
value_type: <int|double>
# Required for sum metric: whether the metric is monotonic (no negative delta values).
monotonic: bool
# Bucket boundaries are only available to set for histogram metrics.
bucket_boundaries: [double]
# Optional: array of attributes that were defined in the attributes section that are emitted by this metric.
# Note: Only the following attribute types are supported: <string|int|double|bool>
attributes: [string]