@intentius/chant-lexicon-otel 0.95.1 → 0.96.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -9
- package/dist/catalog.d.ts +2 -1
- package/dist/catalog.d.ts.map +1 -1
- package/dist/codegen/docs.d.ts.map +1 -1
- package/dist/collector.d.ts +4 -1
- package/dist/collector.d.ts.map +1 -1
- package/dist/components/connectors.d.ts +156 -0
- package/dist/components/connectors.d.ts.map +1 -0
- package/dist/components/filtering.d.ts +95 -0
- package/dist/components/filtering.d.ts.map +1 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/k8s-receivers.d.ts +74 -0
- package/dist/components/k8s-receivers.d.ts.map +1 -0
- package/dist/components/sampling.d.ts +260 -0
- package/dist/components/sampling.d.ts.map +1 -0
- package/dist/define.d.ts +31 -4
- package/dist/define.d.ts.map +1 -1
- package/dist/genai.d.ts +165 -0
- package/dist/genai.d.ts.map +1 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/integrity.json +8 -7
- package/dist/lint/audit-catalog.d.ts +2 -1
- package/dist/lint/audit-catalog.d.ts.map +1 -1
- package/dist/lint/post-synth/index.d.ts.map +1 -1
- package/dist/lint/post-synth/otel-helpers.d.ts +1 -1
- package/dist/lint/post-synth/otel-helpers.d.ts.map +1 -1
- package/dist/lint/post-synth/otel101.d.ts +1 -1
- package/dist/lint/post-synth/otel103.d.ts +1 -1
- package/dist/lint/post-synth/otel112.d.ts +8 -0
- package/dist/lint/post-synth/otel112.d.ts.map +1 -0
- package/dist/manifest.json +1 -1
- package/dist/meta.json +70 -0
- package/dist/metric-names.d.ts +121 -0
- package/dist/metric-names.d.ts.map +1 -0
- package/dist/model.d.ts +23 -4
- package/dist/model.d.ts.map +1 -1
- package/dist/okf/index.md +15 -0
- package/dist/okf/rules/OTEL112.md +11 -0
- package/dist/okf/types/CountConnector.md +9 -0
- package/dist/okf/types/FilterProcessor.md +9 -0
- package/dist/okf/types/ForwardConnector.md +9 -0
- package/dist/okf/types/K8sClusterReceiver.md +9 -0
- package/dist/okf/types/KubeletStatsReceiver.md +9 -0
- package/dist/okf/types/LoadBalancingExporter.md +9 -0
- package/dist/okf/types/ProbabilisticSamplerProcessor.md +9 -0
- package/dist/okf/types/RedactionProcessor.md +9 -0
- package/dist/okf/types/RoutingConnector.md +9 -0
- package/dist/okf/types/ServiceGraphConnector.md +9 -0
- package/dist/okf/types/SpanMetricsConnector.md +9 -0
- package/dist/okf/types/SumConnector.md +9 -0
- package/dist/okf/types/TailSamplingProcessor.md +9 -0
- package/dist/okf/types/TransformProcessor.md +9 -0
- package/dist/pipeline.d.ts +9 -3
- package/dist/pipeline.d.ts.map +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/rules/otel-helpers.ts +1 -1
- package/dist/rules/otel101.ts +1 -1
- package/dist/rules/otel103.ts +1 -1
- package/dist/rules/otel112.ts +17 -0
- package/dist/semconv.d.ts +33 -0
- package/dist/semconv.d.ts.map +1 -0
- package/dist/serializer.d.ts +1 -1
- package/dist/skills/chant-otel.md +28 -5
- package/dist/topology.d.ts +34 -5
- package/dist/topology.d.ts.map +1 -1
- package/dist/validate-config.d.ts +6 -2
- package/dist/validate-config.d.ts.map +1 -1
- package/dist/validate.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/catalog.ts +2 -1
- package/src/codegen/docs.ts +14 -8
- package/src/collector.ts +9 -1
- package/src/components/connectors.ts +276 -0
- package/src/components/filtering.test.ts +192 -0
- package/src/components/filtering.ts +192 -0
- package/src/components/index.ts +4 -0
- package/src/components/k8s-receivers.test.ts +123 -0
- package/src/components/k8s-receivers.ts +107 -0
- package/src/components/sampling.test.ts +464 -0
- package/src/components/sampling.ts +521 -0
- package/src/connectors.test.ts +388 -0
- package/src/define.ts +36 -4
- package/src/genai.test.ts +526 -0
- package/src/genai.ts +466 -0
- package/src/generated/lexicon-otel.json +70 -0
- package/src/index.ts +39 -0
- package/src/lint/audit-catalog.ts +11 -2
- package/src/lint/post-synth/index.ts +2 -0
- package/src/lint/post-synth/otel-helpers.ts +1 -1
- package/src/lint/post-synth/otel101.ts +1 -1
- package/src/lint/post-synth/otel103.ts +1 -1
- package/src/lint/post-synth/otel112.ts +17 -0
- package/src/metric-names.test.ts +80 -0
- package/src/metric-names.ts +176 -0
- package/src/model.ts +26 -4
- package/src/otelcol-validate.test.ts +143 -0
- package/src/pipeline.ts +9 -3
- package/src/plugin.test.ts +1 -0
- package/src/plugin.ts +1 -1
- package/src/semconv.ts +63 -0
- package/src/serializer.ts +1 -1
- package/src/skills/chant-otel.md +28 -5
- package/src/topology.ts +54 -8
- package/src/validate-config.ts +92 -4
- package/src/validate.ts +8 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* OTEL101: A pipeline uses a receiver, processor or exporter that is not declared
|
|
3
3
|
*
|
|
4
|
-
* The collector refuses to start on this. Typed entity references cannot go wrong this way, so it mostly catches id strings (`"otlp/backend"`) and hand-edited or parsed configs. A connector id is accepted in receivers and exporters.
|
|
4
|
+
* The collector refuses to start on this. Typed entity references cannot go wrong this way, so it mostly catches id strings (`"otlp/backend"`) and hand-edited or parsed configs. A connector id is accepted in receivers and exporters, but a connector counts as used only when one pipeline lists it as an exporter and another lists it as a receiver; listed on one side only, it fails this check.
|
|
5
5
|
*/
|
|
6
6
|
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
7
7
|
export declare const otel101: PostSynthCheck;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* OTEL103: A declared component is never used
|
|
3
3
|
*
|
|
4
|
-
* A receiver, processor or
|
|
4
|
+
* A receiver, processor, exporter or connector no pipeline lists, or an extension missing from service.extensions, is ignored by the collector. Usually it means a pipeline was meant to list it. A warning, since the config still runs.
|
|
5
5
|
*/
|
|
6
6
|
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
7
7
|
export declare const otel103: PostSynthCheck;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OTEL112: A connector joins pipelines whose signals it does not convert
|
|
3
|
+
*
|
|
4
|
+
* Each connector supports fixed signal pairs: `spanmetrics` and `servicegraph` read traces and write metrics, `count` writes metrics from any signal, `routing` and `forward` keep the signal. Every pipeline that feeds a connector must pair with a pipeline it feeds through one of those pairs, and the other way round, or the collector refuses to start. A traces pipeline that receives from `spanmetrics` fails this check. Custom connectors are checked when their `defineComponent` call lists `connects`.
|
|
5
|
+
*/
|
|
6
|
+
import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
|
|
7
|
+
export declare const otel112: PostSynthCheck;
|
|
8
|
+
//# sourceMappingURL=otel112.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"otel112.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/otel112.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kCAAkC,CAAC;AAG9G,eAAO,MAAM,OAAO,EAAE,cAOrB,CAAC"}
|
package/dist/manifest.json
CHANGED
package/dist/meta.json
CHANGED
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
"kind": "resource",
|
|
10
10
|
"lexicon": "otel"
|
|
11
11
|
},
|
|
12
|
+
"CountConnector": {
|
|
13
|
+
"resourceType": "OTel::Connector::count",
|
|
14
|
+
"kind": "resource",
|
|
15
|
+
"lexicon": "otel"
|
|
16
|
+
},
|
|
12
17
|
"DebugExporter": {
|
|
13
18
|
"resourceType": "OTel::Exporter::debug",
|
|
14
19
|
"kind": "resource",
|
|
@@ -19,6 +24,16 @@
|
|
|
19
24
|
"kind": "resource",
|
|
20
25
|
"lexicon": "otel"
|
|
21
26
|
},
|
|
27
|
+
"FilterProcessor": {
|
|
28
|
+
"resourceType": "OTel::Processor::filter",
|
|
29
|
+
"kind": "resource",
|
|
30
|
+
"lexicon": "otel"
|
|
31
|
+
},
|
|
32
|
+
"ForwardConnector": {
|
|
33
|
+
"resourceType": "OTel::Connector::forward",
|
|
34
|
+
"kind": "resource",
|
|
35
|
+
"lexicon": "otel"
|
|
36
|
+
},
|
|
22
37
|
"GoogleCloudExporter": {
|
|
23
38
|
"resourceType": "OTel::Exporter::googlecloud",
|
|
24
39
|
"kind": "resource",
|
|
@@ -39,6 +54,21 @@
|
|
|
39
54
|
"kind": "resource",
|
|
40
55
|
"lexicon": "otel"
|
|
41
56
|
},
|
|
57
|
+
"K8sClusterReceiver": {
|
|
58
|
+
"resourceType": "OTel::Receiver::k8s_cluster",
|
|
59
|
+
"kind": "resource",
|
|
60
|
+
"lexicon": "otel"
|
|
61
|
+
},
|
|
62
|
+
"KubeletStatsReceiver": {
|
|
63
|
+
"resourceType": "OTel::Receiver::kubeletstats",
|
|
64
|
+
"kind": "resource",
|
|
65
|
+
"lexicon": "otel"
|
|
66
|
+
},
|
|
67
|
+
"LoadBalancingExporter": {
|
|
68
|
+
"resourceType": "OTel::Exporter::loadbalancing",
|
|
69
|
+
"kind": "resource",
|
|
70
|
+
"lexicon": "otel"
|
|
71
|
+
},
|
|
42
72
|
"MemoryLimiterProcessor": {
|
|
43
73
|
"resourceType": "OTel::Processor::memory_limiter",
|
|
44
74
|
"kind": "resource",
|
|
@@ -69,6 +99,11 @@
|
|
|
69
99
|
"kind": "resource",
|
|
70
100
|
"lexicon": "otel"
|
|
71
101
|
},
|
|
102
|
+
"ProbabilisticSamplerProcessor": {
|
|
103
|
+
"resourceType": "OTel::Processor::probabilistic_sampler",
|
|
104
|
+
"kind": "resource",
|
|
105
|
+
"lexicon": "otel"
|
|
106
|
+
},
|
|
72
107
|
"PrometheusExporter": {
|
|
73
108
|
"resourceType": "OTel::Exporter::prometheus",
|
|
74
109
|
"kind": "resource",
|
|
@@ -79,6 +114,11 @@
|
|
|
79
114
|
"kind": "resource",
|
|
80
115
|
"lexicon": "otel"
|
|
81
116
|
},
|
|
117
|
+
"RedactionProcessor": {
|
|
118
|
+
"resourceType": "OTel::Processor::redaction",
|
|
119
|
+
"kind": "resource",
|
|
120
|
+
"lexicon": "otel"
|
|
121
|
+
},
|
|
82
122
|
"ResourceDetectionProcessor": {
|
|
83
123
|
"resourceType": "OTel::Processor::resourcedetection",
|
|
84
124
|
"kind": "resource",
|
|
@@ -89,11 +129,41 @@
|
|
|
89
129
|
"kind": "resource",
|
|
90
130
|
"lexicon": "otel"
|
|
91
131
|
},
|
|
132
|
+
"RoutingConnector": {
|
|
133
|
+
"resourceType": "OTel::Connector::routing",
|
|
134
|
+
"kind": "resource",
|
|
135
|
+
"lexicon": "otel"
|
|
136
|
+
},
|
|
92
137
|
"Service": {
|
|
93
138
|
"resourceType": "OTel::Service",
|
|
94
139
|
"kind": "resource",
|
|
95
140
|
"lexicon": "otel"
|
|
96
141
|
},
|
|
142
|
+
"ServiceGraphConnector": {
|
|
143
|
+
"resourceType": "OTel::Connector::servicegraph",
|
|
144
|
+
"kind": "resource",
|
|
145
|
+
"lexicon": "otel"
|
|
146
|
+
},
|
|
147
|
+
"SpanMetricsConnector": {
|
|
148
|
+
"resourceType": "OTel::Connector::spanmetrics",
|
|
149
|
+
"kind": "resource",
|
|
150
|
+
"lexicon": "otel"
|
|
151
|
+
},
|
|
152
|
+
"SumConnector": {
|
|
153
|
+
"resourceType": "OTel::Connector::sum",
|
|
154
|
+
"kind": "resource",
|
|
155
|
+
"lexicon": "otel"
|
|
156
|
+
},
|
|
157
|
+
"TailSamplingProcessor": {
|
|
158
|
+
"resourceType": "OTel::Processor::tail_sampling",
|
|
159
|
+
"kind": "resource",
|
|
160
|
+
"lexicon": "otel"
|
|
161
|
+
},
|
|
162
|
+
"TransformProcessor": {
|
|
163
|
+
"resourceType": "OTel::Processor::transform",
|
|
164
|
+
"kind": "resource",
|
|
165
|
+
"lexicon": "otel"
|
|
166
|
+
},
|
|
97
167
|
"ZPagesExtension": {
|
|
98
168
|
"resourceType": "OTel::Extension::zpages",
|
|
99
169
|
"kind": "resource",
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The metric names a collector emits, as the `prometheus` exporter serves
|
|
3
|
+
* them: `spanMetricsNames()` for a `spanmetrics` connector, and the naming
|
|
4
|
+
* rules `genAiMetrics()` uses too.
|
|
5
|
+
*
|
|
6
|
+
* A dashboard or an SLO reads names from here instead of repeating them, so
|
|
7
|
+
* renaming the connector's namespace (or the exporter's) moves every query
|
|
8
|
+
* built from it.
|
|
9
|
+
*
|
|
10
|
+
* Naming follows the collector's Prometheus translation at `COLLECTOR_PIN`
|
|
11
|
+
* with the exporter's defaults: `.` and any other character Prometheus does
|
|
12
|
+
* not allow become `_`; counters take `_total`; a unit becomes a suffix
|
|
13
|
+
* (`ms` is `_milliseconds`, `s` is `_seconds`); the exporter's `namespace`
|
|
14
|
+
* is a prefix joined with `_`; `add_metric_suffixes: false` drops the
|
|
15
|
+
* suffixes. Attribute names become label names the same way
|
|
16
|
+
* (`service.name` is `service_name`).
|
|
17
|
+
*
|
|
18
|
+
* This module holds types and string functions only, so a lexicon that
|
|
19
|
+
* builds queries from it does not load the collector components.
|
|
20
|
+
*/
|
|
21
|
+
/** A metric a collector component emits, as the collector names it and as Prometheus exposes it. */
|
|
22
|
+
export interface CollectorMetric {
|
|
23
|
+
/** The OTLP metric name. */
|
|
24
|
+
name: string;
|
|
25
|
+
/** The name the `prometheus` exporter serves; histograms add `_bucket`, `_sum` and `_count`. */
|
|
26
|
+
prometheus: string;
|
|
27
|
+
type: "sum" | "histogram";
|
|
28
|
+
unit?: string;
|
|
29
|
+
/** Attribute names on its data points, beyond the resource. Prometheus labels replace `.` with `_`. */
|
|
30
|
+
dimensions: string[];
|
|
31
|
+
}
|
|
32
|
+
/** The four dimensions spanmetrics puts on every metric unless `exclude_dimensions` names them. */
|
|
33
|
+
export declare const SPANMETRICS_DEFAULT_DIMENSIONS: readonly string[];
|
|
34
|
+
/** The spanmetrics namespace when the connector sets none. */
|
|
35
|
+
export declare const SPANMETRICS_DEFAULT_NAMESPACE = "traces.span.metrics";
|
|
36
|
+
/** The `status.code` value of a span that ended in error: the value an error-ratio query selects. */
|
|
37
|
+
export declare const SPAN_STATUS_ERROR = "STATUS_CODE_ERROR";
|
|
38
|
+
/** How the `prometheus` exporter is configured, as far as naming goes. */
|
|
39
|
+
export interface PrometheusNaming {
|
|
40
|
+
/** The exporter's `namespace`, put in front of every name and joined with `_`. */
|
|
41
|
+
namespace?: string;
|
|
42
|
+
/** The exporter's `add_metric_suffixes` (default true): unit and `_total` suffixes. */
|
|
43
|
+
add_metric_suffixes?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/** An attribute name as a Prometheus label: `service.name` is `service_name`. */
|
|
46
|
+
export declare function prometheusLabel(attribute: string): string;
|
|
47
|
+
/**
|
|
48
|
+
* An OTLP metric name as the `prometheus` exporter serves it.
|
|
49
|
+
*
|
|
50
|
+
* @param type `sum` (a monotonic counter, `_total`) or `histogram`.
|
|
51
|
+
* @param unit The metric's unit, e.g. `ms`. Units in braces (`{call}`) add nothing.
|
|
52
|
+
*/
|
|
53
|
+
export declare function prometheusMetricName(name: string, type: "sum" | "histogram", unit?: string, naming?: PrometheusNaming): string;
|
|
54
|
+
/** The parts of a spanmetrics config the metric names depend on. */
|
|
55
|
+
export interface SpanMetricsNamingConfig {
|
|
56
|
+
namespace?: string;
|
|
57
|
+
dimensions?: Array<{
|
|
58
|
+
name: string;
|
|
59
|
+
}>;
|
|
60
|
+
calls_dimensions?: Array<{
|
|
61
|
+
name: string;
|
|
62
|
+
}>;
|
|
63
|
+
exclude_dimensions?: string[];
|
|
64
|
+
histogram?: {
|
|
65
|
+
disable?: boolean;
|
|
66
|
+
unit?: "ms" | "s";
|
|
67
|
+
dimensions?: Array<{
|
|
68
|
+
name: string;
|
|
69
|
+
}>;
|
|
70
|
+
};
|
|
71
|
+
events?: {
|
|
72
|
+
enabled?: boolean;
|
|
73
|
+
dimensions?: Array<{
|
|
74
|
+
name: string;
|
|
75
|
+
}>;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
/** The metrics one `spanmetrics` connector emits, and the labels a query selects them by. */
|
|
79
|
+
export interface SpanMetricsNames {
|
|
80
|
+
/** The connector's namespace (empty: no prefix). */
|
|
81
|
+
namespace: string;
|
|
82
|
+
/** Span count; `status.code` = `STATUS_CODE_ERROR` selects the errors. */
|
|
83
|
+
calls: CollectorMetric;
|
|
84
|
+
/** Span duration histogram. Absent when `histogram.disable` is set. */
|
|
85
|
+
duration?: CollectorMetric;
|
|
86
|
+
/** Span event count. Present only when `events.enabled` is set. */
|
|
87
|
+
events?: CollectorMetric;
|
|
88
|
+
/**
|
|
89
|
+
* The default dimensions as Prometheus labels. One is absent when
|
|
90
|
+
* `exclude_dimensions` leaves it out, so a query can't select by it.
|
|
91
|
+
*/
|
|
92
|
+
labels: {
|
|
93
|
+
service?: string;
|
|
94
|
+
spanName?: string;
|
|
95
|
+
spanKind?: string;
|
|
96
|
+
statusCode?: string;
|
|
97
|
+
};
|
|
98
|
+
/** The `status_code` value of an error span. */
|
|
99
|
+
errorStatus: string;
|
|
100
|
+
}
|
|
101
|
+
type Declared = {
|
|
102
|
+
componentType?: unknown;
|
|
103
|
+
props?: unknown;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* The Prometheus names of the metrics a `spanmetrics` connector emits, read
|
|
107
|
+
* from its declaration: its namespace, dimensions and histogram unit, and
|
|
108
|
+
* optionally the `prometheus` exporter's namespace and suffix setting.
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* ```ts
|
|
112
|
+
* const spans = new SpanMetricsConnector({ namespace: "shop", histogram: { unit: "s" } });
|
|
113
|
+
* spanMetricsNames(spans).calls.prometheus; // "shop_calls_total"
|
|
114
|
+
* spanMetricsNames(spans).duration!.prometheus; // "shop_duration_seconds"
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
export declare function spanMetricsNames(connector: SpanMetricsNamingConfig | Declared, exporter?: PrometheusNaming | {
|
|
118
|
+
props?: PrometheusNaming;
|
|
119
|
+
}): SpanMetricsNames;
|
|
120
|
+
export {};
|
|
121
|
+
//# sourceMappingURL=metric-names.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metric-names.d.ts","sourceRoot":"","sources":["../src/metric-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,oGAAoG;AACpG,MAAM,WAAW,eAAe;IAC9B,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,gGAAgG;IAChG,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,KAAK,GAAG,WAAW,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uGAAuG;IACvG,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,mGAAmG;AACnG,eAAO,MAAM,8BAA8B,EAAE,SAAS,MAAM,EAA6E,CAAC;AAE1I,8DAA8D;AAC9D,eAAO,MAAM,6BAA6B,wBAAwB,CAAC;AAEnE,qGAAqG;AACrG,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AAYrD,0EAA0E;AAC1E,MAAM,WAAW,gBAAgB;IAC/B,kFAAkF;IAClF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,iFAAiF;AACjF,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAGzD;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,WAAW,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,GAAE,gBAAqB,GAAG,MAAM,CAQlI;AAED,oEAAoE;AACpE,MAAM,WAAW,uBAAuB;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU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B,GAAG,QAAQ,EAC7C,QAAQ,CAAC,EAAE,gBAAgB,GAAG;IAAE,KAAK,CAAC,EAAE,gBAAgB,CAAA;CAAE,GACzD,gBAAgB,CAsClB"}
|
package/dist/model.d.ts
CHANGED
|
@@ -10,14 +10,33 @@
|
|
|
10
10
|
/** The three signals a collector pipeline can carry. */
|
|
11
11
|
export declare const SIGNALS: readonly ["traces", "metrics", "logs"];
|
|
12
12
|
export type Signal = (typeof SIGNALS)[number];
|
|
13
|
-
/**
|
|
14
|
-
|
|
13
|
+
/**
|
|
14
|
+
* The component kinds this lexicon types. A connector is an exporter in one
|
|
15
|
+
* pipeline and a receiver in another, which is how one pipeline feeds another
|
|
16
|
+
* (traces into span metrics, say).
|
|
17
|
+
*/
|
|
18
|
+
export declare const COMPONENT_KINDS: readonly ["receiver", "processor", "exporter", "connector", "extension"];
|
|
15
19
|
export type ComponentKind = (typeof COMPONENT_KINDS)[number];
|
|
20
|
+
/** A top-level config section that holds components. */
|
|
21
|
+
export type ComponentSection = "receivers" | "processors" | "exporters" | "connectors" | "extensions";
|
|
16
22
|
/** The top-level config section each component kind lives under. */
|
|
17
|
-
export declare const SECTION_OF: Record<ComponentKind,
|
|
23
|
+
export declare const SECTION_OF: Record<ComponentKind, ComponentSection>;
|
|
24
|
+
/**
|
|
25
|
+
* One signal pair a connector supports: it is an exporter in a `from`
|
|
26
|
+
* pipeline and a receiver in a `to` pipeline. `spanmetrics` has one,
|
|
27
|
+
* traces to metrics; `forward` has one per signal. `profiles` is the
|
|
28
|
+
* collector's experimental fourth signal, which `count` reads.
|
|
29
|
+
*/
|
|
30
|
+
export interface ConnectorSignalPair {
|
|
31
|
+
from: Signal | "profiles";
|
|
32
|
+
to: Signal | "profiles";
|
|
33
|
+
}
|
|
18
34
|
/** A component id, `type` or `type/name`, exactly as the collector spells it. */
|
|
19
35
|
export type ComponentId = string;
|
|
20
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* One pipeline under `service.pipelines`. `receivers` and `exporters` may name
|
|
38
|
+
* connectors as well as receivers and exporters.
|
|
39
|
+
*/
|
|
21
40
|
export interface PipelineConfig {
|
|
22
41
|
receivers?: ComponentId[];
|
|
23
42
|
processors?: ComponentId[];
|
package/dist/model.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,wDAAwD;AACxD,eAAO,MAAM,OAAO,wCAAyC,CAAC;AAC9D,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9C
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,wDAAwD;AACxD,eAAO,MAAM,OAAO,wCAAyC,CAAC;AAC9D,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,eAAe,0EAA2E,CAAC;AACxG,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D,wDAAwD;AACxD,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,YAAY,GAAG,WAAW,GAAG,YAAY,GAAG,YAAY,CAAC;AAEtG,oEAAoE;AACpE,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAM9D,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC;IAC1B,EAAE,EAAE,MAAM,GAAG,UAAU,CAAC;CACzB;AAED,iFAAiF;AACjF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,WAAW,EAA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,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAGzD;AAED,uEAAuE;AACvE,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAQjF"}
|
package/dist/okf/index.md
CHANGED
|
@@ -6,23 +6,37 @@ okf_version: '0.2'
|
|
|
6
6
|
|
|
7
7
|
* [AttributesProcessor](/types/AttributesProcessor.md) - OTel::Processor::attributes
|
|
8
8
|
* [BatchProcessor](/types/BatchProcessor.md) - OTel::Processor::batch
|
|
9
|
+
* [CountConnector](/types/CountConnector.md) - OTel::Connector::count
|
|
9
10
|
* [DebugExporter](/types/DebugExporter.md) - OTel::Exporter::debug
|
|
10
11
|
* [FileLogReceiver](/types/FileLogReceiver.md) - OTel::Receiver::filelog
|
|
12
|
+
* [FilterProcessor](/types/FilterProcessor.md) - OTel::Processor::filter
|
|
13
|
+
* [ForwardConnector](/types/ForwardConnector.md) - OTel::Connector::forward
|
|
11
14
|
* [GoogleCloudExporter](/types/GoogleCloudExporter.md) - OTel::Exporter::googlecloud
|
|
12
15
|
* [HealthCheckExtension](/types/HealthCheckExtension.md) - OTel::Extension::health_check
|
|
13
16
|
* [HostMetricsReceiver](/types/HostMetricsReceiver.md) - OTel::Receiver::hostmetrics
|
|
14
17
|
* [K8sAttributesProcessor](/types/K8sAttributesProcessor.md) - OTel::Processor::k8sattributes
|
|
18
|
+
* [K8sClusterReceiver](/types/K8sClusterReceiver.md) - OTel::Receiver::k8s_cluster
|
|
19
|
+
* [KubeletStatsReceiver](/types/KubeletStatsReceiver.md) - OTel::Receiver::kubeletstats
|
|
20
|
+
* [LoadBalancingExporter](/types/LoadBalancingExporter.md) - OTel::Exporter::loadbalancing
|
|
15
21
|
* [MemoryLimiterProcessor](/types/MemoryLimiterProcessor.md) - OTel::Processor::memory_limiter
|
|
16
22
|
* [OtlpExporter](/types/OtlpExporter.md) - OTel::Exporter::otlp
|
|
17
23
|
* [OtlpHttpExporter](/types/OtlpHttpExporter.md) - OTel::Exporter::otlphttp
|
|
18
24
|
* [OtlpReceiver](/types/OtlpReceiver.md) - OTel::Receiver::otlp
|
|
19
25
|
* [Pipeline](/types/Pipeline.md) - OTel::Pipeline
|
|
20
26
|
* [PprofExtension](/types/PprofExtension.md) - OTel::Extension::pprof
|
|
27
|
+
* [ProbabilisticSamplerProcessor](/types/ProbabilisticSamplerProcessor.md) - OTel::Processor::probabilistic_sampler
|
|
21
28
|
* [PrometheusExporter](/types/PrometheusExporter.md) - OTel::Exporter::prometheus
|
|
22
29
|
* [PrometheusReceiver](/types/PrometheusReceiver.md) - OTel::Receiver::prometheus
|
|
30
|
+
* [RedactionProcessor](/types/RedactionProcessor.md) - OTel::Processor::redaction
|
|
23
31
|
* [ResourceDetectionProcessor](/types/ResourceDetectionProcessor.md) - OTel::Processor::resourcedetection
|
|
24
32
|
* [ResourceProcessor](/types/ResourceProcessor.md) - OTel::Processor::resource
|
|
33
|
+
* [RoutingConnector](/types/RoutingConnector.md) - OTel::Connector::routing
|
|
25
34
|
* [Service](/types/Service.md) - OTel::Service
|
|
35
|
+
* [ServiceGraphConnector](/types/ServiceGraphConnector.md) - OTel::Connector::servicegraph
|
|
36
|
+
* [SpanMetricsConnector](/types/SpanMetricsConnector.md) - OTel::Connector::spanmetrics
|
|
37
|
+
* [SumConnector](/types/SumConnector.md) - OTel::Connector::sum
|
|
38
|
+
* [TailSamplingProcessor](/types/TailSamplingProcessor.md) - OTel::Processor::tail_sampling
|
|
39
|
+
* [TransformProcessor](/types/TransformProcessor.md) - OTel::Processor::transform
|
|
26
40
|
* [ZPagesExtension](/types/ZPagesExtension.md) - OTel::Extension::zpages
|
|
27
41
|
|
|
28
42
|
# Rules
|
|
@@ -38,3 +52,4 @@ okf_version: '0.2'
|
|
|
38
52
|
* [OTEL107](/rules/OTEL107.md) - A component's config breaks its definition's rules
|
|
39
53
|
* [OTEL108](/rules/OTEL108.md) - Two components or two pipelines declare the same id
|
|
40
54
|
* [OTEL109](/rules/OTEL109.md) - A custom component has no schema pin
|
|
55
|
+
* [OTEL112](/rules/OTEL112.md) - A connector joins pipelines whose signals it does not convert
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: post-synth-check
|
|
3
|
+
title: OTEL112
|
|
4
|
+
description: A connector joins pipelines whose signals it does not convert
|
|
5
|
+
id: OTEL112
|
|
6
|
+
severity: error
|
|
7
|
+
category: post-synth
|
|
8
|
+
lexicon: otel
|
|
9
|
+
docs: https://intentius.io/chant/lexicons/otel/rules/
|
|
10
|
+
---
|
|
11
|
+
A connector joins pipelines whose signals it does not convert
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: ForwardConnector
|
|
4
|
+
description: otel resource type OTel::Connector::forward
|
|
5
|
+
name: ForwardConnector
|
|
6
|
+
lexicon: otel
|
|
7
|
+
resource_type: OTel::Connector::forward
|
|
8
|
+
---
|
|
9
|
+
`OTel::Connector::forward`, a resource type of the otel lexicon.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: K8sClusterReceiver
|
|
4
|
+
description: otel resource type OTel::Receiver::k8s_cluster
|
|
5
|
+
name: K8sClusterReceiver
|
|
6
|
+
lexicon: otel
|
|
7
|
+
resource_type: OTel::Receiver::k8s_cluster
|
|
8
|
+
---
|
|
9
|
+
`OTel::Receiver::k8s_cluster`, a resource type of the otel lexicon.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: KubeletStatsReceiver
|
|
4
|
+
description: otel resource type OTel::Receiver::kubeletstats
|
|
5
|
+
name: KubeletStatsReceiver
|
|
6
|
+
lexicon: otel
|
|
7
|
+
resource_type: OTel::Receiver::kubeletstats
|
|
8
|
+
---
|
|
9
|
+
`OTel::Receiver::kubeletstats`, a resource type of the otel lexicon.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: LoadBalancingExporter
|
|
4
|
+
description: otel resource type OTel::Exporter::loadbalancing
|
|
5
|
+
name: LoadBalancingExporter
|
|
6
|
+
lexicon: otel
|
|
7
|
+
resource_type: OTel::Exporter::loadbalancing
|
|
8
|
+
---
|
|
9
|
+
`OTel::Exporter::loadbalancing`, a resource type of the otel lexicon.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: ProbabilisticSamplerProcessor
|
|
4
|
+
description: otel resource type OTel::Processor::probabilistic_sampler
|
|
5
|
+
name: ProbabilisticSamplerProcessor
|
|
6
|
+
lexicon: otel
|
|
7
|
+
resource_type: OTel::Processor::probabilistic_sampler
|
|
8
|
+
---
|
|
9
|
+
`OTel::Processor::probabilistic_sampler`, a resource type of the otel lexicon.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: RedactionProcessor
|
|
4
|
+
description: otel resource type OTel::Processor::redaction
|
|
5
|
+
name: RedactionProcessor
|
|
6
|
+
lexicon: otel
|
|
7
|
+
resource_type: OTel::Processor::redaction
|
|
8
|
+
---
|
|
9
|
+
`OTel::Processor::redaction`, a resource type of the otel lexicon.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: RoutingConnector
|
|
4
|
+
description: otel resource type OTel::Connector::routing
|
|
5
|
+
name: RoutingConnector
|
|
6
|
+
lexicon: otel
|
|
7
|
+
resource_type: OTel::Connector::routing
|
|
8
|
+
---
|
|
9
|
+
`OTel::Connector::routing`, a resource type of the otel lexicon.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: ServiceGraphConnector
|
|
4
|
+
description: otel resource type OTel::Connector::servicegraph
|
|
5
|
+
name: ServiceGraphConnector
|
|
6
|
+
lexicon: otel
|
|
7
|
+
resource_type: OTel::Connector::servicegraph
|
|
8
|
+
---
|
|
9
|
+
`OTel::Connector::servicegraph`, a resource type of the otel lexicon.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: SpanMetricsConnector
|
|
4
|
+
description: otel resource type OTel::Connector::spanmetrics
|
|
5
|
+
name: SpanMetricsConnector
|
|
6
|
+
lexicon: otel
|
|
7
|
+
resource_type: OTel::Connector::spanmetrics
|
|
8
|
+
---
|
|
9
|
+
`OTel::Connector::spanmetrics`, a resource type of the otel lexicon.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: TailSamplingProcessor
|
|
4
|
+
description: otel resource type OTel::Processor::tail_sampling
|
|
5
|
+
name: TailSamplingProcessor
|
|
6
|
+
lexicon: otel
|
|
7
|
+
resource_type: OTel::Processor::tail_sampling
|
|
8
|
+
---
|
|
9
|
+
`OTel::Processor::tail_sampling`, a resource type of the otel lexicon.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resource-type
|
|
3
|
+
title: TransformProcessor
|
|
4
|
+
description: otel resource type OTel::Processor::transform
|
|
5
|
+
name: TransformProcessor
|
|
6
|
+
lexicon: otel
|
|
7
|
+
resource_type: OTel::Processor::transform
|
|
8
|
+
---
|
|
9
|
+
`OTel::Processor::transform`, a resource type of the otel lexicon.
|
package/dist/pipeline.d.ts
CHANGED
|
@@ -5,19 +5,25 @@
|
|
|
5
5
|
* keeps the reference checked by TypeScript, or by id string (`otlp/backend`)
|
|
6
6
|
* for a component declared somewhere chant can't see. OTEL101 catches a
|
|
7
7
|
* string that names nothing declared.
|
|
8
|
+
*
|
|
9
|
+
* A connector goes in `exporters` of the pipeline that feeds it and in
|
|
10
|
+
* `receivers` of the pipeline it feeds. The same entity on both sides is what
|
|
11
|
+
* joins the two pipelines.
|
|
8
12
|
*/
|
|
9
13
|
import type { Declarable } from "@intentius/chant/declarable";
|
|
10
14
|
import type { OTelComponent } from "./define.js";
|
|
11
15
|
import { type ComponentKind, type Signal } from "./model.js";
|
|
12
|
-
/** A reference to a component of kind `K
|
|
16
|
+
/** A reference to a component of kind `K` (or of any kind in a union): the declared entity, or its id. */
|
|
13
17
|
export type ComponentRef<K extends ComponentKind> = OTelComponent<K, string, any> | string;
|
|
14
18
|
export interface PipelineProps {
|
|
15
19
|
signal: Signal;
|
|
16
20
|
/** The instance name. The pipeline id becomes `signal/name`. */
|
|
17
21
|
name?: string;
|
|
18
|
-
|
|
22
|
+
/** Receivers, and connectors this pipeline takes data from. */
|
|
23
|
+
receivers: ComponentRef<"receiver" | "connector">[];
|
|
19
24
|
processors?: ComponentRef<"processor">[];
|
|
20
|
-
|
|
25
|
+
/** Exporters, and connectors this pipeline hands data to. */
|
|
26
|
+
exporters: ComponentRef<"exporter" | "connector">[];
|
|
21
27
|
}
|
|
22
28
|
export interface PipelineEntity extends Declarable {
|
|
23
29
|
readonly props: PipelineProps;
|
package/dist/pipeline.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../src/pipeline.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../src/pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAe,KAAK,aAAa,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAC;AAEvE,0GAA0G;AAE1G,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,aAAa,IAAI,aAAa,CA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G,UAAU,CAAC;QACjD,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;KAC1C,CAAC;IACF,MAAM,CAAC,EAAE;QACP,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;QAC5C,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,UAAU,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,EAAE,CAAC;IACzC,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B;AAED,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;CAC9B;AAED,mFAAmF;AACnF,eAAO,MAAM,OAAO,EAA0D,KAAK,KAAK,EAAE,YAAY,KAAK,aAAa,CAAC;AAEzH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAExE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAEtE"}
|
package/dist/plugin.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { LexiconPlugin } from "@intentius/chant/lexicon";
|
|
|
2
2
|
/**
|
|
3
3
|
* OpenTelemetry Collector lexicon plugin.
|
|
4
4
|
*
|
|
5
|
-
* Typed receivers, processors, exporters and extensions, pipelines and the
|
|
5
|
+
* Typed receivers, processors, exporters, connectors and extensions, pipelines and the
|
|
6
6
|
* service block, serialized to one collector config file. A component chant
|
|
7
7
|
* doesn't ship comes in through `defineComponent`, and is serialized and
|
|
8
8
|
* checked the same way as the built-ins.
|
|
@@ -52,7 +52,7 @@ function toDiagnostic(issue: CollectorIssue, source?: string): PostSynthDiagnost
|
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
/** Diagnostics for one config-level code (OTEL101-OTEL106) across every collector config in the output. */
|
|
55
|
+
/** Diagnostics for one config-level code (OTEL101-OTEL106, OTEL112) across every collector config in the output. */
|
|
56
56
|
export function configDiagnostics(ctx: PostSynthContext, code: CollectorIssueCode): PostSynthDiagnostic[] {
|
|
57
57
|
return collectorConfigs(ctx).flatMap(({ source, config }) =>
|
|
58
58
|
validateCollectorConfig(config)
|
package/dist/rules/otel101.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* OTEL101: A pipeline uses a receiver, processor or exporter that is not declared
|
|
3
3
|
*
|
|
4
|
-
* The collector refuses to start on this. Typed entity references cannot go wrong this way, so it mostly catches id strings (`"otlp/backend"`) and hand-edited or parsed configs. A connector id is accepted in receivers and exporters.
|
|
4
|
+
* The collector refuses to start on this. Typed entity references cannot go wrong this way, so it mostly catches id strings (`"otlp/backend"`) and hand-edited or parsed configs. A connector id is accepted in receivers and exporters, but a connector counts as used only when one pipeline lists it as an exporter and another lists it as a receiver; listed on one side only, it fails this check.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
|
package/dist/rules/otel103.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* OTEL103: A declared component is never used
|
|
3
3
|
*
|
|
4
|
-
* A receiver, processor or
|
|
4
|
+
* A receiver, processor, exporter or connector no pipeline lists, or an extension missing from service.extensions, is ignored by the collector. Usually it means a pipeline was meant to list it. A warning, since the config still runs.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
|