-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
metadata-schema.yaml
127 lines (118 loc) · 6.93 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
# 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
# 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#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