dify - ✅(Solved) Fix [Refactor/Chore] Move ops tracer providers into `api/providers` [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
langgenius/dify#35050Fetched 2026-04-14 05:56:46
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
1
Author
Participants
Assignees
Timeline (top)
assigned ×1labeled ×1

This can be done on top of #34899 .

Root Cause

This can be done on top of #34899 .

PR fix notes

PR #35144: refactor(api): move trace providers

Description (problem / solution / changelog)

Summary

Fixes #35050 . Moved tracers along with their dependencies to provider workspaces.

Screenshots

BeforeAfter
......

Checklist

  • This change requires a documentation update, included: Dify Document
  • 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 make lint && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

Changed files

  • api/core/ops/entities/config_entity.py (modified, +2/-217)
  • api/core/ops/ops_trace_manager.py (modified, +102/-99)
  • api/providers/README.md (modified, +3/-0)
  • api/providers/trace/README.md (added, +78/-0)
  • api/providers/trace/trace-aliyun/pyproject.toml (added, +14/-0)
  • api/providers/trace/trace-aliyun/src/dify_trace_aliyun/__init__.py (renamed, +0/-0)
  • api/providers/trace/trace-aliyun/src/dify_trace_aliyun/aliyun_trace.py (renamed, +17/-17)
  • api/providers/trace/trace-aliyun/src/dify_trace_aliyun/config.py (added, +32/-0)
  • api/providers/trace/trace-aliyun/src/dify_trace_aliyun/data_exporter/__init__.py (renamed, +0/-0)
  • api/providers/trace/trace-aliyun/src/dify_trace_aliyun/data_exporter/traceclient.py (renamed, +2/-2)
  • api/providers/trace/trace-aliyun/src/dify_trace_aliyun/entities/__init__.py (renamed, +0/-0)
  • api/providers/trace/trace-aliyun/src/dify_trace_aliyun/entities/aliyun_trace_entity.py (renamed, +0/-0)
  • api/providers/trace/trace-aliyun/src/dify_trace_aliyun/entities/semconv.py (renamed, +0/-0)
  • api/providers/trace/trace-aliyun/src/dify_trace_aliyun/py.typed (renamed, +0/-0)
  • api/providers/trace/trace-aliyun/src/dify_trace_aliyun/utils.py (renamed, +3/-3)
  • api/providers/trace/trace-aliyun/tests/unit_tests/aliyun_trace/data_exporter/test_traceclient.py (renamed, +23/-24)
  • api/providers/trace/trace-aliyun/tests/unit_tests/aliyun_trace/entities/test_aliyun_trace_entity.py (renamed, +1/-2)
  • api/providers/trace/trace-aliyun/tests/unit_tests/aliyun_trace/entities/test_semconv.py (renamed, +1/-1)
  • api/providers/trace/trace-aliyun/tests/unit_tests/aliyun_trace/test_aliyun_trace.py (renamed, +6/-6)
  • api/providers/trace/trace-aliyun/tests/unit_tests/aliyun_trace/test_aliyun_trace_utils.py (renamed, +8/-8)
  • api/providers/trace/trace-aliyun/tests/unit_tests/test_config_entity.py (added, +85/-0)
  • api/providers/trace/trace-arize-phoenix/pyproject.toml (added, +10/-0)
  • api/providers/trace/trace-arize-phoenix/src/dify_trace_arize_phoenix/__init__.py (renamed, +0/-0)
  • api/providers/trace/trace-arize-phoenix/src/dify_trace_arize_phoenix/arize_phoenix_trace.py (renamed, +1/-1)
  • api/providers/trace/trace-arize-phoenix/src/dify_trace_arize_phoenix/config.py (added, +45/-0)
  • api/providers/trace/trace-arize-phoenix/src/dify_trace_arize_phoenix/py.typed (renamed, +0/-0)
  • api/providers/trace/trace-arize-phoenix/tests/unit_tests/arize_phoenix_trace/test_arize_phoenix_trace.py (renamed, +19/-19)
  • api/providers/trace/trace-arize-phoenix/tests/unit_tests/test_arize_phoenix_trace.py (renamed, +1/-1)
  • api/providers/trace/trace-arize-phoenix/tests/unit_tests/test_config_entity.py (added, +88/-0)
  • api/providers/trace/trace-langfuse/pyproject.toml (added, +10/-0)
  • api/providers/trace/trace-langfuse/src/dify_trace_langfuse/__init__.py (renamed, +0/-0)
  • api/providers/trace/trace-langfuse/src/dify_trace_langfuse/config.py (added, +19/-0)
  • api/providers/trace/trace-langfuse/src/dify_trace_langfuse/entities/__init__.py (renamed, +0/-0)
  • api/providers/trace/trace-langfuse/src/dify_trace_langfuse/entities/langfuse_trace_entity.py (renamed, +0/-0)
  • api/providers/trace/trace-langfuse/src/dify_trace_langfuse/langfuse_trace.py (renamed, +4/-4)
  • api/providers/trace/trace-langfuse/src/dify_trace_langfuse/py.typed (renamed, +0/-0)
  • api/providers/trace/trace-langfuse/tests/unit_tests/langfuse_trace/test_langfuse_trace.py (renamed, +23/-23)
  • api/providers/trace/trace-langfuse/tests/unit_tests/test_config_entity.py (added, +42/-0)
  • api/providers/trace/trace-langfuse/tests/unit_tests/test_langfuse_trace.py (renamed, +6/-5)
  • api/providers/trace/trace-langsmith/pyproject.toml (added, +10/-0)
  • api/providers/trace/trace-langsmith/src/dify_trace_langsmith/__init__.py (renamed, +0/-0)
  • api/providers/trace/trace-langsmith/src/dify_trace_langsmith/config.py (added, +20/-0)
  • api/providers/trace/trace-langsmith/src/dify_trace_langsmith/entities/__init__.py (renamed, +0/-0)
  • api/providers/trace/trace-langsmith/src/dify_trace_langsmith/entities/langsmith_trace_entity.py (renamed, +0/-0)
  • api/providers/trace/trace-langsmith/src/dify_trace_langsmith/langsmith_trace.py (renamed, +4/-4)
  • api/providers/trace/trace-langsmith/src/dify_trace_langsmith/py.typed (renamed, +0/-0)
  • api/providers/trace/trace-langsmith/tests/unit_tests/langsmith_trace/test_langsmith_trace.py (renamed, +21/-21)
  • api/providers/trace/trace-langsmith/tests/unit_tests/test_config_entity.py (added, +35/-0)
  • api/providers/trace/trace-mlflow/pyproject.toml (added, +10/-0)
  • api/providers/trace/trace-mlflow/src/dify_trace_mlflow/__init__.py (renamed, +0/-0)
  • api/providers/trace/trace-mlflow/src/dify_trace_mlflow/config.py (added, +46/-0)
  • api/providers/trace/trace-mlflow/src/dify_trace_mlflow/mlflow_trace.py (renamed, +1/-1)
  • api/providers/trace/trace-mlflow/src/dify_trace_mlflow/py.typed (added, +0/-0)
  • api/providers/trace/trace-mlflow/tests/unit_tests/mlflow_trace/test_mlflow_trace.py (renamed, +9/-9)
  • api/providers/trace/trace-opik/pyproject.toml (added, +10/-0)
  • api/providers/trace/trace-opik/src/dify_trace_opik/__init__.py (added, +0/-0)
  • api/providers/trace/trace-opik/src/dify_trace_opik/config.py (added, +25/-0)
  • api/providers/trace/trace-opik/src/dify_trace_opik/opik_trace.py (renamed, +1/-1)
  • api/providers/trace/trace-opik/src/dify_trace_opik/py.typed (added, +0/-0)
  • api/providers/trace/trace-opik/tests/unit_tests/opik_trace/test_opik_trace.py (renamed, +16/-16)
  • api/providers/trace/trace-opik/tests/unit_tests/test_config_entity.py (added, +48/-0)
  • api/providers/trace/trace-opik/tests/unit_tests/test_opik_trace.py (renamed, +10/-9)
  • api/providers/trace/trace-tencent/pyproject.toml (added, +14/-0)
  • api/providers/trace/trace-tencent/src/dify_trace_tencent/__init__.py (added, +0/-0)
  • api/providers/trace/trace-tencent/src/dify_trace_tencent/client.py (renamed, +0/-0)
  • api/providers/trace/trace-tencent/src/dify_trace_tencent/config.py (added, +30/-0)
  • api/providers/trace/trace-tencent/src/dify_trace_tencent/entities/__init__.py (renamed, +0/-0)
  • api/providers/trace/trace-tencent/src/dify_trace_tencent/entities/semconv.py (renamed, +0/-0)
  • api/providers/trace/trace-tencent/src/dify_trace_tencent/entities/tencent_trace_entity.py (renamed, +0/-0)
  • api/providers/trace/trace-tencent/src/dify_trace_tencent/py.typed (added, +0/-0)
  • api/providers/trace/trace-tencent/src/dify_trace_tencent/span_builder.py (renamed, +4/-4)
  • api/providers/trace/trace-tencent/src/dify_trace_tencent/tencent_trace.py (renamed, +5/-5)
  • api/providers/trace/trace-tencent/src/dify_trace_tencent/utils.py (renamed, +0/-0)
  • api/providers/trace/trace-tencent/tests/unit_tests/tencent_trace/test_client.py (renamed, +3/-4)
  • api/providers/trace/trace-tencent/tests/unit_tests/tencent_trace/test_span_builder.py (renamed, +25/-25)
  • api/providers/trace/trace-tencent/tests/unit_tests/tencent_trace/test_tencent_trace.py (renamed, +35/-37)
  • api/providers/trace/trace-tencent/tests/unit_tests/tencent_trace/test_tencent_trace_utils.py (renamed, +6/-7)
  • api/providers/trace/trace-weave/pyproject.toml (added, +10/-0)
  • api/providers/trace/trace-weave/src/dify_trace_weave/__init__.py (added, +0/-0)
  • api/providers/trace/trace-weave/src/dify_trace_weave/config.py (added, +29/-0)
  • api/providers/trace/trace-weave/src/dify_trace_weave/entities/__init__.py (added, +0/-0)
  • api/providers/trace/trace-weave/src/dify_trace_weave/entities/weave_trace_entity.py (renamed, +0/-0)
  • api/providers/trace/trace-weave/src/dify_trace_weave/py.typed (added, +0/-0)
  • api/providers/trace/trace-weave/src/dify_trace_weave/weave_trace.py (renamed, +2/-2)
  • api/providers/trace/trace-weave/tests/unit_tests/test_config_entity.py (added, +61/-0)
  • api/providers/trace/trace-weave/tests/unit_tests/weave_trace/test_weave_trace.py (renamed, +18/-18)
  • api/pyproject.toml (modified, +30/-9)
  • api/pyrefly-local-excludes.txt (modified, +5/-5)
  • api/pyrightconfig.json (modified, +2/-1)
  • api/tests/unit_tests/core/ops/test_config_entity.py (modified, +8/-355)
  • api/uv.lock (modified, +164/-12)
  • dev/pytest/pytest_unit_tests.sh (modified, +1/-0)
RAW_BUFFERClick to expand / collapse

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for refactors or chores; if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Description

This can be done on top of #34899 .

Motivation

By doing this, we can further reduce the dependencies on community packages and provide a more customizable build with minimal vulnerabilities.

Additional Context

No response

extent analysis

TL;DR

Refactor the code to reduce dependencies on community packages and provide a more customizable build with minimal vulnerabilities on top of the changes made in #34899.

Guidance

  • Review the changes made in #34899 to understand the current state of the codebase.
  • Identify the community packages that can be replaced or removed to reduce dependencies.
  • Assess the potential vulnerabilities associated with the current dependencies and prioritize their removal.
  • Consider creating a new branch to implement the refactored code and test it thoroughly before merging it into the main branch.

Notes

The lack of additional context makes it difficult to provide a more specific solution. It is essential to carefully review the codebase and the changes made in #34899 to determine the best approach for refactoring.

Recommendation

Apply workaround: Refactor the code to reduce dependencies on community packages and provide a more customizable build with minimal vulnerabilities, as this will help to improve the overall security and maintainability of the project.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

dify - ✅(Solved) Fix [Refactor/Chore] Move ops tracer providers into `api/providers` [1 pull requests, 1 participants]