feat(core-shared): SentryLogRecordForwarder + wire OtelLogger in OTel pipeline
Adds SentryLogRecordForwarder (LogRecordProcessor impl) to sentry-bridge.ts that forwards OTel log records to Sentry via captureException/captureMessage. Wires it as a BatchLogRecordProcessor in init-server-node.ts. Replaces SentryLogger with OtelLogger in bind-otel-instrumentation.ts. 7 new bridge tests pass alongside the existing 25 tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// packages/core-shared/src/instrumentation/di/bind-otel-instrumentation.ts
|
||||
import type { Container } from "inversify";
|
||||
import { OtelTracer } from "../otel/otel-tracer";
|
||||
import { SentryLogger } from "../sentry/sentry-logger";
|
||||
import { OtelLogger } from "../otel/otel-logger";
|
||||
import { initOtelServerNode } from "../otel/init-server-node";
|
||||
import { INSTRUMENTATION_SYMBOLS } from "../symbols";
|
||||
import type { ITracer, ILogger } from "../index";
|
||||
@@ -31,7 +31,7 @@ export function bindOtelInstrumentation(
|
||||
});
|
||||
|
||||
const tracer = new OtelTracer();
|
||||
const logger = new SentryLogger(); // Phase 3 replaces with OtelLogger
|
||||
const logger = new OtelLogger();
|
||||
|
||||
if (container.isBound(INSTRUMENTATION_SYMBOLS.TRACER)) {
|
||||
container.unbind(INSTRUMENTATION_SYMBOLS.TRACER);
|
||||
|
||||
Reference in New Issue
Block a user