@intentius/chant-lexicon-otel 0.102.0 → 0.104.1

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.
Files changed (122) hide show
  1. package/README.md +1 -1
  2. package/dist/attribution.d.ts +69 -0
  3. package/dist/attribution.d.ts.map +1 -0
  4. package/dist/codegen/docs.d.ts.map +1 -1
  5. package/dist/components/processors.d.ts +1 -1
  6. package/dist/components/processors.d.ts.map +1 -1
  7. package/dist/components/sampling.d.ts +3 -0
  8. package/dist/components/sampling.d.ts.map +1 -1
  9. package/dist/config-hygiene.d.ts +33 -0
  10. package/dist/config-hygiene.d.ts.map +1 -0
  11. package/dist/define.d.ts +18 -2
  12. package/dist/define.d.ts.map +1 -1
  13. package/dist/import/generator.d.ts +5 -1
  14. package/dist/import/generator.d.ts.map +1 -1
  15. package/dist/import/parser.d.ts +1 -1
  16. package/dist/import/parser.d.ts.map +1 -1
  17. package/dist/index.d.ts +4 -2
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/integrity.json +15 -5
  20. package/dist/lint/audit-catalog.d.ts +3 -2
  21. package/dist/lint/audit-catalog.d.ts.map +1 -1
  22. package/dist/lint/post-synth/index.d.ts.map +1 -1
  23. package/dist/lint/post-synth/otel-helpers.d.ts +2 -2
  24. package/dist/lint/post-synth/otel-helpers.d.ts.map +1 -1
  25. package/dist/lint/post-synth/otel118.d.ts +8 -0
  26. package/dist/lint/post-synth/otel118.d.ts.map +1 -0
  27. package/dist/lint/post-synth/otel119.d.ts +8 -0
  28. package/dist/lint/post-synth/otel119.d.ts.map +1 -0
  29. package/dist/lint/post-synth/otel120.d.ts +8 -0
  30. package/dist/lint/post-synth/otel120.d.ts.map +1 -0
  31. package/dist/lint/post-synth/otel121.d.ts +8 -0
  32. package/dist/lint/post-synth/otel121.d.ts.map +1 -0
  33. package/dist/lint/post-synth/otel122.d.ts +8 -0
  34. package/dist/lint/post-synth/otel122.d.ts.map +1 -0
  35. package/dist/lint/post-synth/otel123.d.ts +8 -0
  36. package/dist/lint/post-synth/otel123.d.ts.map +1 -0
  37. package/dist/lint/post-synth/otel124.d.ts +8 -0
  38. package/dist/lint/post-synth/otel124.d.ts.map +1 -0
  39. package/dist/lint/post-synth/otel125.d.ts +8 -0
  40. package/dist/lint/post-synth/otel125.d.ts.map +1 -0
  41. package/dist/lint/post-synth/otel126.d.ts +8 -0
  42. package/dist/lint/post-synth/otel126.d.ts.map +1 -0
  43. package/dist/lint/post-synth/otel127.d.ts +8 -0
  44. package/dist/lint/post-synth/otel127.d.ts.map +1 -0
  45. package/dist/lint/rules/literal-credential.d.ts.map +1 -1
  46. package/dist/manifest.json +1 -1
  47. package/dist/metric-names.d.ts +29 -0
  48. package/dist/metric-names.d.ts.map +1 -1
  49. package/dist/model.d.ts +24 -0
  50. package/dist/model.d.ts.map +1 -1
  51. package/dist/okf/index.md +10 -0
  52. package/dist/okf/rules/OTEL118.md +11 -0
  53. package/dist/okf/rules/OTEL119.md +11 -0
  54. package/dist/okf/rules/OTEL120.md +11 -0
  55. package/dist/okf/rules/OTEL121.md +11 -0
  56. package/dist/okf/rules/OTEL122.md +11 -0
  57. package/dist/okf/rules/OTEL123.md +11 -0
  58. package/dist/okf/rules/OTEL124.md +11 -0
  59. package/dist/okf/rules/OTEL125.md +11 -0
  60. package/dist/okf/rules/OTEL126.md +11 -0
  61. package/dist/okf/rules/OTEL127.md +11 -0
  62. package/dist/platform.d.ts +11 -8
  63. package/dist/platform.d.ts.map +1 -1
  64. package/dist/rules/literal-credential.ts +2 -3
  65. package/dist/rules/otel-helpers.ts +15 -4
  66. package/dist/rules/otel118.ts +17 -0
  67. package/dist/rules/otel119.ts +17 -0
  68. package/dist/rules/otel120.ts +17 -0
  69. package/dist/rules/otel121.ts +17 -0
  70. package/dist/rules/otel122.ts +17 -0
  71. package/dist/rules/otel123.ts +17 -0
  72. package/dist/rules/otel124.ts +17 -0
  73. package/dist/rules/otel125.ts +17 -0
  74. package/dist/rules/otel126.ts +17 -0
  75. package/dist/rules/otel127.ts +17 -0
  76. package/dist/semconv.d.ts +2 -1
  77. package/dist/semconv.d.ts.map +1 -1
  78. package/dist/skills/chant-otel.md +6 -2
  79. package/dist/validate-config.d.ts +27 -9
  80. package/dist/validate-config.d.ts.map +1 -1
  81. package/package.json +2 -2
  82. package/src/attribution.ts +385 -0
  83. package/src/codegen/docs.ts +8 -1
  84. package/src/components/k8s-receivers.test.ts +5 -2
  85. package/src/components/processors.ts +1 -1
  86. package/src/components/sampling.ts +3 -0
  87. package/src/composites/composites.test.ts +16 -0
  88. package/src/config-hygiene.ts +470 -0
  89. package/src/connectors.test.ts +3 -0
  90. package/src/define.ts +25 -4
  91. package/src/import/generator.test.ts +42 -4
  92. package/src/import/generator.ts +7 -2
  93. package/src/import/parser.test.ts +11 -0
  94. package/src/import/parser.ts +16 -4
  95. package/src/import/roundtrip.test.ts +90 -14
  96. package/src/index.ts +7 -0
  97. package/src/lint/audit-catalog.ts +87 -2
  98. package/src/lint/post-synth/hygiene.test.ts +334 -0
  99. package/src/lint/post-synth/index.ts +20 -0
  100. package/src/lint/post-synth/otel-helpers.ts +15 -4
  101. package/src/lint/post-synth/otel118.test.ts +308 -0
  102. package/src/lint/post-synth/otel118.ts +17 -0
  103. package/src/lint/post-synth/otel119.ts +17 -0
  104. package/src/lint/post-synth/otel120.ts +17 -0
  105. package/src/lint/post-synth/otel121.ts +17 -0
  106. package/src/lint/post-synth/otel122.ts +17 -0
  107. package/src/lint/post-synth/otel123.ts +17 -0
  108. package/src/lint/post-synth/otel124.ts +17 -0
  109. package/src/lint/post-synth/otel125.ts +17 -0
  110. package/src/lint/post-synth/otel126.ts +17 -0
  111. package/src/lint/post-synth/otel127.ts +17 -0
  112. package/src/lint/post-synth/post-synth.test.ts +18 -0
  113. package/src/lint/rules/literal-credential.ts +2 -3
  114. package/src/metric-names.test.ts +24 -2
  115. package/src/metric-names.ts +66 -1
  116. package/src/model.ts +48 -0
  117. package/src/platform.test.ts +35 -0
  118. package/src/platform.ts +28 -19
  119. package/src/plugin.test.ts +10 -0
  120. package/src/semconv.ts +6 -2
  121. package/src/skills/chant-otel.md +6 -2
  122. package/src/validate-config.ts +81 -16
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "otel",
3
- "version": "0.102.0",
3
+ "version": "0.104.1",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "OTel",
6
6
  "intrinsics": [],
@@ -117,5 +117,34 @@ type Declared = {
117
117
  export declare function spanMetricsNames(connector: SpanMetricsNamingConfig | Declared, exporter?: PrometheusNaming | {
118
118
  props?: PrometheusNaming;
119
119
  }): SpanMetricsNames;
120
+ /** The prefix of every metric the `servicegraph` connector emits; the connector takes no namespace. */
121
+ export declare const SERVICEGRAPH_NAMESPACE = "traces_service_graph";
122
+ /** The parts of a servicegraph config the metric labels depend on. */
123
+ export interface ServiceGraphNamingConfig {
124
+ dimensions?: string[];
125
+ virtual_node_extra_label?: boolean;
126
+ }
127
+ /** The metrics one `servicegraph` connector emits. */
128
+ export interface ServiceGraphNames {
129
+ /** Requests per edge. */
130
+ requests: CollectorMetric;
131
+ /** Failed requests per edge. */
132
+ failed: CollectorMetric;
133
+ /** Server-side request duration histogram, in seconds. */
134
+ serverDuration: CollectorMetric;
135
+ /** Client-side request duration histogram, in seconds. */
136
+ clientDuration: CollectorMetric;
137
+ }
138
+ /**
139
+ * The Prometheus names of the metrics a `servicegraph` connector emits at
140
+ * `COLLECTOR_PIN`, with its default feature gates: latency in seconds, under
141
+ * `_request_server` and `_request_client`. Every metric carries `client`,
142
+ * `server`, `connection_type` and `failed`, `client_<d>` and `server_<d>` for
143
+ * each configured dimension, and `virtual_node` when
144
+ * `virtual_node_extra_label` is set (connector/servicegraphconnector/connector.go).
145
+ */
146
+ export declare function serviceGraphNames(connector: ServiceGraphNamingConfig | Declared, exporter?: PrometheusNaming | {
147
+ props?: PrometheusNaming;
148
+ }): ServiceGraphNames;
120
149
  export {};
121
150
  //# sourceMappingURL=metric-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IACvC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED,sDAAsD;AACtD,MAAM,WAAW,iBAAiB;IAChC,yBAAyB;IACzB,QAAQ,EAAE,eAAe,CAAC;IAC1B,gCAAgC;IAChC,MAAM,EAAE,eAAe,CAAC;IACxB,0DAA0D;IAC1D,cAAc,EAAE,eAAe,CAAC;IAChC,0DAA0D;IAC1D,cAAc,EAAE,eAAe,CAAC;CACjC;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,wBAAwB,GAAG,QAAQ,EAC9C,QAAQ,CAAC,EAAE,gBAAgB,GAAG;IAAE,KAAK,CAAC,EAAE,gBAAgB,CAAA;CAAE,GACzD,iBAAiB,CA6BnB"}
package/dist/model.d.ts CHANGED
@@ -69,4 +69,28 @@ export declare function isComponentId(id: string): boolean;
69
69
  export declare function pipelineSignal(pipelineId: string): string;
70
70
  /** True when a parsed document has the shape of a collector config. */
71
71
  export declare function looksLikeCollectorConfig(value: unknown): value is CollectorConfig;
72
+ /**
73
+ * A built-in type the collector renamed, keeping the old name as a
74
+ * deprecated alias. `type` is the new name and `builtin` the name chant's
75
+ * class declares and emits. `since` is the first release of `repo` whose
76
+ * `metadata.yaml` for the component lists `builtin` as `deprecated_type`.
77
+ */
78
+ export interface ComponentTypeAlias {
79
+ kind: ComponentKind;
80
+ type: string;
81
+ builtin: string;
82
+ since: string;
83
+ repo: "core" | "contrib";
84
+ }
85
+ /**
86
+ * The renamed built-ins. chant emits `builtin`, which the pinned collector
87
+ * (`COLLECTOR_PIN`, v0.130.0) knows and newer ones still accept. A config
88
+ * written for a newer collector may use `type`, so code that reads a config
89
+ * (the importer, the checks, the k8s composites) accepts both.
90
+ */
91
+ export declare const COMPONENT_TYPE_ALIASES: readonly ComponentTypeAlias[];
92
+ /** The type chant declares for `kind` + `type`: the old name of a renamed built-in, otherwise `type` itself. */
93
+ export declare function canonicalComponentType(kind: ComponentKind, type: string): string;
94
+ /** The type of component id `id`, with a renamed built-in's new name read as the old one: `span_metrics/genai` is `spanmetrics`. */
95
+ export declare function canonicalTypeOf(kind: ComponentKind, id: string): string;
72
96
  //# sourceMappingURL=model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,wDAAwD;AACxD,eAAO,MAAM,OAAO,YAAI,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAU,CAAC;AAC9D,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,eAAe,YAAI,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,CAAU,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,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,WAAW,EAAE,CAAC;IAC3B,SAAS,CAAC,EAAE,WAAW,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,EAAE,W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AAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,kBAAkB,EAa/D,CAAC;AAIF,gHAAgH;AAChH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhF;AAED,oIAAoI;AACpI,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAGvE"}
package/dist/okf/index.md CHANGED
@@ -61,3 +61,13 @@ okf_version: '0.2'
61
61
  * [OTEL115](/rules/OTEL115.md) - A routing connector routes to a pipeline that does not receive from it
62
62
  * [OTEL116](/rules/OTEL116.md) - A connector splits metrics by a high-cardinality GenAI attribute
63
63
  * [OTEL117](/rules/OTEL117.md) - Two components the collector starts listen on the same address
64
+ * [OTEL118](/rules/OTEL118.md) - A pipeline processor can remove or replace a resource attribute chant's telemetry attribution stamps
65
+ * [OTEL119](/rules/OTEL119.md) - A collector config sets a field deprecated at or before the pinned release
66
+ * [OTEL120](/rules/OTEL120.md) - A component in the collector config holds a literal credential
67
+ * [OTEL121](/rules/OTEL121.md) - An exporter sends a credential over plaintext
68
+ * [OTEL122](/rules/OTEL122.md) - zpages or pprof listens on a non-loopback address
69
+ * [OTEL123](/rules/OTEL123.md) - A debug exporter at verbosity detailed shares a pipeline with a real exporter
70
+ * [OTEL124](/rules/OTEL124.md) - A remote exporter has its sending queue or retries turned off
71
+ * [OTEL125](/rules/OTEL125.md) - A pipeline sends to a remote otlp or otlphttp exporter without batching
72
+ * [OTEL126](/rules/OTEL126.md) - k8sattributes extracts a metadata field it does not support
73
+ * [OTEL127](/rules/OTEL127.md) - resourcedetection lists a detector that does not exist
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: OTEL118
4
+ description: A pipeline processor can remove or replace a resource attribute chant's telemetry attribution stamps
5
+ id: OTEL118
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: otel
9
+ docs: https://intentius.io/chant/lexicons/otel/rules/
10
+ ---
11
+ A pipeline processor can remove or replace a resource attribute chant's telemetry attribution stamps
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: OTEL119
4
+ description: A collector config sets a field deprecated at or before the pinned release
5
+ id: OTEL119
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: otel
9
+ docs: https://intentius.io/chant/lexicons/otel/rules/
10
+ ---
11
+ A collector config sets a field deprecated at or before the pinned release
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: OTEL120
4
+ description: A component in the collector config holds a literal credential
5
+ id: OTEL120
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: otel
9
+ docs: https://intentius.io/chant/lexicons/otel/rules/
10
+ ---
11
+ A component in the collector config holds a literal credential
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: OTEL121
4
+ description: An exporter sends a credential over plaintext
5
+ id: OTEL121
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: otel
9
+ docs: https://intentius.io/chant/lexicons/otel/rules/
10
+ ---
11
+ An exporter sends a credential over plaintext
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: OTEL122
4
+ description: zpages or pprof listens on a non-loopback address
5
+ id: OTEL122
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: otel
9
+ docs: https://intentius.io/chant/lexicons/otel/rules/
10
+ ---
11
+ zpages or pprof listens on a non-loopback address
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: OTEL123
4
+ description: A debug exporter at verbosity detailed shares a pipeline with a real exporter
5
+ id: OTEL123
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: otel
9
+ docs: https://intentius.io/chant/lexicons/otel/rules/
10
+ ---
11
+ A debug exporter at verbosity detailed shares a pipeline with a real exporter
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: OTEL124
4
+ description: A remote exporter has its sending queue or retries turned off
5
+ id: OTEL124
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: otel
9
+ docs: https://intentius.io/chant/lexicons/otel/rules/
10
+ ---
11
+ A remote exporter has its sending queue or retries turned off
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: OTEL125
4
+ description: A pipeline sends to a remote otlp or otlphttp exporter without batching
5
+ id: OTEL125
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: otel
9
+ docs: https://intentius.io/chant/lexicons/otel/rules/
10
+ ---
11
+ A pipeline sends to a remote otlp or otlphttp exporter without batching
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: OTEL126
4
+ description: k8sattributes extracts a metadata field it does not support
5
+ id: OTEL126
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: otel
9
+ docs: https://intentius.io/chant/lexicons/otel/rules/
10
+ ---
11
+ k8sattributes extracts a metadata field it does not support
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: OTEL127
4
+ description: resourcedetection lists a detector that does not exist
5
+ id: OTEL127
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: otel
9
+ docs: https://intentius.io/chant/lexicons/otel/rules/
10
+ ---
11
+ resourcedetection lists a detector that does not exist
@@ -34,9 +34,11 @@ export interface CollectorPort {
34
34
  /** A name usable as a k8s port name: lowercase, `-` separated, at most 15 characters. */
35
35
  name: string;
36
36
  port: number;
37
+ /** Set when the listener is UDP. A port without it is TCP. */
38
+ protocol?: "UDP";
37
39
  }
38
40
  export interface CollectorEndpoints {
39
- /** Ports the receivers listen on, in config order, one entry per port. */
41
+ /** Ports the receivers, then the exporters, listen on, in config order, one entry per port and protocol. */
40
42
  ports: CollectorPort[];
41
43
  /**
42
44
  * The `health_check` extension, when the service enables one and it listens
@@ -49,13 +51,14 @@ export interface CollectorEndpoints {
49
51
  };
50
52
  }
51
53
  /**
52
- * The ports a built collector config listens on: the endpoint of every
53
- * receiver that listens (otlp, zipkin, jaeger; the receivers OTEL117 knows),
54
- * named after the receiver and the protocol key above it (`otlp-grpc`,
55
- * `otlp-http`), and the `health_check` port if the service enables it. A
56
- * receiver whose `endpoint` is a server it connects to, such as
57
- * kubeletstats' kubelet, adds no port, and neither does a receiver type the
58
- * table doesn't list.
54
+ * The ports a built collector config listens on: the address every receiver
55
+ * and exporter that listens sets (the types OTEL117 knows: otlp, jaeger,
56
+ * statsd, syslog, the `prometheus` exporter's scrape endpoint and the rest),
57
+ * named after the component and the key above the address (`otlp-grpc`,
58
+ * `syslog-udp`), and the `health_check` port if the service enables it. A
59
+ * component whose `endpoint` is a server it connects to, such as
60
+ * kubeletstats' kubelet, adds no port, and neither does a type the table
61
+ * doesn't list. A UDP listener gets `protocol: "UDP"`.
59
62
  */
60
63
  export declare function collectorEndpoints(config: CollectorConfig): CollectorEndpoints;
61
64
  //# sourceMappingURL=platform.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAM7D,OAAO,EAA6B,KAAK,eAAe,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAC;AAGvF,4FAA4F;AAC5F,eAAO,MAAM,eAAe,QAAoF,CAAC;AAEjH,oFAAoF;AACpF,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,MAAM,WAAW,oBAAoB;IACnC,gFAAgF;IAChF,SAAS,CAAC,EAAE,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC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B;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAAG,UAAU,EAAE,CAoB9E;AAED,4CAA4C;AAC5C,MAAM,WAAW,aAAa;IAC5B,yFAAyF;IACzF,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,4GAA4G;IAC5G,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB;;;;OAIG;IACH,WAAW,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9C;AA+BD;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,eAAe,GAAG,kBAAkB,CAiC9E"}
@@ -1,9 +1,8 @@
1
1
  import * as ts from "typescript";
2
2
  import type { LintRule, LintDiagnostic, LintContext } from "@intentius/chant/lint/rule";
3
3
  import { calleeName, COMPONENT_CLASS, literalText, position, propertyName } from "./otel-ast";
4
-
5
- /** Keys whose value is a credential. `*_file` keys name a path, which is fine. */
6
- const SECRET_KEY = /(authorization|api[-_]?key|password|passwd|secret|token|key_pem|x-honeycomb-team)/i;
4
+ // Shared with OTEL120, which applies the same check to the emitted YAML.
5
+ import { SECRET_KEY } from "../../config-hygiene";
7
6
 
8
7
  /**
9
8
  * OTEL002: a credential written as a literal in a component's config.
@@ -10,6 +10,7 @@ import type { Declarable } from "@intentius/chant/declarable";
10
10
  import { looksLikeCollectorConfig, type CollectorConfig } from "../../model";
11
11
  import { configMapCollectorConfigs, describeConfigMapConfig } from "../../configmap";
12
12
  import { validateCollectorConfig, validateCollectorEntities, type CollectorIssueCode, type CollectorIssue } from "../../validate-config";
13
+ import { attributionIssues } from "../../attribution";
13
14
 
14
15
  /** Where a collector config was found in the build output. */
15
16
  export interface FoundCollectorConfig {
@@ -74,20 +75,30 @@ function toDiagnostic(issue: CollectorIssue, found?: Omit<FoundCollectorConfig,
74
75
  }
75
76
 
76
77
  /**
77
- * Every config-level diagnostic (OTEL101-OTEL106, OTEL112-OTEL117 and any later
78
+ * The config-level issues for one config. OTEL118 joins them only when the
79
+ * build stamps the telemetry attribution (`ctx.telemetry`), so a level-0
80
+ * project never sees it.
81
+ */
82
+ function configIssues(ctx: PostSynthContext, config: CollectorConfig): CollectorIssue[] {
83
+ const issues = validateCollectorConfig(config);
84
+ return ctx.telemetry ? [...issues, ...attributionIssues(config)] : issues;
85
+ }
86
+
87
+ /**
88
+ * Every config-level diagnostic (OTEL101-OTEL106, OTEL112-OTEL127 and any later
78
89
  * config check) over the collector configs in the output. `configMapsOnly`
79
90
  * keeps the configs held in ConfigMaps, which is what WK8604 reads.
80
91
  */
81
92
  export function collectorConfigDiagnostics(ctx: PostSynthContext, opts: { configMapsOnly?: boolean } = {}): PostSynthDiagnostic[] {
82
93
  return collectorConfigs(ctx)
83
94
  .filter((found) => !opts.configMapsOnly || found.configMap)
84
- .flatMap(({ config, ...found }) => validateCollectorConfig(config).map((i) => toDiagnostic(i, found)));
95
+ .flatMap(({ config, ...found }) => configIssues(ctx, config).map((i) => toDiagnostic(i, found)));
85
96
  }
86
97
 
87
- /** Diagnostics for one config-level code (OTEL101-OTEL106, OTEL112-OTEL117) across every collector config in the output. */
98
+ /** Diagnostics for one config-level code (OTEL101-OTEL106, OTEL112-OTEL127) across every collector config in the output. */
88
99
  export function configDiagnostics(ctx: PostSynthContext, code: CollectorIssueCode): PostSynthDiagnostic[] {
89
100
  return collectorConfigs(ctx).flatMap(({ config, ...found }) =>
90
- validateCollectorConfig(config)
101
+ configIssues(ctx, config)
91
102
  .filter((i) => i.code === code)
92
103
  .map((i) => toDiagnostic(i, found)),
93
104
  );
@@ -0,0 +1,17 @@
1
+ /**
2
+ * OTEL118: A pipeline processor can remove or replace a resource attribute chant's telemetry attribution stamps
3
+ *
4
+ * A workload built in a workspace, or with `telemetry.attribution: true`, carries `service.name`, `service.version`, `deployment.environment.name`, `vcs.ref.head.revision` and `chant.*` resource attributes. A `resource` processor that deletes, updates, upserts or hashes one, a `transform` statement that sets, deletes or fails to keep one, or a `resourcedetection` processor with `override` on and a detector that writes one undoes that. The `transform` case matches OTTL text. The check runs only when the build stamps the attribution, so a level-0 project sees nothing.
5
+ */
6
+
7
+ import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
8
+ import { configDiagnostics } from "./otel-helpers";
9
+
10
+ export const otel118: PostSynthCheck = {
11
+ id: "OTEL118",
12
+ description: "A pipeline processor can remove or replace a resource attribute chant's telemetry attribution stamps",
13
+
14
+ check(ctx: PostSynthContext): PostSynthDiagnostic[] {
15
+ return configDiagnostics(ctx, "OTEL118");
16
+ },
17
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * OTEL119: A collector config sets a field deprecated at or before the pinned release
3
+ *
4
+ * `invert_match: true` in a `tail_sampling` policy (inverted decisions are deprecated in collector-contrib v0.126.0 for a `drop` policy), `service.telemetry.metrics.address` (deprecated in collector v0.111.0 for `readers`), and `dimensions_cache_size` on `spanmetrics` (deprecated in collector-contrib v0.125.0 for `aggregation_cardinality_limit`). The collector still reads each at v0.130.0, and a later release drops it.
5
+ */
6
+
7
+ import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
8
+ import { configDiagnostics } from "./otel-helpers";
9
+
10
+ export const otel119: PostSynthCheck = {
11
+ id: "OTEL119",
12
+ description: "A collector config sets a field deprecated at or before the pinned release",
13
+
14
+ check(ctx: PostSynthContext): PostSynthDiagnostic[] {
15
+ return configDiagnostics(ctx, "OTEL119");
16
+ },
17
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * OTEL120: A component in the collector config holds a literal credential
3
+ *
4
+ * OTEL002's check over the emitted or imported config, with the same key pattern (`authorization`, `api-key`, `api_key`, `token`, `password`, `secret`, `key_pem`, `x-honeycomb-team`). A value containing `${` is a reference the collector expands at start-up, and a key ending in `_file` names a path. This catches what OTEL002 can't see: a config brought in by `chant import`, or one inside a ConfigMap.
5
+ */
6
+
7
+ import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
8
+ import { configDiagnostics } from "./otel-helpers";
9
+
10
+ export const otel120: PostSynthCheck = {
11
+ id: "OTEL120",
12
+ description: "A component in the collector config holds a literal credential",
13
+
14
+ check(ctx: PostSynthContext): PostSynthDiagnostic[] {
15
+ return configDiagnostics(ctx, "OTEL120");
16
+ },
17
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * OTEL121: An exporter sends a credential over plaintext
3
+ *
4
+ * A started exporter sends a credential header (`authorization`, `api-key` and the other OTEL002 keys) or a credential key such as `api_key` or `token` to a non-loopback endpoint that is `http://`, or that has `tls.insecure: true` and isn't `https://`.
5
+ */
6
+
7
+ import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
8
+ import { configDiagnostics } from "./otel-helpers";
9
+
10
+ export const otel121: PostSynthCheck = {
11
+ id: "OTEL121",
12
+ description: "An exporter sends a credential over plaintext",
13
+
14
+ check(ctx: PostSynthContext): PostSynthDiagnostic[] {
15
+ return configDiagnostics(ctx, "OTEL121");
16
+ },
17
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * OTEL122: zpages or pprof listens on a non-loopback address
3
+ *
4
+ * zpages serves span samples and pipeline internals, and pprof serves profiles, with no authentication. A started one bound to anything but loopback (`0.0.0.0`, a pod IP, an `${env:...}` host) is reachable by whoever reaches that address. `health_check` is not reported: it serves only a status, and a kubelet probe needs it on the pod IP.
5
+ */
6
+
7
+ import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
8
+ import { configDiagnostics } from "./otel-helpers";
9
+
10
+ export const otel122: PostSynthCheck = {
11
+ id: "OTEL122",
12
+ description: "zpages or pprof listens on a non-loopback address",
13
+
14
+ check(ctx: PostSynthContext): PostSynthDiagnostic[] {
15
+ return configDiagnostics(ctx, "OTEL122");
16
+ },
17
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * OTEL123: A debug exporter at verbosity detailed shares a pipeline with a real exporter
3
+ *
4
+ * `verbosity: detailed` writes every record, attributes and bodies included, to the collector's log. In a pipeline that also sends to a backend, that copies the backend's data, sensitive values included, to wherever the collector's logs go.
5
+ */
6
+
7
+ import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
8
+ import { configDiagnostics } from "./otel-helpers";
9
+
10
+ export const otel123: PostSynthCheck = {
11
+ id: "OTEL123",
12
+ description: "A debug exporter at verbosity detailed shares a pipeline with a real exporter",
13
+
14
+ check(ctx: PostSynthContext): PostSynthDiagnostic[] {
15
+ return configDiagnostics(ctx, "OTEL123");
16
+ },
17
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * OTEL124: A remote exporter has its sending queue or retries turned off
3
+ *
4
+ * A started exporter with a non-loopback endpoint and `sending_queue.enabled: false` blocks the pipeline when the backend is slow; with `retry_on_failure.enabled: false` it drops a failed request's data.
5
+ */
6
+
7
+ import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
8
+ import { configDiagnostics } from "./otel-helpers";
9
+
10
+ export const otel124: PostSynthCheck = {
11
+ id: "OTEL124",
12
+ description: "A remote exporter has its sending queue or retries turned off",
13
+
14
+ check(ctx: PostSynthContext): PostSynthDiagnostic[] {
15
+ return configDiagnostics(ctx, "OTEL124");
16
+ },
17
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * OTEL125: A pipeline sends to a remote otlp or otlphttp exporter without batching
3
+ *
4
+ * No `batch` processor in the pipeline, and the `otlp` or `otlphttp` exporter (non-loopback endpoint) sets no `sending_queue.batch`. At v0.130.0 neither exporter batches by default, so each small request goes out on its own. Other exporters may batch themselves and are not checked.
5
+ */
6
+
7
+ import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
8
+ import { configDiagnostics } from "./otel-helpers";
9
+
10
+ export const otel125: PostSynthCheck = {
11
+ id: "OTEL125",
12
+ description: "A pipeline sends to a remote otlp or otlphttp exporter without batching",
13
+
14
+ check(ctx: PostSynthContext): PostSynthDiagnostic[] {
15
+ return configDiagnostics(ctx, "OTEL125");
16
+ },
17
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * OTEL126: k8sattributes extracts a metadata field it does not support
3
+ *
4
+ * Each name in a `k8sattributes` processor's `extract.metadata` must be one `Config.Validate` accepts at collector-contrib v0.130.0 (`K8S_ATTRIBUTES_METADATA`); the collector refuses any other.
5
+ */
6
+
7
+ import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
8
+ import { configDiagnostics } from "./otel-helpers";
9
+
10
+ export const otel126: PostSynthCheck = {
11
+ id: "OTEL126",
12
+ description: "k8sattributes extracts a metadata field it does not support",
13
+
14
+ check(ctx: PostSynthContext): PostSynthDiagnostic[] {
15
+ return configDiagnostics(ctx, "OTEL126");
16
+ },
17
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * OTEL127: resourcedetection lists a detector that does not exist
3
+ *
4
+ * Each name in a started `resourcedetection` processor's `detectors` must be one the processor registers at collector-contrib v0.130.0 (`RESOURCE_DETECTORS`); any other fails the processor's build and the collector exits.
5
+ */
6
+
7
+ import type { PostSynthCheck, PostSynthContext, PostSynthDiagnostic } from "@intentius/chant/lint/post-synth";
8
+ import { configDiagnostics } from "./otel-helpers";
9
+
10
+ export const otel127: PostSynthCheck = {
11
+ id: "OTEL127",
12
+ description: "resourcedetection lists a detector that does not exist",
13
+
14
+ check(ctx: PostSynthContext): PostSynthDiagnostic[] {
15
+ return configDiagnostics(ctx, "OTEL127");
16
+ },
17
+ };
package/dist/semconv.d.ts CHANGED
@@ -5,7 +5,8 @@
5
5
  * A collector config has no metadata channel, so a config cannot say which
6
6
  * semconv version its attribute keys follow. What it can show is that it uses
7
7
  * a vocabulary: a `spanmetrics` dimension named `gen_ai.request.model`, an
8
- * OTTL statement deleting `gen_ai.input.messages`. `semconvUsage()` finds
8
+ * OTTL statement deleting `gen_ai.input.messages`, a `k8sattributes`
9
+ * processor extracting `k8s.pod.name`. `semconvUsage()` finds
9
10
  * those and pairs each vocabulary with the pin this package's keys follow, the
10
11
  * same way `collectorTopology()` pairs a component type with the pin of the
11
12
  * definition this process has. Reading a parsed YAML file and reading the
@@ -1 +1 @@
1
- {"version":3,"file":"semconv.d.ts","sourceRoot":"","sources":["../src/semconv.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAc,KAAK,eAAe,EAAsB,MAAM,SAAS,CAAC;AAE/E,wFAAwF;AACxF,MAAM,WAAW,iBAAiB;IAChC,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,SAAS,CAAC;IACf,2EAA2E;IAC3E,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CACpC;AAKD,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC,iBAAiB,CAEhE,CAAC;AAEH,mEAAmE;AACnE,MAAM,WAAW,YAAa,SAAQ,SAAS;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,wFAAwF;IACxF,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAWD,0GAA0G;AAC1G,wBAAgB,YAAY,CAAC,MAAM,EAAE,eAAe,GAAG,YAAY,EAAE,CAYpE"}
1
+ {"version":3,"file":"semconv.d.ts","sourceRoot":"","sources":["../src/semconv.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAkC,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,EAAc,KAAK,eAAe,EAAsB,MAAM,SAAS,CAAC;AAE/E,wFAAwF;AACxF,MAAM,WAAW,iBAAiB;IAChC,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,SAAS,CAAC;IACf,2EAA2E;IAC3E,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CACpC;AAOD,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC,iBAAiB,CAGhE,CAAC;AAEH,mEAAmE;AACnE,MAAM,WAAW,YAAa,SAAQ,SAAS;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,wFAAwF;IACxF,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAWD,0GAA0G;AAC1G,wBAAgB,YAAY,CAAC,MAAM,EAAE,eAAe,GAAG,YAAY,EAAE,CAYpE"}
@@ -78,10 +78,14 @@ It deletes prompt, completion, system-instruction and tool-call content from spa
78
78
 
79
79
  - Reference components by entity where you can. A string id (`"otlp/backend"`) is allowed for a component declared elsewhere, and OTEL101 fails the build if nothing declares it.
80
80
  - Put `memory_limiter` first in `processors` (OTEL105).
81
- - Never write a credential literally. Use `"${env:NAME}"` and the collector reads it at start-up (OTEL002).
81
+ - Never write a credential literally. Use `"${env:NAME}"` and the collector reads it at start-up (OTEL002 in source, OTEL120 in the config). Don't send one over `http://` or `tls.insecure: true` (OTEL121).
82
82
  - Every pipeline needs at least one receiver and one exporter (OTEL102). A declared component no pipeline uses is a warning (OTEL103).
83
83
  - Don't split metrics by a per-request id (`gen_ai.conversation.id`, `gen_ai.response.id`, `gen_ai.tool.call.id`, `session.id`, `user.id`, `enduser.id`) or a content key: each value starts new time series (OTEL116).
84
84
  - Give every listener its own port. The collector's own metrics already use localhost:8888, so a `prometheus` exporter there makes it exit with "address already in use" (OTEL117).
85
+ - Keep `zpages` and `pprof` on localhost (OTEL122). `health_check` may listen on 0.0.0.0 for probes.
86
+ - Put `batch` in every pipeline that sends to a remote `otlp` or `otlphttp` exporter (OTEL125), and leave the exporter's `sending_queue` and `retry_on_failure` on (OTEL124).
87
+ - Use a `drop` policy rather than `invert_match`, and `readers` rather than `service.telemetry.metrics.address` (OTEL119).
88
+ - In a workspace, or with `telemetry.attribution: true`, leave `service.name`, `service.version`, `deployment.environment.name`, `vcs.ref.head.revision` and `chant.*` resource attributes alone: `insert` rather than `upsert`, and `override: false` on `resourcedetection` (OTEL118).
85
89
  - Declared extensions are enabled in declaration order unless a `Service` lists `extensions` itself.
86
90
 
87
91
  ## Starting from an existing config
@@ -97,4 +101,4 @@ The importer writes `receivers.ts`, `processors.ts`, `exporters.ts`, `connectors
97
101
 
98
102
  ## Reading the result
99
103
 
100
- `collectorTopologyOf(entities)` returns the pipelines, each component's endpoints and schema pin, for each exporter the signals it carries, the connector `edges` between pipelines, and under `semconv` the semantic-conventions version (`GENAI_SEMCONV_PIN`) the config's `gen_ai.` keys follow, as plain data.
104
+ `collectorTopologyOf(entities)` returns the pipelines, each component's endpoints and schema pin, for each exporter the signals it carries, the connector `edges` between pipelines, and under `semconv` the semantic-conventions version the config's `gen_ai.` keys (`GENAI_SEMCONV_PIN`) and `k8s.` keys (`SEMCONV_PIN`) follow, as plain data.