[PR #14262] feat: Add W&B Weave Tracing Integration #28146

Closed
opened 2026-02-21 20:42:53 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/14262

State: closed
Merged: Yes


Summary

This PR adds W&B Weave as a new tracing provider in Dify, resolving the feature request in #14463. The integration follows similar patterns to the existing tracers, allowing users to track LLM calls, workflows, and tool usage in W&B Weave.

Motivation and Context

Many Dify users leverage Weights & Biases for their ML workflow tracking and would benefit from native W&B Weave integration. This addition gives users more flexibility in choosing tracing providers that align with their existing MLOps stack.

Weave offers specialized capabilities for LLM applications:

  • Detailed call tracing with input/output capture
  • Support for complex application flows
  • Rich visualization and analytics
  • Integration with evaluation frameworks

Implementation Details

The implementation:

  • Adds Weave as a new tracing provider option
  • Creates a WeaveConfig model for storing API key, entity, project, and endpoint configuration
  • Implements a client wrapper for W&B Weave client
  • Develops a tracer class implementing the BaseTraceInstance interface
  • Integrates with Dify's existing trace queue management system

Dependencies

  • Added dependency: weave package for Python SDK integration

The implementation follows Dify's existing patterns to ensure consistency while providing the new functionality needed for W&B Weave integration.

Resolves #14463

Checklist

  • This change requires a documentation update, included: Dify Document :Docs PR

  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)

  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.

  • I've updated the documentation accordingly.

  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

**Original Pull Request:** https://github.com/langgenius/dify/pull/14262 **State:** closed **Merged:** Yes --- # Summary This PR adds W&B Weave as a new tracing provider in Dify, resolving the feature request in #14463. The integration follows similar patterns to the existing tracers, allowing users to track LLM calls, workflows, and tool usage in W&B Weave. ### Motivation and Context Many Dify users leverage Weights & Biases for their ML workflow tracking and would benefit from native W&B Weave integration. This addition gives users more flexibility in choosing tracing providers that align with their existing MLOps stack. Weave offers specialized capabilities for LLM applications: - Detailed call tracing with input/output capture - Support for complex application flows - Rich visualization and analytics - Integration with evaluation frameworks ### Implementation Details The implementation: - Adds `Weave` as a new tracing provider option - Creates a `WeaveConfig` model for storing API key, entity, project, and endpoint configuration - Implements a client wrapper for W&B Weave client - Develops a tracer class implementing the `BaseTraceInstance` interface - Integrates with Dify's existing trace queue management system ### Dependencies - Added dependency: [`weave`](https://pypi.org/project/weave/) package for Python SDK integration The implementation follows Dify's existing patterns to ensure consistency while providing the new functionality needed for W&B Weave integration. > Resolves #14463 # Checklist - [x] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) :Docs [PR](https://github.com/langgenius/dify-docs/pull/545) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:42:53 -05:00
yindo closed this issue 2026-02-21 20:42:53 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#28146