Skip to content

Feature/opentelemetry - #537

Open
Opulencechuks wants to merge 3 commits into
Abdulazeem-code:mainfrom
Opulencechuks:feature/opentelemetry
Open

Feature/opentelemetry#537
Opulencechuks wants to merge 3 commits into
Abdulazeem-code:mainfrom
Opulencechuks:feature/opentelemetry

Conversation

@Opulencechuks

Copy link
Copy Markdown
Contributor

Closes #508

Description:
This PR introduces distributed tracing to the application to provide pinpoint visibility into latency bottlenecks across the API, database queries, and external HTTP calls, resolving the difficulty in debugging performance issues.

Changes Included:

  • OpenTelemetry Initialization: Created src/utils/tracing.js which sets up the @opentelemetry/sdk-node along with auto-instrumentations for Express and HTTP out-of-the-box.
  • Context Propagation: Context propagation across async boundaries is handled natively by the OpenTelemetry Node SDK's async hooks.
  • Zipkin Exporter Setup: The Node SDK is configured with @opentelemetry/exporter-zipkin to export traces to the Jaeger/Zipkin format natively via the standard Zipkin endpoint (http://localhost:9411/api/v2/spans).
  • Prisma Instrumentation: Enabled the "tracing" preview feature in schema.prisma and instantiated PrismaInstrumentation to seamlessly trace database queries in tandem with Express incoming requests.
  • Bootstrapping Tracing: Imported the new tracing script at the very top of server.js to ensure the environment is instrumented before requiring express, prisma, or any other packages.

Impact:

  • Full visibility into request lifecycles.
  • Easy tracking of how much time is spent specifically on Prisma queries, external HTTP calls, or processing within Express middleware.

Reviewer Notes:
Please ensure you have a local Zipkin/Jaeger instance configured to receive trace data at the specified ZIPKIN_ENDPOINT environment variable in order to view the exported traces locally.

@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown

@Opulencechuks is attempting to deploy a commit to the Abdulazeem's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Aug 24, 2026

Copy link
Copy Markdown

@Opulencechuks Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Abdulazeem-code

Copy link
Copy Markdown
Owner

FIX BACKEND BUILD TEST ERROR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set up distributed tracing (e.g., OpenTelemetry) across Node.js services

2 participants