You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(shared): remove the fxa-shared/monitoring wrapper
## Because
- `fxa-shared/monitoring` is a 30-line wrapper that only calls `initTracing` then `initSentry`.
- `fxa-admin-server` already dropped the wrapper and calls both directly, so the target shape is settled.
- Every consumer already owns a small `monitoring` module, so the wrapper buys nothing.
## This pull request
- Replaces `initMonitoring` with direct `initTracing` then `initSentry` calls in `fxa-admin-panel`, `fxa-auth-server`, `fxa-customs-server` and `fxa-profile-server`. The `tracing.sentry.enabled` and `sentry.skipOpenTelemetrySetup` cross-wiring the wrapper did is kept, in the same order.
- Deletes `packages/fxa-shared/monitoring` and its `package.json` export.
- Repoints `fxa-auth-server`, `fxa-admin-panel` and `fxa-event-broker` at `@fxa/shared/otel` for tracing. Boot order in `key_server.js` does not move; only the specifier changes.
- Adds `@fxa/shared/log`, `@fxa/shared/otel` and `@fxa/shared/sentry-utils` to `fxa-event-broker/tsconfig.build.json`, whose `paths` block overrides the base one.
- Rewrites `fxa-auth-server/lib/monitoring.spec.ts` to assert the two direct calls, their order and the flag cross-wiring.
Sentry stays where it is on purpose. `fxa-shared/sentry/*` has about 30 importers and is a separate migration, so every `fxa-shared/sentry/...` import here is byte-identical to before.
## Issue that this pull request solves
Closes: https://mozilla-hub.atlassian.net/browse/FXA-10645
Partly addresses https://mozilla-hub.atlassian.net/browse/FXA-10646. See "Other information" for why `fxa-shared/tracing` cannot go yet.
0 commit comments