← Back to Guides

How to Set Up Distributed Tracing

8 min read Observability

Distributed tracing lets you follow a single request as it flows through your microservices, databases, and external APIs. It is essential for finding latency bottlenecks and understanding how failures propagate across your system.

Distributed Tracing

Steps

1

Install the tracing library

Add the Nova tracing SDK to your application. Nova supports OpenTelemetry, so you can use any OTLP-compatible library:

npm install @opentelemetry/api @opentelemetry/sdk-node @novaaiops/otel-exporter
2

Initialize the tracer

Add the tracing initialization code to your application entry point:

const { NovaExporter } = require('@novaaiops/otel-exporter'); const { NodeSDK } = require('@opentelemetry/sdk-node'); const sdk = new NodeSDK({ traceExporter: new NovaExporter({ apiKey: process.env.NOVA_API_KEY, serviceName: 'my-api-service' }) }); sdk.start();
3

Deploy and generate traffic

Deploy your instrumented application and send some requests. Traces will start appearing in Nova within seconds.

4

View traces in Nova

Go to Observability > Traces to see the trace list. Click on any trace to see the waterfall view showing every span across services.

5

Identify slow spans

Slow spans are highlighted in the waterfall view. Click on a span to see its duration, status code, and any error details. Nova also shows the percentage of total request time each span consumes.

Tip:

Nova auto-instruments common frameworks (Express, Flask, Spring Boot) so you get traces without writing any custom code. Just install the agent.

6

Set up trace-based alerts

Create alerts based on trace metrics. For example, alert when P99 latency for the checkout service exceeds 2 seconds.

7

Correlate traces with logs

Click View Logs on any span to see the logs emitted during that span's execution. This correlation is automatic when using the Nova agent.

Ready to get started?

Trace requests across your entire stack and find bottlenecks fast.

Start Free Trial