Debian Codegraph @

cmd/mdatagen/metadata-schema.yaml

raw symbols SCIP
1 # 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)
2 type:
3
4 # Required for subcomponents: The type of the parent component.
5 parent: string
6
7 # Optional: Scope name for the telemetry generated by the component. If not set, name of the go package will be used.
8 scope_name: string
9
10 # Optional: The name of the package that mdatagen generates. If not set, the name "metadata" will be used.
11 generated_package_name: string
12
13 # Required for components (Optional for subcomponents): A high-level view of the development status and use of this component
14 status:
15 # Required: The class of the component (For example receiver)
16 class: <receiver|processor|exporter|connector|extension|cmd|pkg|scraper|converter|provider>
17 # Required: The stability of the component - See https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#stability-levels
18 stability:
19 development: [<metrics|traces|logs|traces_to_metrics|metrics_to_metrics|logs_to_metrics|extension,converter,provider>]
20 alpha: [<metrics|traces|logs|traces_to_metrics|metrics_to_metrics|logs_to_metrics|extension,converter,provider>]
21 beta: [<metrics|traces|logs|traces_to_metrics|metrics_to_metrics|logs_to_metrics|extension,converter,provider>]
22 stable: [<metrics|traces|logs|traces_to_metrics|metrics_to_metrics|logs_to_metrics|extension,converter,provider>]
23 deprecated: [<metrics|traces|logs|traces_to_metrics|metrics_to_metrics|logs_to_metrics|extension,converter,provider>]
24 unmaintained: [<metrics|traces|logs|traces_to_metrics|metrics_to_metrics|logs_to_metrics|extension,converter,provider>]
25 # Required for deprecated components: The deprecation information for the deprecated components - See https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#deprecation-information
26 deprecation:
27 <component>:
28 date: string
29 migration: string
30 # Optional: The distributions that this component is bundled with (For example core or contrib). See statusdata.go for a list of common distros.
31 distributions: [string]
32 # Optional: A list of warnings that should be brought to the attention of users looking to use this component
33 warnings: [string]
34 # Optional: Metadata related to codeowners of the component
35 codeowners:
36 active: [string]
37 emeritus: [string]
38 unsupported_platforms: [<linux|windows>]
39
40 # Optional: OTel Semantic Conventions version that will be associated with the scraped metrics.
41 # This attribute should be set for metrics compliant with OTel Semantic Conventions.
42 sem_conv_version: 1.9.0
43
44 # Optional: map of resource attribute definitions with the key being the attribute name.
45 resource_attributes:
46 <attribute.name>:
47 # Required: whether the resource attribute is added the emitted metrics by default.
48 enabled: bool
49 # Required: description of the attribute.
50 description:
51 # Optional: array of attribute values if they are static values (currently, only string type is supported).
52 enum: [string]
53 # Required: attribute value type.
54 type: <string|int|double|bool|bytes|slice|map>
55 # Optional: warnings that will be shown to user under specified conditions.
56 warnings:
57 # A warning that will be displayed if the resource_attribute is enabled in user config.
58 # Should be used for deprecated default resource_attributes that will be removed soon.
59 if_enabled:
60 # A warning that will be displayed if `enabled` field is not set explicitly in user config.
61 # Should be used for resource_attributes that will be turned from default to optional or vice versa.
62 if_enabled_not_set:
63 # A warning that will be displayed if the resource_attribute is configured by user in any way.
64 # Should be used for deprecated optional resource_attributes that will be removed soon.
65 if_configured:
66
67 # Optional: array of entity definitions. Entities organize resource attributes into logical entities
68 # with identity and description attributes.
69 entities:
70 - # Required: the type of the entity.
71 type: string
72 # Required: a brief description of the entity.
73 brief: string
74 # Optional: the stability level of the entity.
75 stability: <development|alpha|beta|release_candidate|stable>
76 # Required: array of references to resource attributes that uniquely identify this entity.
77 # All referenced attributes must be defined in the resource_attributes section.
78 identity:
79 - ref: string
80 # Optional: array of references to resource attributes that describe this entity.
81 # All referenced attributes must be defined in the resource_attributes section.
82 description:
83 - ref: string
84
85 # Optional: map of attribute definitions with the key being the attribute name and value
86 # being described below.
87 attributes:
88 <attribute.name>:
89 # Optional: this field can be used to override the actual attribute name defined by the key.
90 # It should be used if multiple metrics have different attributes with the same name.
91 name_override:
92 # Required: description of the attribute.
93 description:
94 # Optional: array of attribute values if they are static values (currently, only string type is supported).
95 enum: [string]
96 # Required: attribute value type.
97 type: <string|int|double|bool|bytes|slice|map>
98 # Optional: indicates requirement level of the attribute.
99 # - required: the attribute is always included and cannot be excluded.
100 # - conditionally_required: the attribute is included by default when certain conditions are met.
101 # - recommended (default behavior): the attribute is included by default but can be disabled via configuration.
102 # - opt_in: the attribute is not included unless explicitly enabled in user config.
103 requirement_level: <required|conditionally_required|recommended|opt_in>
104
105 # Optional: map of metric names with the key being the metric name and value
106 # being described below.
107 metrics:
108 <metric.name>:
109 # Required: whether the metric is collected by default.
110 enabled: bool
111 # Required: metric description.
112 description:
113 # Optional: extended documentation of the metric.
114 extended_documentation:
115 # Optional: warnings that will be shown to user under specified conditions.
116 warnings:
117 # A warning that will be displayed if the metric is enabled in user config.
118 # Should be used for deprecated default metrics that will be removed soon.
119 if_enabled:
120 # A warning that will be displayed if `enabled` field is not set explicitly in user config.
121 # Should be used for metrics that will be turned from default to optional or vice versa.
122 if_enabled_not_set:
123 # A warning that will be displayed if the metrics is configured by user in any way.
124 # Should be used for deprecated optional metrics that will be removed soon.
125 if_configured:
126 # Required: metric unit as defined by https://ucum.org/ucum.html.
127 unit:
128 # Required: metric type with its settings.
129 <sum|gauge>:
130 # Required for sum and gauge metrics: type of number data point values.
131 value_type: <int|double>
132 # Required for sum metric: whether the metric is monotonic (no negative delta values).
133 monotonic: bool
134 # Required for sum metric: whether reported values incorporate previous measurements
135 # (cumulative) or not (delta).
136 aggregation_temporality: <delta|cumulative>
137 # Optional: Indicates the type the metric needs to be parsed from. If set, the generated
138 # functions will parse the value from string to value_type.
139 input_type: string
140 # Optional: array of attributes that were defined in the attributes section that are emitted by this metric.
141 attributes: [string]
142 # Required: the metric stability
143 stability:
144 # Required: the level of stability
145 level: <development|alpha|beta|stable|deprecated>
146 # Optional: the version current stability was introduced
147 from:
148 # Optional: the reference to a semantic convention
149 semantic_convention:
150 ref:
151
152 # Optional: map of event names with the key being the event name and value
153 # being described below.
154 events:
155 <event.name>:
156 # Required: whether the event is collected by default.
157 enabled: bool
158 # Required: event description.
159 description:
160 # Optional: extended documentation of the event.
161 extended_documentation:
162 # Optional: warnings that will be shown to user under specified conditions.
163 warnings:
164 # A warning that will be displayed if the event is enabled in user config.
165 # Should be used for deprecated default events that will be removed soon.
166 if_enabled:
167 # A warning that will be displayed if `enabled` field is not set explicitly in user config.
168 if_enabled_not_set:
169 # A warning that will be displayed if the event is configured by user in any way.
170 if_configured:
171 # Optional: array of attributes that were defined in the attributes section that are emitted by this event.
172 attributes: [string]
173
174 # Lifecycle tests generated for this component.
175 tests:
176 config: # {} by default, specific testing configuration for lifecycle tests.
177 # Skip lifecycle tests for this component. Not recommended for components that are not in development.
178 skip_lifecycle: false # false by default
179 # Skip shutdown tests for this component. Not recommended for components that are not in development.
180 skip_shutdown: false # false by default
181 # Whether it's expected that the Consume[Logs|Metrics|Traces] method will return an error with the given configuration.
182 expect_consumer_error: true # false by default
183 goleak: # {} by default generates a package_test to enable check for leaks
184 skip: false # set to true if goleak tests should be skipped
185 setup: string # Optional: supports configuring a setup function that runs before goleak checks
186 teardown: string # Optional: supports configuring a teardown function that runs before goleak checks
187 ignore:
188 top: [string] # Optional: array of strings representing functions that should be ignore via IgnoreTopFunction
189 any: [string] # Optional: array of strings representing functions that should be ignore via IgnoreAnyFunction
190
191
192 # Optional: map of metric names with the key being the metric name and value
193 # being described below.
194 telemetry:
195 metrics:
196 <metric.name>:
197 # Required: whether the metric is collected by default.
198 enabled: bool
199 # Required: metric description.
200 description:
201 # Optional: the stability level of the metric. Set to alpha by default.
202 stability: [alpha|stable|deprecated]
203 # Optional: extended documentation of the metric.
204 extended_documentation:
205 # Optional: whether or not this metric is optional. Optional metrics may only be initialized
206 # if certain features are enabled or configured.
207 optional: bool
208 # Optional: warnings that will be shown to user under specified conditions.
209 warnings:
210 # A warning that will be displayed if the metric is enabled in user config.
211 # Should be used for deprecated default metrics that will be removed soon.
212 if_enabled:
213 # A warning that will be displayed if `enabled` field is not set explicitly in user config.
214 # Should be used for metrics that will be turned from default to optional or vice versa.
215 if_enabled_not_set:
216 # A warning that will be displayed if the metrics is configured by user in any way.
217 # Should be used for deprecated optional metrics that will be removed soon.
218 if_configured:
219 # Required: metric unit as defined by https://ucum.org/ucum.html.
220 unit:
221 # Required: metric type with its settings.
222 <sum|gauge|histogram>:
223 # Optional: Whether this metric is asynchronous. If async, a mechanism is required to be able to
224 # pass in options to the callbacks that are called when the metric is observed.
225 async: bool
226 # Required: type of number data point values.
227 value_type: <int|double>
228 # Required for sum metric: whether the metric is monotonic (no negative delta values).
229 monotonic: bool
230 # Bucket boundaries are only available to set for histogram metrics.
231 bucket_boundaries: [double]
232 # Optional: array of attributes that were defined in the attributes section that are emitted by this metric.
233 # Note: Only the following attribute types are supported: <string|int|double|bool>
234 attributes: [string]