@intentius/chant-lexicon-otel 0.95.0 → 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
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in sampling components: the tail_sampling and probabilistic_sampler
|
|
3
|
+
* processors, and the loadbalancing exporter that routes every span of a trace
|
|
4
|
+
* to the same collector so tail sampling sees whole traces.
|
|
5
|
+
*
|
|
6
|
+
* Field shapes follow `processor/tailsamplingprocessor`,
|
|
7
|
+
* `processor/probabilisticsamplerprocessor` and
|
|
8
|
+
* `exporter/loadbalancingexporter` at `COLLECTOR_PIN`.
|
|
9
|
+
*/
|
|
10
|
+
import type { Duration, ExporterHelperSettings, GRPCClientSettings } from "./common.js";
|
|
11
|
+
/** Samples a trace whose duration is at least `threshold_ms` (and below `upper_threshold_ms`, when set). */
|
|
12
|
+
export interface LatencyPolicyConfig {
|
|
13
|
+
threshold_ms: number;
|
|
14
|
+
upper_threshold_ms?: number;
|
|
15
|
+
}
|
|
16
|
+
/** Samples a trace with a span whose integer attribute `key` falls within `min_value` to `max_value`. */
|
|
17
|
+
export interface NumericAttributePolicyConfig {
|
|
18
|
+
key: string;
|
|
19
|
+
min_value?: number;
|
|
20
|
+
max_value?: number;
|
|
21
|
+
invert_match?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/** Samples a fixed percentage of traces by trace id hash. */
|
|
24
|
+
export interface ProbabilisticPolicyConfig {
|
|
25
|
+
sampling_percentage: number;
|
|
26
|
+
hash_salt?: string;
|
|
27
|
+
}
|
|
28
|
+
export type SpanStatusCode = "OK" | "ERROR" | "UNSET";
|
|
29
|
+
/** Samples a trace with a span whose status is one of `status_codes`. */
|
|
30
|
+
export interface StatusCodePolicyConfig {
|
|
31
|
+
status_codes: SpanStatusCode[];
|
|
32
|
+
}
|
|
33
|
+
/** Samples a trace with a span whose string attribute `key` matches one of `values`. */
|
|
34
|
+
export interface StringAttributePolicyConfig {
|
|
35
|
+
key: string;
|
|
36
|
+
values: string[];
|
|
37
|
+
enabled_regex_matching?: boolean;
|
|
38
|
+
cache_max_size?: number;
|
|
39
|
+
invert_match?: boolean;
|
|
40
|
+
}
|
|
41
|
+
/** Samples traces until `spans_per_second` is reached. */
|
|
42
|
+
export interface RateLimitingPolicyConfig {
|
|
43
|
+
spans_per_second: number;
|
|
44
|
+
}
|
|
45
|
+
/** Samples a trace whose span count falls within `min_spans` to `max_spans`. */
|
|
46
|
+
export interface SpanCountPolicyConfig {
|
|
47
|
+
min_spans: number;
|
|
48
|
+
max_spans?: number;
|
|
49
|
+
}
|
|
50
|
+
/** Samples a trace whose W3C trace state key `key` has one of `values`. */
|
|
51
|
+
export interface TraceStatePolicyConfig {
|
|
52
|
+
key: string;
|
|
53
|
+
values: string[];
|
|
54
|
+
}
|
|
55
|
+
/** Samples a trace with a span whose boolean attribute `key` equals `value`. */
|
|
56
|
+
export interface BooleanAttributePolicyConfig {
|
|
57
|
+
key: string;
|
|
58
|
+
value: boolean;
|
|
59
|
+
invert_match?: boolean;
|
|
60
|
+
}
|
|
61
|
+
/** Samples a trace when any OTTL condition on a span or span event is true. */
|
|
62
|
+
export interface OttlConditionPolicyConfig {
|
|
63
|
+
error_mode?: "ignore" | "silent" | "propagate";
|
|
64
|
+
span?: string[];
|
|
65
|
+
spanevent?: string[];
|
|
66
|
+
}
|
|
67
|
+
interface PolicyBase<T extends string> {
|
|
68
|
+
/** Unique within its list; the collector refuses an empty or repeated name. */
|
|
69
|
+
name: string;
|
|
70
|
+
type: T;
|
|
71
|
+
}
|
|
72
|
+
export interface AlwaysSamplePolicy extends PolicyBase<"always_sample"> {
|
|
73
|
+
}
|
|
74
|
+
export interface LatencyPolicy extends PolicyBase<"latency"> {
|
|
75
|
+
latency: LatencyPolicyConfig;
|
|
76
|
+
}
|
|
77
|
+
export interface NumericAttributePolicy extends PolicyBase<"numeric_attribute"> {
|
|
78
|
+
numeric_attribute: NumericAttributePolicyConfig;
|
|
79
|
+
}
|
|
80
|
+
export interface ProbabilisticPolicy extends PolicyBase<"probabilistic"> {
|
|
81
|
+
probabilistic: ProbabilisticPolicyConfig;
|
|
82
|
+
}
|
|
83
|
+
export interface StatusCodePolicy extends PolicyBase<"status_code"> {
|
|
84
|
+
status_code: StatusCodePolicyConfig;
|
|
85
|
+
}
|
|
86
|
+
export interface StringAttributePolicy extends PolicyBase<"string_attribute"> {
|
|
87
|
+
string_attribute: StringAttributePolicyConfig;
|
|
88
|
+
}
|
|
89
|
+
export interface RateLimitingPolicy extends PolicyBase<"rate_limiting"> {
|
|
90
|
+
rate_limiting: RateLimitingPolicyConfig;
|
|
91
|
+
}
|
|
92
|
+
export interface SpanCountPolicy extends PolicyBase<"span_count"> {
|
|
93
|
+
span_count: SpanCountPolicyConfig;
|
|
94
|
+
}
|
|
95
|
+
export interface TraceStatePolicy extends PolicyBase<"trace_state"> {
|
|
96
|
+
trace_state: TraceStatePolicyConfig;
|
|
97
|
+
}
|
|
98
|
+
export interface BooleanAttributePolicy extends PolicyBase<"boolean_attribute"> {
|
|
99
|
+
boolean_attribute: BooleanAttributePolicyConfig;
|
|
100
|
+
}
|
|
101
|
+
export interface OttlConditionPolicy extends PolicyBase<"ottl_condition"> {
|
|
102
|
+
ottl_condition: OttlConditionPolicyConfig;
|
|
103
|
+
}
|
|
104
|
+
/** A policy that decides on its own: every type except `and`, `composite` and `drop`. Also the shape of an `and` sub-policy. */
|
|
105
|
+
export type TailSamplingLeafPolicy = AlwaysSamplePolicy | LatencyPolicy | NumericAttributePolicy | ProbabilisticPolicy | StatusCodePolicy | StringAttributePolicy | RateLimitingPolicy | SpanCountPolicy | TraceStatePolicy | BooleanAttributePolicy | OttlConditionPolicy;
|
|
106
|
+
/** Samples a trace only when every sub-policy samples it. */
|
|
107
|
+
export interface AndPolicy extends PolicyBase<"and"> {
|
|
108
|
+
and: {
|
|
109
|
+
and_sub_policy: TailSamplingLeafPolicy[];
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
/** Drops a trace when every sub-policy matches it, whatever the other policies decide. */
|
|
113
|
+
export interface DropPolicy extends PolicyBase<"drop"> {
|
|
114
|
+
drop: {
|
|
115
|
+
drop_sub_policy: TailSamplingLeafPolicy[];
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/** A composite sub-policy: a leaf policy or an `and`. */
|
|
119
|
+
export type CompositeSubPolicy = TailSamplingLeafPolicy | AndPolicy;
|
|
120
|
+
/**
|
|
121
|
+
* Shares `max_total_spans_per_second` between sub-policies. Each
|
|
122
|
+
* `rate_allocation` entry names a sub-policy and its percent of the budget;
|
|
123
|
+
* `policy_order` is the order sub-policies are evaluated in.
|
|
124
|
+
*/
|
|
125
|
+
export interface CompositePolicy extends PolicyBase<"composite"> {
|
|
126
|
+
composite: {
|
|
127
|
+
max_total_spans_per_second: number;
|
|
128
|
+
policy_order: string[];
|
|
129
|
+
composite_sub_policy: CompositeSubPolicy[];
|
|
130
|
+
rate_allocation?: Array<{
|
|
131
|
+
policy: string;
|
|
132
|
+
percent: number;
|
|
133
|
+
}>;
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
/** One entry in `tail_sampling.policies`, discriminated by `type`. The config sits under the key named by `type`. */
|
|
137
|
+
export type TailSamplingPolicy = TailSamplingLeafPolicy | AndPolicy | DropPolicy | CompositePolicy;
|
|
138
|
+
export type TailSamplingPolicyType = TailSamplingPolicy["type"];
|
|
139
|
+
export interface TailSamplingProcessorConfig {
|
|
140
|
+
/** How long after a trace's first span the decision is made. The collector's default is 30s; chant asks for it explicitly. */
|
|
141
|
+
decision_wait: Duration;
|
|
142
|
+
/** Policies, evaluated for every trace. A trace is sampled when any policy samples it and no `drop` policy drops it. */
|
|
143
|
+
policies: TailSamplingPolicy[];
|
|
144
|
+
num_traces?: number;
|
|
145
|
+
expected_new_traces_per_sec?: number;
|
|
146
|
+
decision_cache?: {
|
|
147
|
+
sampled_cache_size?: number;
|
|
148
|
+
non_sampled_cache_size?: number;
|
|
149
|
+
};
|
|
150
|
+
sample_on_first_match?: boolean;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Holds each trace for `decision_wait`, then samples it when a policy says so.
|
|
154
|
+
* Tail sampling needs every span of a trace in one collector: run it on a
|
|
155
|
+
* gateway behind the `loadbalancing` exporter, not on a per-node agent.
|
|
156
|
+
*/
|
|
157
|
+
export declare const TailSamplingProcessor: import("../index.js").ComponentClass<"processor", "tail_sampling", TailSamplingProcessorConfig>;
|
|
158
|
+
export interface ProbabilisticSamplerProcessorConfig {
|
|
159
|
+
/** Percent of traces or logs kept, 0 to 100. The collector's default is 0, which keeps nothing, so chant asks for it. */
|
|
160
|
+
sampling_percentage: number;
|
|
161
|
+
/** Salt for `hash_seed` mode. Collectors that sample the same data must share it. */
|
|
162
|
+
hash_seed?: number;
|
|
163
|
+
/** `hash_seed` (the default for logs), `proportional` (the default for traces) or `equalizing`. */
|
|
164
|
+
mode?: "hash_seed" | "proportional" | "equalizing";
|
|
165
|
+
/** Default true: an item without usable randomness is dropped. */
|
|
166
|
+
fail_closed?: boolean;
|
|
167
|
+
/** Hex digits of threshold precision, 1 to 14; default 4. */
|
|
168
|
+
sampling_precision?: number;
|
|
169
|
+
/** Logs only: sample on the trace id (default) or on `from_attribute` of the record. */
|
|
170
|
+
attribute_source?: "traceID" | "record";
|
|
171
|
+
from_attribute?: string;
|
|
172
|
+
/** Logs only: an attribute whose value overrides the sampling percentage for its record. */
|
|
173
|
+
sampling_priority?: string;
|
|
174
|
+
}
|
|
175
|
+
/** Head sampling: keeps a fixed percentage of traces or logs, decided per item without waiting for the rest of the trace. */
|
|
176
|
+
export declare const ProbabilisticSamplerProcessor: import("../index.js").ComponentClass<"processor", "probabilistic_sampler", ProbabilisticSamplerProcessorConfig>;
|
|
177
|
+
/** A fixed list of backends, each `host` or `host:port` (port 4317 when omitted). */
|
|
178
|
+
export interface StaticResolverConfig {
|
|
179
|
+
hostnames: string[];
|
|
180
|
+
}
|
|
181
|
+
/** Backends found by resolving a DNS name, e.g. a headless Service. */
|
|
182
|
+
export interface DnsResolverConfig {
|
|
183
|
+
hostname: string;
|
|
184
|
+
/** Default `4317`. */
|
|
185
|
+
port?: string;
|
|
186
|
+
interval?: Duration;
|
|
187
|
+
timeout?: Duration;
|
|
188
|
+
}
|
|
189
|
+
/** Backends found by watching a Kubernetes Service's endpoints. Needs RBAC to list and watch EndpointSlices. */
|
|
190
|
+
export interface K8sResolverConfig {
|
|
191
|
+
/** `name` or `name.namespace`. */
|
|
192
|
+
service: string;
|
|
193
|
+
/** Default `[4317]`. */
|
|
194
|
+
ports?: number[];
|
|
195
|
+
timeout?: Duration;
|
|
196
|
+
/** Use pod hostnames instead of IPs, e.g. for a StatefulSet behind a headless Service. */
|
|
197
|
+
return_hostnames?: boolean;
|
|
198
|
+
}
|
|
199
|
+
/** Backends found in AWS Cloud Map. */
|
|
200
|
+
export interface AwsCloudMapResolverConfig {
|
|
201
|
+
namespace: string;
|
|
202
|
+
service_name: string;
|
|
203
|
+
health_status?: "HEALTHY" | "UNHEALTHY" | "ALL" | "HEALTHY_OR_ELSE_ALL";
|
|
204
|
+
interval?: Duration;
|
|
205
|
+
timeout?: Duration;
|
|
206
|
+
port?: number;
|
|
207
|
+
}
|
|
208
|
+
/** Exactly one resolver; the collector refuses none or several. */
|
|
209
|
+
export type LoadBalancingResolver = {
|
|
210
|
+
static: StaticResolverConfig;
|
|
211
|
+
dns?: never;
|
|
212
|
+
k8s?: never;
|
|
213
|
+
aws_cloud_map?: never;
|
|
214
|
+
} | {
|
|
215
|
+
dns: DnsResolverConfig;
|
|
216
|
+
static?: never;
|
|
217
|
+
k8s?: never;
|
|
218
|
+
aws_cloud_map?: never;
|
|
219
|
+
} | {
|
|
220
|
+
k8s: K8sResolverConfig;
|
|
221
|
+
static?: never;
|
|
222
|
+
dns?: never;
|
|
223
|
+
aws_cloud_map?: never;
|
|
224
|
+
} | {
|
|
225
|
+
aws_cloud_map: AwsCloudMapResolverConfig;
|
|
226
|
+
static?: never;
|
|
227
|
+
dns?: never;
|
|
228
|
+
k8s?: never;
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* `traceID` (the default for traces and logs), `service` or `attributes` for
|
|
232
|
+
* traces; `service` (the default for metrics), `resource`, `metric` or
|
|
233
|
+
* `streamID` for metrics. Logs always route by trace id.
|
|
234
|
+
*/
|
|
235
|
+
export type LoadBalancingRoutingKey = "traceID" | "service" | "attributes" | "resource" | "metric" | "streamID";
|
|
236
|
+
/** The otlp exporter settings used for every backend. The endpoint comes from the resolver, so it is not set here. */
|
|
237
|
+
export type LoadBalancingOtlpConfig = Omit<GRPCClientSettings, "endpoint"> & ExporterHelperSettings;
|
|
238
|
+
export type LoadBalancingExporterConfig = ExporterHelperSettings & {
|
|
239
|
+
protocol?: {
|
|
240
|
+
otlp: LoadBalancingOtlpConfig;
|
|
241
|
+
};
|
|
242
|
+
resolver: LoadBalancingResolver;
|
|
243
|
+
routing_key?: LoadBalancingRoutingKey;
|
|
244
|
+
/** With `routing_key: attributes`, the span attributes to route on. */
|
|
245
|
+
routing_attributes?: string[];
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* Sends each trace (or service, or metric stream) to one backend chosen by a
|
|
249
|
+
* consistent hash over the resolver's backends. Put it on the agents in front
|
|
250
|
+
* of a multi-replica gateway that runs `tail_sampling`.
|
|
251
|
+
*/
|
|
252
|
+
export declare const LoadBalancingExporter: import("../index.js").ComponentClass<"exporter", "loadbalancing", LoadBalancingExporterConfig>;
|
|
253
|
+
/**
|
|
254
|
+
* The backends a `loadbalancing` resolver names, as `host:port` where it can:
|
|
255
|
+
* static hostnames as given, a DNS name with its port, a Kubernetes Service
|
|
256
|
+
* once per port, a Cloud Map service as `aws-cloud-map://namespace/service`.
|
|
257
|
+
*/
|
|
258
|
+
export declare function loadBalancingEndpoints(resolver: LoadBalancingResolver | undefined): string[];
|
|
259
|
+
export {};
|
|
260
|
+
//# sourceMappingURL=sampling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sampling.d.ts","sourceRoot":"","sources":["../../src/components/sampling.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAIrF,4GAA4G;AAC5G,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,yGAAyG;AACzG,MAAM,WAAW,4BAA4B;IAC3C,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,6DAA6D;AAC7D,MAAM,WAAW,yBAAyB;IACxC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,OAAO,GAAG,OAAO,CAAC;AAEtD,yEAAyE;AACzE,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,cAAc,EAAE,CAAC;CAChC;AAED,wFAAwF;AACxF,MAAM,WAAW,2BAA2B;IAC1C,GAAG,EAAE,MAAM,CAAC;IAC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|
* lexicon.
|
|
4
4
|
*
|
|
5
|
-
* The built-in receivers, processors, exporters and extensions are
|
|
6
|
-
* through it, and so is a component a team or plugin adds for something
|
|
7
|
-
* doesn't ship (a vendor exporter, an in-house processor). Both produce the
|
|
5
|
+
* The built-in receivers, processors, exporters, connectors and extensions are
|
|
6
|
+
* defined through it, and so is a component a team or plugin adds for something
|
|
7
|
+
* chant doesn't ship (a vendor exporter, an in-house processor). Both produce the
|
|
8
8
|
* same kind of class, register in the same table, serialize through the same
|
|
9
9
|
* code and are checked by the same post-synth checks, so there is no second
|
|
10
10
|
* path for a custom component to fall off.
|
|
@@ -24,9 +24,15 @@
|
|
|
24
24
|
* the top of the emitted YAML, so the file says which schema each
|
|
25
25
|
* non-built-in component was checked against. The collector ignores it.
|
|
26
26
|
* - OTEL109 fails a build whose custom component has no usable pin.
|
|
27
|
+
*
|
|
28
|
+
* Semantic-convention pins (`GENAI_SEMCONV_PIN`) record which version of an
|
|
29
|
+
* attribute vocabulary a preset's keys follow. They are not tied to a
|
|
30
|
+
* component type, so `collectorTopology()` reports them under `semconv` for
|
|
31
|
+
* each component whose config uses that vocabulary, and the serializer writes
|
|
32
|
+
* one `# chant: semconv` line for them.
|
|
27
33
|
*/
|
|
28
34
|
import type { Declarable } from "@intentius/chant/declarable";
|
|
29
|
-
import { type ComponentKind } from "./model.js";
|
|
35
|
+
import { type ComponentKind, type ConnectorSignalPair } from "./model.js";
|
|
30
36
|
/** Where a component's config schema comes from, and which version of it the type follows. */
|
|
31
37
|
export interface SchemaPin {
|
|
32
38
|
/** The package, Go module or URL that defines the component's config, e.g. `@acme/otel-datadog`. */
|
|
@@ -41,6 +47,20 @@ export interface SchemaPin {
|
|
|
41
47
|
* lexicon change like any other, released with this package.
|
|
42
48
|
*/
|
|
43
49
|
export declare const COLLECTOR_PIN: SchemaPin;
|
|
50
|
+
/**
|
|
51
|
+
* The OpenTelemetry GenAI semantic conventions the GenAI preset
|
|
52
|
+
* (`genAiPipeline()`) follows: which attributes carry prompt and completion
|
|
53
|
+
* content, and which name the operation, model, tool and token usage.
|
|
54
|
+
*
|
|
55
|
+
* v1.41.1 is the last semantic-conventions release that defines `gen_ai.*`
|
|
56
|
+
* itself. From v1.42.0 the GenAI conventions live in
|
|
57
|
+
* github.com/open-telemetry/semantic-conventions-genai, which had published no
|
|
58
|
+
* release when this pin was set; move the pin there once it does. Like
|
|
59
|
+
* `COLLECTOR_PIN`, it moves only when this package does, and
|
|
60
|
+
* `collectorTopology()` reports it for every component whose config names a
|
|
61
|
+
* `gen_ai.` attribute.
|
|
62
|
+
*/
|
|
63
|
+
export declare const GENAI_SEMCONV_PIN: SchemaPin;
|
|
44
64
|
/** A zod-compatible schema: anything with `safeParse`. Keeps zod optional. */
|
|
45
65
|
export interface SafeParseSchema {
|
|
46
66
|
safeParse(value: unknown): {
|
|
@@ -70,6 +90,13 @@ export interface ComponentDefinition<K extends ComponentKind = ComponentKind, T
|
|
|
70
90
|
validate?: ConfigValidator<C>;
|
|
71
91
|
/** Where this component sends or listens, for `collectorTopology()`. */
|
|
72
92
|
endpoints?: (config: C) => string[];
|
|
93
|
+
/**
|
|
94
|
+
* Connectors only: the signal pairs the connector supports, as its factory
|
|
95
|
+
* registers them. OTEL112 checks each pipeline a connector joins against
|
|
96
|
+
* these, and `collectorTopology()` reports an edge only for a supported
|
|
97
|
+
* pair. A connector without them is not checked.
|
|
98
|
+
*/
|
|
99
|
+
connects?: ReadonlyArray<ConnectorSignalPair>;
|
|
73
100
|
}
|
|
74
101
|
/** What a custom component supplies. `builtin` is always false for these. */
|
|
75
102
|
export type CustomComponentOptions<K extends ComponentKind, T extends string, C> = Omit<ComponentDefinition<K, T, C>, "builtin">;
|
package/dist/define.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../src/define.ts"],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,KACvC,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAG3B;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAQtE;AAED,4FAA4F;AAC5F,wBAAgB,YAAY,CAAC,CAAC,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM,EAAE,CAW9F;AAED,4DAA4D;AAC5D,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,SAAS,CAI1D"}
|
package/dist/genai.d.ts
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A collector preset for workloads that emit OpenTelemetry GenAI spans:
|
|
3
|
+
* content removal, and agent RED and token metrics.
|
|
4
|
+
*
|
|
5
|
+
* Attribute keys follow `GENAI_SEMCONV_PIN`. Content (prompts, completions,
|
|
6
|
+
* system instructions, tool-call arguments and results, retrieval queries and
|
|
7
|
+
* documents) is deleted from spans, span events and log records unless the
|
|
8
|
+
* caller passes `keepContent: true`. A `transform` processor deletes the keys;
|
|
9
|
+
* `redaction` cannot delete one named key while keeping the rest, so it runs
|
|
10
|
+
* after the transform as a masking backstop on the same keys and for any
|
|
11
|
+
* value patterns the caller adds.
|
|
12
|
+
*
|
|
13
|
+
* Metrics come from a branch taken before any sampling: the traces pipeline
|
|
14
|
+
* forwards every span to `traces/genai`, which keeps only spans with a
|
|
15
|
+
* `gen_ai.operation.name`, and feeds `spanmetrics` (calls, errors and
|
|
16
|
+
* duration by operation, model, tool and error type) and `sum` (input and
|
|
17
|
+
* output tokens by model). `spanmetrics` counts spans and
|
|
18
|
+
* cannot sum an attribute, which is why token usage comes from the `sum`
|
|
19
|
+
* connector.
|
|
20
|
+
*/
|
|
21
|
+
import type { Declarable } from "@intentius/chant/declarable";
|
|
22
|
+
import { type OTelComponent, type SchemaPin } from "./define.js";
|
|
23
|
+
import { type FilterProcessorConfig, type RedactionProcessorConfig, type TransformProcessorConfig } from "./components/filtering.js";
|
|
24
|
+
import { type ForwardConnectorConfig, type SpanMetricsConnectorConfig, type SpanMetricsDimension, type SumConnectorConfig } from "./components/connectors.js";
|
|
25
|
+
import type { Duration } from "./components/common.js";
|
|
26
|
+
import { type CollectorMetric } from "./metric-names.js";
|
|
27
|
+
/** GenAI attributes the preset reads. */
|
|
28
|
+
export declare const GENAI_ATTRIBUTES: Readonly<{
|
|
29
|
+
readonly operationName: "gen_ai.operation.name";
|
|
30
|
+
readonly providerName: "gen_ai.provider.name";
|
|
31
|
+
readonly requestModel: "gen_ai.request.model";
|
|
32
|
+
readonly responseModel: "gen_ai.response.model";
|
|
33
|
+
readonly agentName: "gen_ai.agent.name";
|
|
34
|
+
readonly toolName: "gen_ai.tool.name";
|
|
35
|
+
readonly inputTokens: "gen_ai.usage.input_tokens";
|
|
36
|
+
readonly outputTokens: "gen_ai.usage.output_tokens";
|
|
37
|
+
/** From the general conventions; GenAI spans set it on failure. */
|
|
38
|
+
readonly errorType: "error.type";
|
|
39
|
+
}>;
|
|
40
|
+
/**
|
|
41
|
+
* Attributes that carry content: what users and models said, and what tools
|
|
42
|
+
* were given and returned. The conventions mark each opt-in and sensitive.
|
|
43
|
+
* `gen_ai.prompt` and `gen_ai.completion` are deprecated, but older
|
|
44
|
+
* instrumentation still sets them.
|
|
45
|
+
*/
|
|
46
|
+
export declare const GENAI_CONTENT_ATTRIBUTES: readonly string[];
|
|
47
|
+
/**
|
|
48
|
+
* Indexed content keys some instrumentation libraries write outside the
|
|
49
|
+
* conventions (`gen_ai.prompt.0.content`, `gen_ai.completion.1.role`). The
|
|
50
|
+
* index keeps `gen_ai.prompt.name`, a convention attribute, out of it.
|
|
51
|
+
*/
|
|
52
|
+
export declare const GENAI_INDEXED_CONTENT_PATTERN = "^gen_ai\\.(prompt|completion)\\.[0-9]+\\..+$";
|
|
53
|
+
/**
|
|
54
|
+
* Deprecated content events. Their content is in the log record body, not in
|
|
55
|
+
* attributes, so the preset deletes `content`, `message` and `tool_calls`
|
|
56
|
+
* from the body of these events.
|
|
57
|
+
*/
|
|
58
|
+
export declare const GENAI_CONTENT_EVENTS: readonly string[];
|
|
59
|
+
/** The spanmetrics dimensions the preset adds to service.name, span.name, span.kind and status.code. */
|
|
60
|
+
export declare const GENAI_SPAN_METRIC_DIMENSIONS: readonly string[];
|
|
61
|
+
/**
|
|
62
|
+
* The attribute token sums are split by. One only: the pinned `sum`
|
|
63
|
+
* connector adds each value once per attribute, so a second one would double
|
|
64
|
+
* every sum.
|
|
65
|
+
*/
|
|
66
|
+
export declare const GENAI_TOKEN_DIMENSIONS: readonly string[];
|
|
67
|
+
/** The model label on token sums for a span that names no model, so its tokens are counted rather than skipped. */
|
|
68
|
+
export declare const GENAI_UNKNOWN_MODEL = "unknown";
|
|
69
|
+
/** Default duration buckets, sized for model and tool calls rather than HTTP handlers. */
|
|
70
|
+
export declare const GENAI_DURATION_BUCKETS: readonly Duration[];
|
|
71
|
+
/** One metric the preset emits, as the collector names it and as Prometheus exposes it. */
|
|
72
|
+
export type GenAiMetric = CollectorMetric;
|
|
73
|
+
export interface GenAiMetrics {
|
|
74
|
+
/** Span count, with `status.code` = `STATUS_CODE_ERROR` for errors. */
|
|
75
|
+
calls: GenAiMetric;
|
|
76
|
+
duration: GenAiMetric;
|
|
77
|
+
inputTokens: GenAiMetric;
|
|
78
|
+
outputTokens: GenAiMetric;
|
|
79
|
+
}
|
|
80
|
+
export interface GenAiMetricsOptions {
|
|
81
|
+
/** Prefix of the emitted metric names. Default `genai`, outside the conventions' own `gen_ai` namespace. */
|
|
82
|
+
namespace?: string;
|
|
83
|
+
/** Dimensions added to the span metrics beyond the GenAI ones. */
|
|
84
|
+
dimensions?: SpanMetricsDimension[];
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The metrics `genAiPipeline()` emits for the given options: names,
|
|
88
|
+
* Prometheus names and dimensions. A dashboard reads this instead of
|
|
89
|
+
* repeating the names, so renaming the namespace moves the panels with it.
|
|
90
|
+
*/
|
|
91
|
+
export declare function genAiMetrics(options?: GenAiMetricsOptions): GenAiMetrics;
|
|
92
|
+
type Exporter = OTelComponent<"exporter", string, any>;
|
|
93
|
+
type Processor = OTelComponent<"processor", string, any>;
|
|
94
|
+
export interface GenAiComponentsOptions extends GenAiMetricsOptions {
|
|
95
|
+
/**
|
|
96
|
+
* Keep content attributes and bodies. Default false: they are deleted.
|
|
97
|
+
* Setting this is the one way to keep prompts and completions, so a config
|
|
98
|
+
* that keeps them says so where it is declared.
|
|
99
|
+
*/
|
|
100
|
+
keepContent?: boolean;
|
|
101
|
+
/** More attribute keys that hold content, deleted along with the convention ones. */
|
|
102
|
+
contentAttributes?: string[];
|
|
103
|
+
/** RE2 patterns masked in every attribute value (redaction `blocked_values`), whether content is kept or not. */
|
|
104
|
+
maskValues?: string[];
|
|
105
|
+
/** Hash masked values with this function instead of writing `****`. */
|
|
106
|
+
hashFunction?: RedactionProcessorConfig["hash_function"];
|
|
107
|
+
/** Duration histogram buckets. Default `GENAI_DURATION_BUCKETS`. */
|
|
108
|
+
buckets?: Duration[];
|
|
109
|
+
/** How often span and token metrics are flushed. Default 15s. */
|
|
110
|
+
metricsFlushInterval?: Duration;
|
|
111
|
+
}
|
|
112
|
+
export interface GenAiComponents {
|
|
113
|
+
/** Deletes content keys and event bodies (`transform/genai_content`). Absent when content is kept. */
|
|
114
|
+
contentRemoval?: OTelComponent<"processor", "transform", TransformProcessorConfig>;
|
|
115
|
+
/**
|
|
116
|
+
* Masks what is left (`redaction/genai_content`): the content keys, as a
|
|
117
|
+
* backstop behind the transform, and `maskValues`. Absent when content is
|
|
118
|
+
* kept and nothing is masked.
|
|
119
|
+
*/
|
|
120
|
+
redaction?: OTelComponent<"processor", "redaction", RedactionProcessorConfig>;
|
|
121
|
+
/** Content removal then redaction, in the order a pipeline should run them. */
|
|
122
|
+
processors: Processor[];
|
|
123
|
+
/** Carries every span from the traces pipeline to `traces/genai` (`forward/genai`). */
|
|
124
|
+
forward: OTelComponent<"connector", "forward", ForwardConnectorConfig>;
|
|
125
|
+
/** Keeps only GenAI spans in `traces/genai` (`filter/genai_spans`). */
|
|
126
|
+
genAiSpans: OTelComponent<"processor", "filter", FilterProcessorConfig>;
|
|
127
|
+
/** Calls, errors and duration per GenAI dimension (`spanmetrics/genai`). */
|
|
128
|
+
spanMetrics: OTelComponent<"connector", "spanmetrics", SpanMetricsConnectorConfig>;
|
|
129
|
+
/** Input and output token sums (`sum/genai_tokens`). */
|
|
130
|
+
tokenUsage: OTelComponent<"connector", "sum", SumConnectorConfig>;
|
|
131
|
+
metrics: GenAiMetrics;
|
|
132
|
+
/** The semantic conventions the attribute keys follow. */
|
|
133
|
+
semconv: SchemaPin;
|
|
134
|
+
}
|
|
135
|
+
/** The pieces of the GenAI preset, for wiring into pipelines you declare yourself. */
|
|
136
|
+
export declare function genAiComponents(options?: GenAiComponentsOptions): GenAiComponents;
|
|
137
|
+
export interface GenAiPipelineOptions extends GenAiComponentsOptions {
|
|
138
|
+
/** Where traces go. Default: one `debug` exporter at `basic` verbosity. */
|
|
139
|
+
traceExporters?: Exporter[];
|
|
140
|
+
/** Where the span and token metrics go. Default: the same `debug` exporter. */
|
|
141
|
+
metricExporters?: Exporter[];
|
|
142
|
+
/** Where logs (and events sent as logs) go. Default: the same `debug` exporter. */
|
|
143
|
+
logExporters?: Exporter[];
|
|
144
|
+
/** Give logs a pipeline, so event-based content is removed too. Default: true. */
|
|
145
|
+
logs?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Processors that thin exported traces, such as `tail_sampling`. They run
|
|
148
|
+
* in a `traces/sampled` pipeline after the metrics branch, so metrics still
|
|
149
|
+
* count every span.
|
|
150
|
+
*/
|
|
151
|
+
sampling?: Processor[];
|
|
152
|
+
/** Serve `health_check` on 0.0.0.0:13133. Default: true. */
|
|
153
|
+
healthCheck?: boolean;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* The entities of an OTLP collector for GenAI workloads: an `otlp` receiver
|
|
157
|
+
* on 4317 and 4318; `memory_limiter`, content removal and `batch` on traces
|
|
158
|
+
* and logs; a `traces/genai` branch that turns GenAI spans into metrics
|
|
159
|
+
* before any sampling; and a `metrics/genai` pipeline that exports them. Pass
|
|
160
|
+
* the result to `collectorYaml`, or use `genAiComponents()` to wire the
|
|
161
|
+
* pieces into pipelines of your own.
|
|
162
|
+
*/
|
|
163
|
+
export declare function genAiPipeline(options?: GenAiPipelineOptions): Declarable[];
|
|
164
|
+
export {};
|
|
165
|
+
//# sourceMappingURL=genai.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"genai.d.ts","sourceRoot":"","sources":["../src/genai.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAqB,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAKjF,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAE9B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAwD,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAI5G,yCAAyC;AACzC,eAAO,MAAM,gBAAgB;;;;;;;;;IAS3B,mEAAmE;;EAE1D,CAAC;AAEZ;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EAUpD,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,iDAAiD,CAAC;AAE5F;;;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B,4DAA4D;IAC5D,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAAG,UAAU,EAAE,CA2E9E"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,11 +2,14 @@ export { otelPlugin } from "./plugin.js";
|
|
|
2
2
|
export { otelSerializer } from "./serializer.js";
|
|
3
3
|
export * from "./components/index.js";
|
|
4
4
|
export { Pipeline, Service, PIPELINE_TYPE, SERVICE_TYPE, isPipelineEntity, isServiceEntity, type ComponentRef, type PipelineProps, type PipelineEntity, type ServiceProps, type ServiceEntity, type ServiceTelemetry, } from "./pipeline.js";
|
|
5
|
-
export { defineComponent, definitionFor, definitionOf, registeredDefinitions, componentEntityType, isOTelComponent, COLLECTOR_PIN, type SchemaPin, type SafeParseSchema, type ConfigValidator, type ComponentDefinition, type CustomComponentOptions, type ComponentProps, type ComponentClass, type OTelComponent, } from "./define.js";
|
|
5
|
+
export { defineComponent, definitionFor, definitionOf, registeredDefinitions, componentEntityType, isOTelComponent, COLLECTOR_PIN, GENAI_SEMCONV_PIN, type SchemaPin, type SafeParseSchema, type ConfigValidator, type ComponentDefinition, type CustomComponentOptions, type ComponentProps, type ComponentClass, type OTelComponent, } from "./define.js";
|
|
6
6
|
export * from "./model.js";
|
|
7
7
|
export { buildCollectorConfig, collectorYaml, componentConfig, type BuiltCollector } from "./collector.js";
|
|
8
8
|
export { emitCollectorYaml, type EmitOptions } from "./yaml.js";
|
|
9
9
|
export { validateCollectorConfig, validateCollectorEntities, type CollectorIssue, type CollectorIssueCode, } from "./validate-config.js";
|
|
10
|
-
export { collectorTopology, collectorTopologyOf, type CollectorTopology, type TopologyPipeline, type TopologyComponent, type TopologyExporter, } from "./topology.js";
|
|
10
|
+
export { collectorTopology, collectorTopologyOf, type CollectorTopology, type TopologyPipeline, type TopologyComponent, type TopologyExporter, type TopologyEdge, type SemconvUsage, } from "./topology.js";
|
|
11
|
+
export { semconvUsage, SEMCONV_VOCABULARIES, type SemconvVocabulary } from "./semconv.js";
|
|
11
12
|
export { otlpCollector, collectorEndpoints, COLLECTOR_IMAGE, COLLECTOR_CONFIG_PATH, type OtlpCollectorOptions, type CollectorPort, type CollectorEndpoints, } from "./platform.js";
|
|
13
|
+
export { genAiPipeline, genAiComponents, genAiMetrics, GENAI_ATTRIBUTES, GENAI_CONTENT_ATTRIBUTES, GENAI_CONTENT_EVENTS, GENAI_INDEXED_CONTENT_PATTERN, GENAI_SPAN_METRIC_DIMENSIONS, GENAI_TOKEN_DIMENSIONS, GENAI_DURATION_BUCKETS, GENAI_UNKNOWN_MODEL, type GenAiPipelineOptions, type GenAiComponentsOptions, type GenAiComponents, type GenAiMetricsOptions, type GenAiMetrics, type GenAiMetric, } from "./genai.js";
|
|
14
|
+
export { spanMetricsNames, prometheusMetricName, prometheusLabel, SPANMETRICS_DEFAULT_DIMENSIONS, SPANMETRICS_DEFAULT_NAMESPACE, SPAN_STATUS_ERROR, type CollectorMetric, type SpanMetricsNames, type SpanMetricsNamingConfig, type PrometheusNaming, } from "./metric-names.js";
|
|
12
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9C,cAAc,cAAc,CAAC;AAG7B,OAAO,EACL,QAAQ,EACR,OAAO,EACP,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,gBAAgB,GACtB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,eAAe,EACf,aAAa,EACb,YAAY,E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B,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,GACtB,MAAM,gBAAgB,CAAC"}
|
package/dist/integrity.json
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
5
|
-
"meta.json": "
|
|
4
|
+
"manifest.json": "d55dfd02a3f59eed669170add564fa591994a8c4dcc74754b52ea5b1f4560bb9",
|
|
5
|
+
"meta.json": "664490c2bee6c839f22994b789adc4708b01a37195f9c193dfb3c974959c5d74",
|
|
6
6
|
"types/index.d.ts": "a1070fd1cb3e8d8a9002fc5a75a80b3bdda02965be351e8aed2dbc2f63d36e3c",
|
|
7
7
|
"rules/component-id-syntax.ts": "95f507614d2626159140d906bce9d086e8ecba18ede22f5ddfbda13ac1c08169",
|
|
8
8
|
"rules/literal-credential.ts": "7a48049b25a157cb36942399d5fcec810e9aba4c6fc318fb5b098296eb37069c",
|
|
9
9
|
"rules/otel-ast.ts": "cf286102f778bd010d130ad8de6adc279de517fffffcd49d7cfb3c419b4bec66",
|
|
10
|
-
"rules/otel-helpers.ts": "
|
|
11
|
-
"rules/otel101.ts": "
|
|
10
|
+
"rules/otel-helpers.ts": "22f5ed00f5cf33638558eb4363c7deeeefa2cdc3e666404f5235caf471fb1466",
|
|
11
|
+
"rules/otel101.ts": "9a9d5f79403fb07e78752f904741ab4cec8c0f00975b44fe0b6eace63fda4c13",
|
|
12
12
|
"rules/otel102.ts": "4b3612bc28097e46b33d6f7b187903fe1ecba4e5bda88189e9b1a5aaf37062a8",
|
|
13
|
-
"rules/otel103.ts": "
|
|
13
|
+
"rules/otel103.ts": "8e404d7c7104a678de6351a4a4caf0aab1e6ae63c810cce889975bbeebc1a632",
|
|
14
14
|
"rules/otel104.ts": "f7f3a7110cb9d1565b5d39ee18caa0029cfe3a1fafb6118dfcdaf70ea81fd75d",
|
|
15
15
|
"rules/otel105.ts": "f1eaf43ac59ff300f970eda637addfc6c60d16860f8b675b0f0a84f8af316561",
|
|
16
16
|
"rules/otel106.ts": "7b6b5c5f1a1c15a114624c0b9f45af9db02b8b792c616c0e909136083ac93e6d",
|
|
17
17
|
"rules/otel107.ts": "db5d7c8a23d510159e203ed101ce71b23f1e0319b60ee4b1445fe7a0d973d978",
|
|
18
18
|
"rules/otel108.ts": "5eddca667b3ec563a1a7bc745139738d438c4307b4861b999a4d8cff975856b6",
|
|
19
19
|
"rules/otel109.ts": "db025b5f09cc8c5199b420fdfd6e4bae0dd5abd1860903d8c9b4d625162a32b9",
|
|
20
|
-
"
|
|
20
|
+
"rules/otel112.ts": "0a6d9a7d6ba281f3b011dde18646f7c15280dcb8cfeddaa6d20c6080a2c92cb0",
|
|
21
|
+
"skills/chant-otel.md": "ffb9463406afe9a5b275e71cd3af4bb57bb181bec77ec9a1d4e0bf8d453cb8dd",
|
|
21
22
|
"skills/chant-otel-custom-components.md": "82e53bb482281f79b428e66fb80a1c194ead74a1a34a88bbebb11c6ad5493258",
|
|
22
23
|
"skills/chant-otel-platforms.md": "c90836952dc5c88d668b890152a5063bdb656bce73fc7fa3233a3ea58ad85686"
|
|
23
24
|
},
|
|
24
|
-
"composite": "
|
|
25
|
+
"composite": "02a6eb470ce218c6060cb8b8900803ad4a7701aaaf09ef0249e2a2cd5752ee92"
|
|
25
26
|
}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* The otel lexicon's chant audit catalog, contributed via
|
|
3
3
|
* `otelPlugin.auditCatalog()` (#687, #1346).
|
|
4
4
|
*
|
|
5
|
-
* OTEL101-OTEL106 read the emitted collector YAML, so they are
|
|
5
|
+
* OTEL101-OTEL106 and OTEL112 read the emitted collector YAML, so they are
|
|
6
|
+
* `yamlBased`.
|
|
6
7
|
* OTEL107-OTEL109 read the declared entities (a component's definition, its
|
|
7
8
|
* schema pin), which a standalone YAML file does not carry, so they are
|
|
8
9
|
* constructed with `yamlBased: false`. The two source-level lint rules are
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-catalog.d.ts","sourceRoot":"","sources":["../../src/lint/audit-catalog.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"audit-catalog.d.ts","sourceRoot":"","sources":["../../src/lint/audit-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAW1E,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAuFrD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAYvE,eAAO,MAAM,eAAe,EAAE,cAAc,EAW3C,CAAC"}
|
|
@@ -15,7 +15,7 @@ export declare function collectorConfigs(ctx: PostSynthContext): Array<{
|
|
|
15
15
|
source: string;
|
|
16
16
|
config: CollectorConfig;
|
|
17
17
|
}>;
|
|
18
|
-
/** Diagnostics for one config-level code (OTEL101-OTEL106) across every collector config in the output. */
|
|
18
|
+
/** Diagnostics for one config-level code (OTEL101-OTEL106, OTEL112) across every collector config in the output. */
|
|
19
19
|
export declare function configDiagnostics(ctx: PostSynthContext, code: CollectorIssueCode): PostSynthDiagnostic[];
|
|
20
20
|
/** Diagnostics for one entity-level code (OTEL107-OTEL109) over the build's otel entities. */
|
|
21
21
|
export declare function entityDiagnostics(ctx: PostSynthContext, code: CollectorIssueCode): PostSynthDiagnostic[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otel-helpers.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/otel-helpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAI9F,OAAO,EAA4B,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAsD,KAAK,kBAAkB,EAAuB,MAAM,uBAAuB,CAAC;AAEzI;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,gBAAgB,GAAG,KAAK,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,CAAC,CAwB1G;AAYD,
|
|
1
|
+
{"version":3,"file":"otel-helpers.d.ts","sourceRoot":"","sources":["../../../src/lint/post-synth/otel-helpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAI9F,OAAO,EAA4B,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAsD,KAAK,kBAAkB,EAAuB,MAAM,uBAAuB,CAAC;AAEzI;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,gBAAgB,GAAG,KAAK,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,eAAe,CAAA;CAAE,CAAC,CAwB1G;AAYD,oHAAoH;AACpH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,kBAAkB,GAAG,mBAAmB,EAAE,CAMxG;AAED,8FAA8F;AAC9F,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,kBAAkB,GAAG,mBAAmB,EAAE,CAKxG"}
|