You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix lint failures from CI: rename reflect.Ptr to reflect.Pointer,
suppress exhaustive on the kind switch with rationale, and tag the
,inline json fixtures as a known revive false positive.
Replace the explicit leafTypes allowlist with a json.Marshaler interface
check. Every entry in the previous map shared one property — a custom
MarshalJSON whose output bears no relation to the Go field layout — so
asking the type how it serializes is more general than maintaining a
hand-rolled list of K8s and project types. The walker is now
self-maintaining for any future custom-marshaled type.
Address reviewer findings on telemetry_drift_test.go:
- delete dead sortedKeys helper and its misleading comment
- upgrade per-entry empty-field checks to require to avoid empty-string
pollution of the duplicate-detection maps
- assert no path appears in both ignore maps (cross-pollination)
- assert every mapping/ignore entry is still a live leaf on its type
so renames and deletions surface instead of leaving stale entries
- rewrite caCertPath, sensitiveHeaders, and serviceName justifications
to name the actual wiring symbols a reviewer can grep for
Tighten the FlattenJSONLeafFields godoc to describe the one-level
self-reference expansion that maxStructRevisits actually permits.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@@ -61,22 +61,27 @@ var telemetryFieldMappings = []FieldMapping{
61
61
// telemetryIgnoredOnCRDOnly lists CRD leaf fields that intentionally have no
62
62
// runtime counterpart. Each entry MUST include a justification.
63
63
vartelemetryIgnoredOnCRDOnly=map[string]string{
64
-
"openTelemetry.enabled": "CRD-only gate; controls whether the converter populates runtime fields at all",
65
-
"openTelemetry.sensitiveHeaders.name": "K8s-secret-backed headers; resolved by operator into runtime Headers",
66
-
"openTelemetry.sensitiveHeaders.secretKeyRef.name": "K8s-secret-backed headers; resolved by operator into runtime Headers",
67
-
"openTelemetry.sensitiveHeaders.secretKeyRef.key": "K8s-secret-backed headers; resolved by operator into runtime Headers",
68
-
"openTelemetry.caBundleRef.configMapRef.name": "K8s ConfigMap reference; resolved by operator into runtime CACertPath",
69
-
"openTelemetry.caBundleRef.configMapRef.key": "K8s ConfigMap reference; resolved by operator into runtime CACertPath",
70
-
"openTelemetry.caBundleRef.configMapRef.optional": "K8s ConfigMap reference flag promoted from corev1.ConfigMapKeySelector; not part of runtime config",
64
+
"openTelemetry.enabled": "CRD-only gate; controls whether the converter populates runtime fields at all",
65
+
"openTelemetry.sensitiveHeaders.name": "K8s-secret-backed header value; injected as TOOLHIVE_OTEL_HEADER_* env vars on the proxyrunner pod "+
66
+
"(controllerutil.GenerateOpenTelemetryEnvVarsFromRef) and merged into OTLP headers at runtime; not written into telemetry.Config.Headers by the converter",
67
+
"openTelemetry.sensitiveHeaders.secretKeyRef.name": "K8s-secret-backed header value; injected as TOOLHIVE_OTEL_HEADER_* env vars on the proxyrunner pod "+
68
+
"(controllerutil.GenerateOpenTelemetryEnvVarsFromRef) and merged into OTLP headers at runtime; not written into telemetry.Config.Headers by the converter",
69
+
"openTelemetry.sensitiveHeaders.secretKeyRef.key": "K8s-secret-backed header value; injected as TOOLHIVE_OTEL_HEADER_* env vars on the proxyrunner pod "+
70
+
"(controllerutil.GenerateOpenTelemetryEnvVarsFromRef) and merged into OTLP headers at runtime; not written into telemetry.Config.Headers by the converter",
71
+
"openTelemetry.caBundleRef.configMapRef.name": "K8s ConfigMap reference; resolved by operator into runtime CACertPath",
72
+
"openTelemetry.caBundleRef.configMapRef.key": "K8s ConfigMap reference; resolved by operator into runtime CACertPath",
73
+
"openTelemetry.caBundleRef.configMapRef.optional": "K8s ConfigMap reference flag promoted from corev1.ConfigMapKeySelector; not part of runtime config",
71
74
}
72
75
73
76
// telemetryIgnoredOnRuntimeOnly lists runtime leaf fields that intentionally
74
77
// have no CRD counterpart. Each entry MUST include a justification.
0 commit comments