feat(core-shared): OTel barrel + ESLint allowlist for SDK packages
This commit is contained in:
@@ -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
|
||||
|
||||
2
packages/core-shared/src/instrumentation/otel/index.ts
Normal file
2
packages/core-shared/src/instrumentation/otel/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export { initOtelServerNode, type InitOtelServerNodeOpts } from "./init-server-node";
|
||||
export { buildResource, type BuildResourceOpts } from "./resource";
|
||||
Reference in New Issue
Block a user