Skip to content

Commit a96facf

Browse files
committed
Do not merge, JSON schemas examples
Signed-off-by: Pavol Loffay <[email protected]>
1 parent 8215fe5 commit a96facf

File tree

243 files changed

+68014
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

243 files changed

+68014
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
vendor
2-
**/_build
2+
#**/_build
33
dist/
44
.idea
55
.generated-yaml/
Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"properties": {
4+
"datapoints": {
5+
"additionalProperties": {
6+
"properties": {
7+
"attributes": {
8+
"items": {
9+
"properties": {
10+
"default_value": {
11+
"type": "object"
12+
},
13+
"key": {
14+
"type": "string"
15+
}
16+
},
17+
"type": "object"
18+
},
19+
"type": "array"
20+
},
21+
"conditions": {
22+
"items": {
23+
"type": "string"
24+
},
25+
"type": "array"
26+
},
27+
"description": {
28+
"type": "string"
29+
}
30+
},
31+
"type": "object"
32+
},
33+
"type": "object"
34+
},
35+
"logs": {
36+
"additionalProperties": {
37+
"properties": {
38+
"attributes": {
39+
"items": {
40+
"properties": {
41+
"default_value": {
42+
"type": "object"
43+
},
44+
"key": {
45+
"type": "string"
46+
}
47+
},
48+
"type": "object"
49+
},
50+
"type": "array"
51+
},
52+
"conditions": {
53+
"items": {
54+
"type": "string"
55+
},
56+
"type": "array"
57+
},
58+
"description": {
59+
"type": "string"
60+
}
61+
},
62+
"type": "object"
63+
},
64+
"type": "object"
65+
},
66+
"metrics": {
67+
"additionalProperties": {
68+
"properties": {
69+
"attributes": {
70+
"items": {
71+
"properties": {
72+
"default_value": {
73+
"type": "object"
74+
},
75+
"key": {
76+
"type": "string"
77+
}
78+
},
79+
"type": "object"
80+
},
81+
"type": "array"
82+
},
83+
"conditions": {
84+
"items": {
85+
"type": "string"
86+
},
87+
"type": "array"
88+
},
89+
"description": {
90+
"type": "string"
91+
}
92+
},
93+
"type": "object"
94+
},
95+
"type": "object"
96+
},
97+
"profiles": {
98+
"additionalProperties": {
99+
"properties": {
100+
"attributes": {
101+
"items": {
102+
"properties": {
103+
"default_value": {
104+
"type": "object"
105+
},
106+
"key": {
107+
"type": "string"
108+
}
109+
},
110+
"type": "object"
111+
},
112+
"type": "array"
113+
},
114+
"conditions": {
115+
"items": {
116+
"type": "string"
117+
},
118+
"type": "array"
119+
},
120+
"description": {
121+
"type": "string"
122+
}
123+
},
124+
"type": "object"
125+
},
126+
"type": "object"
127+
},
128+
"spanevents": {
129+
"additionalProperties": {
130+
"properties": {
131+
"attributes": {
132+
"items": {
133+
"properties": {
134+
"default_value": {
135+
"type": "object"
136+
},
137+
"key": {
138+
"type": "string"
139+
}
140+
},
141+
"type": "object"
142+
},
143+
"type": "array"
144+
},
145+
"conditions": {
146+
"items": {
147+
"type": "string"
148+
},
149+
"type": "array"
150+
},
151+
"description": {
152+
"type": "string"
153+
}
154+
},
155+
"type": "object"
156+
},
157+
"type": "object"
158+
},
159+
"spans": {
160+
"additionalProperties": {
161+
"properties": {
162+
"attributes": {
163+
"items": {
164+
"properties": {
165+
"default_value": {
166+
"type": "object"
167+
},
168+
"key": {
169+
"type": "string"
170+
}
171+
},
172+
"type": "object"
173+
},
174+
"type": "array"
175+
},
176+
"conditions": {
177+
"items": {
178+
"type": "string"
179+
},
180+
"type": "array"
181+
},
182+
"description": {
183+
"type": "string"
184+
}
185+
},
186+
"type": "object"
187+
},
188+
"type": "object"
189+
}
190+
},
191+
"type": "object"
192+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"properties": {
4+
"dimensions": {
5+
"description": "Dimensions defines the list of additional dimensions on top of the provided: - service.name - span.name - span.kind - status.code The dimensions will be fetched from the span's attributes. Examples of some conventionally used attributes: https://github.com/open-telemetry/opentelemetry-collector/blob/main/model/semconv/opentelemetry.go.",
6+
"items": {
7+
"properties": {
8+
"default": {
9+
"type": "string"
10+
},
11+
"name": {
12+
"type": "string"
13+
}
14+
},
15+
"type": "object"
16+
},
17+
"type": "array"
18+
},
19+
"exemplars": {
20+
"description": "Exemplars defines the configuration for exemplars.",
21+
"properties": {
22+
"enabled": {
23+
"type": "boolean"
24+
}
25+
},
26+
"type": "object"
27+
}
28+
},
29+
"type": "object"
30+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"properties": {
4+
"max_retries": {
5+
"description": "MaxRetry is the maximum retries per level, once this limit is hit for a level, even if the next pipeline level fails, it will not try to recover the level that exceeded the maximum retries",
6+
"type": "integer"
7+
},
8+
"priority_levels": {
9+
"description": "PipelinePriority is the list of pipeline level priorities in a 1 - n configuration, multiple pipelines can sit at a single priority level and will be routed in a fanout. If any pipeline at a level fails, the level is considered unhealthy",
10+
"items": {
11+
"items": {
12+
"type": "object"
13+
},
14+
"type": "array"
15+
},
16+
"type": "array"
17+
},
18+
"retry_gap": {
19+
"description": "RetryGap is how much time will pass between trying two separate priority levels in a single RetryInterval If the priority list has 3 levels, the RetryInterval is 5m, and the retryGap is 1m, within the 5m RetryInterval, the connector will only try one level every 1m, and will return to the stable level in the interim",
20+
"pattern": "^[0-9]+(ns|us|µs|ms|s|m|h)$",
21+
"type": "string"
22+
},
23+
"retry_interval": {
24+
"description": "RetryInterval is the frequency at which the pipeline levels will attempt to recover by going over all levels below the current",
25+
"pattern": "^[0-9]+(ns|us|µs|ms|s|m|h)$",
26+
"type": "string"
27+
},
28+
"sending_queue": {
29+
"description": "QueueSettings use the exporterhelper sending_queue to move the queue to the connector to avoid data being stuck in the queue of an unhealthy exporter",
30+
"type": "object"
31+
}
32+
},
33+
"type": "object"
34+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"properties": {},
4+
"type": "object"
5+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"properties": {
4+
"host_identifiers": {
5+
"description": "HostIdentifiers defines the list of resource attributes used to derive a unique `grafana.host.id` value. In most cases, this should be [ \"host.id\" ]",
6+
"items": {
7+
"type": "string"
8+
},
9+
"type": "array"
10+
},
11+
"metrics_flush_interval": {
12+
"description": "Duration string (e.g., '1s', '5m', '1h')",
13+
"pattern": "^[0-9]+(ns|us|µs|ms|s|m|h)$",
14+
"type": "string"
15+
}
16+
},
17+
"type": "object"
18+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"properties": {},
4+
"type": "object"
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"properties": {},
4+
"type": "object"
5+
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"properties": {
4+
"default_pipelines": {
5+
"description": "DefaultPipelines contains the list of pipelines to use when a more specific record can't be found in the routing table. Optional.",
6+
"items": {
7+
"type": "object"
8+
},
9+
"type": "array"
10+
},
11+
"error_mode": {
12+
"description": "ErrorMode determines how the processor reacts to errors that occur while processing an OTTL condition. Valid values are `ignore` and `propagate`. `ignore` means the processor ignores errors returned by conditions and continues on to the next condition. This is the recommended mode. If `ignore` is used and a statement's condition has an error then the payload will be routed to the default exporter. `propagate` means the processor returns the error up the pipeline. This will result in the payload being dropped from the collector. The default value is `propagate`.",
13+
"type": "string"
14+
},
15+
"table": {
16+
"description": "Table contains the routing table for this processor. Required.",
17+
"items": {
18+
"properties": {
19+
"condition": {
20+
"description": "Condition is an OTTL condition used for making a routing decision. For the \"request\" context, 'Condition' is required and must be of the form 'request[\"\u003cattribute\u003e\"] {== | !=} \u003cvalue\u003e'. For all other contexts, 'Statement' or 'Condition' must be provided, and must be a valid OTTL condition.",
21+
"type": "string"
22+
},
23+
"context": {
24+
"description": "One of \"request\", \"resource\", \"log\", \"span\", \"metric\", \"datapoint\". Optional. Default \"resource\".",
25+
"type": "string"
26+
},
27+
"pipelines": {
28+
"description": "Pipelines contains the list of pipelines to use when the value from the FromAttribute field matches this table item. When no pipelines are specified, the ones specified under DefaultPipelines are used, if any. The routing processor will fail upon the first failure from these pipelines. Optional.",
29+
"items": {
30+
"type": "object"
31+
},
32+
"type": "array"
33+
},
34+
"statement": {
35+
"description": "Statement is an OTTL statement used for making a routing decision. 'Statement' is disallowed for the \"request\" context. For other contexts, 'Statement' or 'Condition' must be provided.",
36+
"type": "string"
37+
}
38+
},
39+
"type": "object"
40+
},
41+
"type": "array"
42+
}
43+
},
44+
"type": "object"
45+
}

0 commit comments

Comments
 (0)