feat(core-shared): OTel barrel + ESLint allowlist for SDK packages

This commit is contained in:
2026-05-11 11:25:29 +02:00
parent e85b8b12cf
commit f94f09a9fa
2 changed files with 15 additions and 0 deletions

View File

@@ -90,6 +90,8 @@ export default [
{
files: [
"**/instrumentation/sentry/**",
"**/instrumentation/otel/sentry-bridge.{ts,js}",
"**/instrumentation/otel/sentry-bridge.test.{ts,js}",
"**/instrumentation/di/bind-sentry-instrumentation.{ts,js}",
"**/instrumentation/di/bind-sentry-instrumentation.test.{ts,js}",
"**/setup/no-sentry.{ts,js}",
@@ -104,6 +106,17 @@ export default [
"no-restricted-imports": "off",
},
},
// R52 — OTel SDK packages (@opentelemetry/sdk-*, @opentelemetry/resources,
// @opentelemetry/semantic-conventions, @sentry/opentelemetry) are restricted
// to core-shared/instrumentation/otel/ and app-level init paths. The
// vendor-neutral API packages (@opentelemetry/api, @opentelemetry/api-logs)
// are unrestricted and do not need a rule here.
{
files: ["**/instrumentation/otel/**/*.{ts,tsx,mjs,cjs,js}"],
rules: {
"no-restricted-imports": "off",
},
},
// E1 — Event handlers must not be re-exported. Wire them only inside the
// consumer feature's bind-production / bind-dev-seed (spec § 2.2 Rule E1).
// J — Direct `payload.jobs.*` access is forbidden outside the integration

View File

@@ -0,0 +1,2 @@
export { initOtelServerNode, type InitOtelServerNodeOpts } from "./init-server-node";
export { buildResource, type BuildResourceOpts } from "./resource";