feat(core-shared): OtelTracer impl using @opentelemetry/api

Implements OtelTracer as ITracer replacement for SentryTracer. Uses
@opentelemetry/api's trace.getTracer + startActiveSpan, maps span.op to
a span attribute, catches exceptions via recordException + setStatus(ERROR),
and filters null attribute values. Five Vitest tests covering name/attributes,
nesting, exception recording, status mapping, and null filtering.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-11 11:40:43 +02:00
parent 4c628022ce
commit b61e9d2091
4 changed files with 156 additions and 0 deletions

View File

@@ -50,6 +50,7 @@
"@sentry/react": { "optional": true }
},
"devDependencies": {
"@opentelemetry/context-async-hooks": "^1.28.0",
"@repo/core-eslint": "workspace:*",
"@repo/core-testing": "workspace:*",
"@repo/core-typescript": "workspace:*",