2026 Dify 1.20 OpenTelemetry Tracing: How to Connect It to Self-Hosting

Dify v1.20.0 supports OpenTelemetry trace export over OTLP/HTTP with protobuf, and does not support gRPC export, according to the Dify v1.20.0 release notes. Configure a compatible Collector, then confirm a test trace arrives before production. A successful workflow response alone does not prove that export works.

Suitable: You operate Dify yourself and need workflow or Agent traces in an existing observability system.
Not a prerequisite: You do not need to rent a different server just to enable tracing. Assess hosting only after measuring the services you plan to keep running.

This runbook follows the implementation timeline: confirm the version and transport, map the network, configure both sides, test delivery, and then decide how to operate the pipeline over time.

Confirm the supported protocol before configuring anything

The version matters because this is a specific release capability, not a guarantee that every Dify installation or every OpenTelemetry transport behaves identically. Dify’s release notes identify trace export and set a clear boundary: use OTLP/HTTP with protobuf, and do not configure this export as OTLP/gRPC. The OTLP specification describes the protocol family and its transport and encoding options; for this integration, follow Dify’s documented supported combination rather than assuming that a Collector accepting one OTLP transport will accept another.

A trace can help you inspect execution across an application workflow or Agent run, depending on what Dify emits and what your Collector forwards or retains. It is not automatically a complete audit record of every business event, prompt, model response, or external side effect. Check the fields exposed by your Dify version and the data your pipeline retains before treating traces as a compliance record or incident archive.

Does Dify’s OpenTelemetry export support OTLP gRPC? No. The v1.20.0 release notes specify OTLP/HTTP with protobuf and exclude gRPC. A Collector configured only for gRPC is not a valid target for this Dify export path. If your existing observability setup exposes only a gRPC receiver, verify whether it can also accept the documented HTTP transport before changing Dify’s settings.

Check What to establish Why it affects the decision
Dify version Confirm the deployed version is 1.20.0 or a later version whose official documentation you have checked The feature and its supported behavior are version-specific
Export transport Use OTLP/HTTP with protobuf A gRPC-only receiver does not match the documented Dify transport
Collector listener Confirm the Collector is configured to receive the same transport and encoding A reachable address alone does not prove that the receiver accepts the payload
Network path Identify the address from Dify’s network namespace to the Collector localhost can refer to different containers or hosts
Credentials and secrets Use the settings documented for your deployment and keep secret values out of committed files A trace route should not expose credentials through source control or logs

Map the deployment before changing settings

Record the actual deployment topology before editing configuration. In a Compose deployment, list the Dify services involved in the trace path, the Collector’s location, and the network each service joins. If the Collector runs in another Compose project, on the host, or on a separate machine, document that separately; the service name and address available to one container may not be available to another.

The Docker Compose networking guide explains how services on a Compose network can reach one another by service name. That is different from assuming that localhost means “the server” everywhere. From inside a Dify container, localhost normally refers to that container’s own network namespace. A Collector in a different container needs an address valid from Dify’s network context, while a host-based Collector needs a host-reachable address appropriate to your setup.

What should you check before enabling OpenTelemetry in self-hosted Dify? Record the Dify version, deployment method, relevant service names, Collector location, receiver transport, endpoint address, and any required authentication or TLS settings. Then compare those details with the Dify OpenTelemetry integration documentation and the self-hosted configuration reference. Use the exact setting names and requirements documented there for your version. Do not copy an environment variable, default, or port from an unrelated example.

Keep credentials in the secret-management method already used by your deployment. Avoid putting tokens directly in a tracked Compose file, a public issue, or a diagnostic command that may be retained in shell history. When the receiver is accessible beyond a private container network, restrict access to intended senders and review authentication and transport security. The OpenTelemetry Collector security guidance covers security practices for Collector configuration. Do not assume that enabling trace export automatically provides access control or protects data in transit.

Operational note: Make one controlled change at a time. If you change the endpoint, receiver protocol, and pipeline together, a failed test will not tell you which part caused the failure.

Configure the OTLP/HTTP path on both sides

Treat the sender and receiver as two halves of one configuration change. Dify must send to an endpoint it can reach, using the documented HTTP transport and protobuf encoding. The Collector must have a receiver configured for that same transport, and its pipeline must route received trace data to an exporter or other destination where you can inspect it. Follow the Collector configuration documentation for the receiver and pipeline structure; a receiver declaration by itself does not establish that data will be retained or forwarded.

Use this sequence:

  • Confirm the exact Dify release and read its matching integration instructions.
  • Select OTLP/HTTP and protobuf; reject any example that configures this Dify export as gRPC.
  • Configure the Collector receiver for the same protocol and encoding, then connect it to the trace pipeline used in your environment.
  • Set Dify’s endpoint and any required credentials or transport options using the documented configuration names.
  • Confirm the endpoint resolves and is reachable from the Dify container, not merely from your laptop or the server shell.
  • Apply the change using the restart or reload procedure documented for your deployment.
  • Keep a record of the version, changed settings, network topology, and deployment action so the test can be repeated.

Do not infer the endpoint from a host-side test alone. A connection that works from the server shell can still fail from a Dify container because DNS, routing, firewall rules, or network membership differs. Conversely, a test that reaches the Collector does not prove that the Collector pipeline exports trace data to your chosen destination. Validate each transition separately: Dify to receiver, receiver into the trace pipeline, and pipeline to the destination you intend to inspect.

Also distinguish the receiver endpoint from the destination endpoint. The address Dify sends to belongs to the Collector’s receiving side; the Collector may then forward traces elsewhere using a separately configured exporter. If you accidentally put a downstream destination address into Dify, the request can fail even when that destination itself is healthy. Confirm which component owns each endpoint in your topology before changing configuration.

Verify delivery with a repeatable run

How do you confirm the Collector received Dify traces? Trigger a known workflow or Agent run, then check the Dify-side export status and the Collector-side receive or downstream export evidence. An application response only confirms that the request completed; it does not confirm that a trace was created, sent, accepted, or retained.

Choose a test that is safe to run more than once and easy to recognize in your observability destination. Note its start time and the application or workflow involved. Use a consistent test input so that you can compare a failed run with a later successful one. Then inspect the receiving side for a trace matching that run. If the Collector reports receipt but the trace is absent from the final destination, continue through the Collector pipeline and exporter instead of changing Dify immediately.

Use this acceptance list before relying on the integration:

  • [ ] The deployed Dify version is recorded and its official integration instructions have been checked.
  • [ ] The Dify exporter uses OTLP/HTTP with protobuf, not gRPC.
  • [ ] The Collector receiver accepts the same transport and encoding.
  • [ ] The endpoint resolves and is reachable from the Dify container’s network context.
  • [ ] The Collector pipeline routes received traces to the destination you are checking.
  • [ ] A repeatable workflow or Agent run produces evidence on the receiving side.
  • [ ] You have recorded the test result, relevant configuration, and deployment topology.
  • [ ] You have decided what trace fields to retain and who can access them.

If a trace is missing, repeat the same test after each correction. That gives you a useful before-and-after record and prevents a single successful run from hiding an intermittent or incomplete pipeline. Record both positive and negative results. Include the Dify version, deployment topology, receiver protocol, and the specific observation point where data stopped appearing; those details make later diagnosis more reliable.

A useful acceptance record is short but specific: the test workflow identifier, approximate run time, Dify version, endpoint location by service name or host role, and the result at each observation point. Do not paste secret values into the record. If the trace contains sensitive content, confirm the destination’s access policy and retention behavior before expanding the test to real user workflows.

Diagnose failures by the layer that failed

Use the observed failure to narrow the search. Do not start by upgrading components or changing multiple settings unless the evidence points there. First identify whether the failure appears at the sender, network, receiver, pipeline, or destination layer.

Symptom First check Next action
Dify reports an export or connection problem Confirm the configured endpoint and whether it is reachable from the Dify container Check service discovery, routing, firewall policy, and the Collector’s listening address
The Collector does not show received traces Compare Dify’s transport and encoding with the configured receiver Ensure the receiver matches OTLP/HTTP and protobuf; a gRPC-only listener is incompatible
The Collector receives data but the destination is empty Inspect the Collector trace pipeline and its exporter status Confirm received traces are connected to the intended pipeline and destination
The workflow succeeds but there is no trace Check Dify’s documented export settings and its export-side logs or status Re-run a known workflow and verify the receiving side rather than relying on the application response
Trace data appears incomplete or unexpected Check what Dify emits and what the Collector or destination filters Compare the available fields with your use case; do not assume a trace is a complete audit log

For protocol questions, compare the deployed Dify version with the release notes and integration instructions linked above. For connection questions, reproduce the check from the relevant network context and inspect the Collector’s receiver and pipeline configuration. For missing downstream data, establish whether the Collector accepted the trace before investigating the destination. Treat community reports as troubleshooting leads, not proof of a universal Dify defect.

Do not use “no trace found” as a single diagnosis. It can mean that the application did not emit the expected trace, the endpoint was wrong, the receiver rejected the payload, the Collector pipeline did not include the trace signal, or the downstream destination filtered or failed to store it. Check logs and status at the component where the evidence stops, then change only the setting tied to that layer.

Plan for ongoing operation only after validation

Once the test trace arrives, decide whether Dify and the Collector should share a host or run separately. Base that choice on your actual service list, observed logs and trace volume, retention policy, network boundaries, and operational ownership. There is no universal resource threshold that can be inferred from the fact that tracing is enabled. Do not size a server from a generic “Dify plus Collector” estimate without measuring your own workflow traffic and storage requirements.

Separate the resource questions:

  • Application capacity: Account for Dify’s services and the other workloads running on the same host.
  • Trace processing and retention: Estimate the trace volume you actually produce, then choose retention and export behavior that fit your storage and access requirements.
  • Model workload: Evaluate inference separately. CPU-based services and API-backed model calls have different resource profiles. MmuCloud does not offer GPU servers, so do not plan GPU inference around this hosting option.
  • Failure and recovery: Decide how you will monitor the exporter and Collector, preserve required configuration, and restore the pipeline if a service or host is replaced.
  • Network ownership: Decide who is responsible for the path between Dify and the Collector, especially if they run on separate hosts or in separately managed networks.
  • Data governance: Confirm who can read the traces, which fields are appropriate to store, and how retention is enforced.

For another perspective on the boundary between self-hosted AI applications and local inference, see this guide to running AnythingLLM on a CPU server. It addresses a different application, but the same planning discipline applies: validate the workload you intend to run instead of treating the application name as a capacity estimate.

Before production: Set an owner for the trace pipeline and define what “healthy” means in your environment. If nobody checks the receiving side or reviews retention, a configured exporter can fail unnoticed.

Last updated November 18, 2026. Version and protocol statements were checked against the Dify v1.20.0 release notes, Dify’s OpenTelemetry integration guide, and the OTLP specification linked above.

If your current shared instance makes it difficult to control service placement, network paths, or sustained workloads, compare those limits with an independently allocated AMD bare-metal server before moving anything. A dedicated server is a more relevant option when you need a stable environment for Dify and its supporting services over time; it is unnecessary if you only need a short test or a light, temporary deployment. After validating the trace pipeline, use MmuCloud’s billing guide to review the available rental terms and confirm current product details before making a hosting decision.

Further reading

EPYC 7543P Dedicated Server

From $459.9/month