cd /news/artificial-intelligence/dify-observability-monitoring-with-o… Β· home β€Ί topics β€Ί artificial-intelligence β€Ί article
[ARTICLE Β· art-14520] src=signoz.io pub= topic=artificial-intelligence verified=true sentiment=↑ positive

Dify Observability & Monitoring with OpenTelemetry

SigNoz has released a guide for setting up observability and monitoring on Dify agent workflows using OpenTelemetry, enabling users to export traces and metrics to SigNoz for unified dashboards and alerting. The integration requires a SigNoz account or self-hosted instance, a Dify self-hosted instance, and configuration of OpenTelemetry environment variables in Dify's `.env` file to send telemetry data to SigNoz. This allows developers to track AI and LLM workflow performance, analyze correlated traces and metrics, and improve system reliability and user experience.

read3 min publishedMay 20, 2026

Overview

This guide walks you through setting up observability and monitoring for Dify using OpenTelemetry and exporting traces and metrics to SigNoz. With this integration, you can observe and track various metrics for your Dify agent workflows.

Monitoring Dify agents with telemetry ensures full observability across your AI and LLM workflows. By leveraging SigNoz, you can analyze correlated traces and metrics in unified dashboards, configure alerts, and gain actionable insights to continuously improve reliability, responsiveness, and user experience.

Prerequisites

Monitoring Dify

For more information on instrumenting your Dify workflows with OpenTelemetry, refer to the Dify OpenTelemetry configuration docs.

Step 1: Configure OpenTelemetry in your Dify .env

file

Open the .env

file in your Dify /docker

directory and add the following environment variables:

ENABLE_OTEL=true
OTLP_BASE_ENDPOINT=https://ingest.<region>.signoz.cloud:443
OTEL_EXPORTER_OTLP_HEADERS=signoz-ingestion-key=<your-ingestion-key>
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_EXPORTER_TYPE=otlp
OTEL_SAMPLING_RATE=1.0
OTEL_BATCH_EXPORT_SCHEDULE_DELAY=5000
OTEL_MAX_QUEUE_SIZE=2048
OTEL_MAX_EXPORT_BATCH_SIZE=512
OTEL_METRIC_EXPORT_INTERVAL=60000
OTEL_BATCH_EXPORT_TIMEOUT=10000
OTEL_METRIC_EXPORT_TIMEOUT=30000

<region>

: YourSigNoz Cloud region<your-ingestion-key>

: Your SigNozingestion key

Most steps are identical. To adapt this guide, update the endpoint and remove the ingestion key header as shown in Cloud β†’ Self-Hosted.

Step 2: Apply the required code change

In docker/docker-compose.yaml

, find the x-shared-api-worker-env

block and add the following line alongside the other OTLP_*

variables:

OTEL_EXPORTER_OTLP_HEADERS: ${OTEL_EXPORTER_OTLP_HEADERS:-}

This forwards the OTEL_EXPORTER_OTLP_HEADERS

value from your .env

file into the API and worker containers so the OpenTelemetry SDK can read it.

Step 3: Restart Dify with the applied changes

From your /docker

directory, run:

docker compose up -d

This restarts all Dify services with the updated environment variables, enabling OpenTelemetry export to SigNoz.

Cloud support is coming soon. Stay tuned for updates.

View Traces and Metrics in SigNoz

Your Dify usage should now automatically emit traces and metrics.

You should be able to view traces in SigNoz Cloud under the traces tab:

When you click on a trace in SigNoz, you'll see a detailed view of the trace, including all associated spans, along with their events and attributes.

You should be able to see Dify related metrics in SigNoz Cloud under the metrics tab:

When you click on any of these metrics in SigNoz, you'll see a detailed view of the metric, including attributes:

Troubleshooting

Troubleshooting

If you don't see your telemetry data:

Verify network connectivity- Ensure your application can reach SigNoz Cloud endpoints** Check ingestion key**- Verify your SigNoz ingestion key is correct** Wait for data**- OpenTelemetry batches data before sending, so wait 10-30 seconds after making API calls** Try a console exporter**β€” Enable a console exporter locally to confirm that your application is generating telemetry data before it’s sent to SigNoz

Next Steps

You can also check out our custom Dify dashboard which provides specialized visualizations for monitoring your Dify usage. The dashboard includes pre-built charts specifically tailored for LLM usage, along with import instructions to get started quickly.

Setup OpenTelemetry Collector (Optional)

Setup OpenTelemetry Collector (Optional)

What is the OpenTelemetry Collector?

Think of the OTel Collector as a middleman between your app and SigNoz. Instead of your application sending data directly to SigNoz, it sends everything to the Collector first, which then forwards it along.

Why use it?

Cleaning up dataβ€” Filter out noisy traces you don't care about, or remove sensitive info before it leaves your servers.** Keeping your app lightweight**β€” Let the Collector handle batching, retries, and compression instead of your application code.** Adding context automatically**β€” The Collector can tag your data with useful info like which Kubernetes pod or cloud region it came from.** Future flexibility**β€” Want to send data to multiple backends later? The Collector makes that easy without changing your app.

See Switch from direct export to Collector for step-by-step instructions to convert your setup.

For more details, see Why use the OpenTelemetry Collector? and the Collector configuration guide.

Additional resources:

── more in #artificial-intelligence 4 stories Β· sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/dify-observability-m…] indexed:0 read:3min 2026-05-20 Β· β€”