Refactor/observability#248
Merged
LeonardoVieira1630 merged 18 commits intodevfrom Apr 27, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PedroBinotto
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces end-to-end observability across all four services (consumers, dispatcher, logic-system, subscription-server) by wiring in the shared
@anticapture/observabilitypackage. Each app now bootstraps OpenTelemetry tracing, emits structured logs via an injected pino logger instead ofconsole.*, and the subscription-server exposes a Prometheus/metricsendpoint for scraping. Existing behavior is unchanged — this is a cross-cutting instrumentation refactor.Changes
@anticapture/observability+@opentelemetry/apidependencies to every app andpino-prettyat the root for local log formatting.instrumentation.tsbootstrap in each app that callscreateObservabilityProvider(<service>); imported first in everyindex.tsso tracer patching happens before other modules load.wrapWithTracing(...)at composition roots in each app'sindex.ts.console.log/console.errorusages with a structuredcreateLogger(<service>)instance injected through constructors across clients, services, repositories, triggers, webhook server, and Fastify error handler./metricsroute on subscription-server that serves Prometheus output via the exporter exposed frominstrumentation.ts.index.tsto log failures through the structured logger before exiting.non-voting-handler.test-factory.tsand update the related trigger-processor test accordingly.pnpm.onlyBuiltDependencies: ["sqlite3"]to the rootpackage.json.