diff --git a/.changeset/otel-trace-correlation.md b/.changeset/otel-trace-correlation.md deleted file mode 100644 index 512ac634..00000000 --- a/.changeset/otel-trace-correlation.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'@smooai/logger': minor ---- - -Correlate logs with OpenTelemetry traces. When a span is active, log records -now carry the span's real W3C `traceId` + `spanId` instead of a fabricated -uuid (falling back to the prior uuid correlation id only when no span is -active). Each log line is also bridged into the standard -`@opentelemetry/api-logs` facade, so it becomes an OTLP log record — correlated -to the active span — whenever an observability LoggerProvider is registered -(e.g. `@smooai/observability`'s logs signal). With no provider registered the -bridge is a no-op and stdout output is unchanged. Depends only on the -`@opentelemetry/api` + `@opentelemetry/api-logs` facades (no SDK, no circular -dep on `@smooai/observability`). diff --git a/.changeset/rust-otel-correlation.md b/.changeset/rust-otel-correlation.md deleted file mode 100644 index cc4cec67..00000000 --- a/.changeset/rust-otel-correlation.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@smooai/logger': patch ---- - -Rust: log lines now carry the active OTel span's real W3C `traceId`/`spanId` -(guarded on `span_context.is_valid()`), falling back to the correlation uuid, -and are teed into `tracing` so a single subscriber sees both. - -`ContextKey` is now `#[non_exhaustive]`. It gains a variant whenever the family -learns a new correlation field — `SpanId` is this release's — and without that -attribute each addition is a source-breaking change for any downstream crate -matching on it exhaustively. diff --git a/CHANGELOG.md b/CHANGELOG.md index dbfbdf63..09bd9a22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,31 @@ # @smooai/logger +## 4.3.0 + +### Minor Changes + +- 9c4fc8e: Correlate logs with OpenTelemetry traces. When a span is active, log records + now carry the span's real W3C `traceId` + `spanId` instead of a fabricated + uuid (falling back to the prior uuid correlation id only when no span is + active). Each log line is also bridged into the standard + `@opentelemetry/api-logs` facade, so it becomes an OTLP log record — correlated + to the active span — whenever an observability LoggerProvider is registered + (e.g. `@smooai/observability`'s logs signal). With no provider registered the + bridge is a no-op and stdout output is unchanged. Depends only on the + `@opentelemetry/api` + `@opentelemetry/api-logs` facades (no SDK, no circular + dep on `@smooai/observability`). + +### Patch Changes + +- 2d4accf: Rust: log lines now carry the active OTel span's real W3C `traceId`/`spanId` + (guarded on `span_context.is_valid()`), falling back to the correlation uuid, + and are teed into `tracing` so a single subscriber sees both. + + `ContextKey` is now `#[non_exhaustive]`. It gains a variant whenever the family + learns a new correlation field — `SpanId` is this release's — and without that + attribute each addition is a source-breaking change for any downstream crate + matching on it exhaustively. + ## 4.2.1 ### Patch Changes diff --git a/package.json b/package.json index 6016444a..0f1200a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@smooai/logger", - "version": "4.2.1", + "version": "4.3.0", "description": "A powerful contextual logging system designed for AWS Lambda and Browser environments, with built-in support for structured logging, correlation tracking, and automatic context gathering.", "homepage": "https://github.com/SmooAI/logger#readme", "bugs": {