Skip to content
This repository was archived by the owner on Aug 5, 2026. It is now read-only.

log: use shared NewOTelJSONHandler from unstructured-runtime v1.2.0 (KOS-1 Phase 1) - #11

Merged
braghettos merged 2 commits into
mainfrom
kos1-phase1-shared-handler
Jun 22, 2026
Merged

log: use shared NewOTelJSONHandler from unstructured-runtime v1.2.0 (KOS-1 Phase 1)#11
braghettos merged 2 commits into
mainfrom
kos1-phase1-shared-handler

Conversation

@braghettos

Copy link
Copy Markdown
Collaborator

Use the shared NewOTelJSONHandler (KOS-1 Phase 1)

Part of braghettos/krateo-installer#112. First consumer of the shared handler shipped in unstructured-runtime v1.2.0 (#4).

Changes

  • go.mod: replace … unstructured-runtime → braghettos v1.1.2 → v1.2.0.
  • main.go: deleted the inline slog.NewJSONHandler; now logging.NewOTelJSONHandler(logLevel, os.Stderr, "service.name", "service"). Removes the duplicated ReplaceAttr, fixes the missing len(groups)==0 guard for free, and adds SeverityNumber + the trace bridge.
  • logs-ingester transition-safe: emits both service.name (OTel) and service (current ingester mapping) — flip the ingester later, then drop service.
  • Folded the stray plaintext slog.Warn (metrics-init) into the structured logger.

Build + go vet green. On tag, release-tag.yaml builds the cdc image and auto-PRs core-provider-chart cdc.image.tag.

🤖 Generated with Claude Code

braghettos and others added 2 commits June 21, 2026 15:38
Cover the declarative status projection (statusDataTemplate over the
self/spec/status/helm/api source root, observedGeneration, degrade-only
and paused behavior) and the apiRef .api source resolved via the
authn-JWT -> snowplow RESTAction chain, with the env-driven config.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…KOS-1 Phase 1)

Bumped the unstructured-runtime replace v1.1.2 -> v1.2.0 and replaced the inline JSON
handler with logging.NewOTelJSONHandler -- so the cdc and every composition controller
emit identical OTel-structured logs (RFC3339Nano timestamp, SeverityText + SeverityNumber,
trace_id/span_id when a span is in context). Keeps both "service" and "service.name" during
the logs-ingester transition. Folded the stray slog.Warn into the structured logger.

Build + vet green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@braghettos
braghettos merged commit 1d9b61e into main Jun 22, 2026
3 checks passed
@braghettos
braghettos deleted the kos1-phase1-shared-handler branch June 22, 2026 10:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant