abcf14a571
refactor(telemetry): move gateway to core as stateless module-level functions
...
Move routing table, emit(), and is_enterprise_telemetry_enabled() from
enterprise/telemetry/gateway.py into core/telemetry/gateway.py so both
CE and EE share one code path. The ce_eligible flag in CASE_ROUTING
controls which events flow in CE — flipping it is the only change needed
to enable an event in community edition.
- Delete enterprise/telemetry/gateway.py (class-based singleton)
- Create core/telemetry/gateway.py (stateless functions, no shared state)
- Simplify core/telemetry/__init__.py to thin facade over gateway
- Remove TelemetryGateway class and get_gateway() from ext_enterprise_telemetry
- Single-source is_enterprise_telemetry_enabled in core.telemetry.gateway
- Fix pre-existing test bugs (missing dify.event.id in metric handler tests)
- Update all imports and mock paths across 7 test files
2026-02-28 19:27:24 -08:00
5e57f73598
feat(telemetry): add model provider and name tags to all trace metrics
...
Add comprehensive model tracking across all OTEL metrics and logs:
- Node execution metrics now include model_name for LLM operations
- Suggested question metrics include model_provider and model_name
- Dataset retrieval captures both embedding and rerank model info
- Updated DATA_DICTIONARY.md with complete metric label documentation
This enables granular cost tracking, performance analysis, and usage monitoring per model across all operation types.
2026-02-28 00:06:44 -08:00
91a6fe25d1
feat(telemetry): add enterprise OTEL telemetry with gateway, traces, metrics, and logs
2026-02-05 23:10:30 -08:00
90fe9abab7
revert: revert human input relevant code ( #31766 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-30 19:18:49 +08:00
03e3acfc71
feat(api): Human Input Node (backend part) ( #31646 )
...
The backend part of the human in the loop (HITL) feature and relevant architecture / workflow engine changes.
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: -LAN- <laipz8200@outlook.com >
Co-authored-by: 盐粒 Yanli <yanli@dify.ai >
Co-authored-by: CrabSAMA <40541269+CrabSAMA@users.noreply.github.com >
Co-authored-by: Stephen Zhou <38493346+hyoban@users.noreply.github.com >
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
Co-authored-by: yihong <zouzou0208@gmail.com >
Co-authored-by: Joel <iamjoel007@gmail.com >
2026-01-30 10:18:49 +08:00
121d301a41
refactor: use session factory instead of call db.session directly ( #31198 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-21 13:43:06 +08:00
d672774c18
Fix ops_trace delete err ( #29134 )
2025-12-05 10:32:34 +08:00
c6e6f3b7cb
feat: MLflow tracing ( #26093 )
...
Signed-off-by: B-Step62 <yuki.watanabe@databricks.com >
Co-authored-by: Asuka Minato <i@asukaminato.eu.org >
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com >
2025-11-22 13:53:58 +08:00
a6c6bcf95c
more typed orm ( #28507 )
2025-11-21 21:45:51 +08:00
1e9142c213
feat: enhance tencent trace integration with LLM core metrics ( #27126 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com >
2025-10-29 15:53:30 +08:00
7dc7c8af98
improve: speed up tracing config decryption process ( #27549 )
2025-10-29 15:33:16 +08:00
543c5236e7
refactor:Decouple Domain Models from Direct Database Access ( #27316 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-10-28 09:59:30 +08:00
cced33d068
use deco to avoid current_user ( #26077 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-10-16 15:45:51 +09:00
0b35bc1ede
feat: add Tencent Cloud APM tracing integration ( #25657 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com >
2025-10-14 10:21:17 +08:00
e1691fddaa
Refactor: Enable type checking for core/ops and fix type errors ( #26414 )
...
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-09-30 10:39:37 +08:00
85cda47c70
feat: knowledge pipeline ( #25360 )
...
Signed-off-by: -LAN- <laipz8200@outlook.com >
Co-authored-by: twwu <twwu@dify.ai >
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com >
Co-authored-by: jyong <718720800@qq.com >
Co-authored-by: Wu Tianwei <30284043+WTW0313@users.noreply.github.com >
Co-authored-by: QuantumGhost <obelisk.reg+git@gmail.com >
Co-authored-by: lyzno1 <yuanyouhuilyz@gmail.com >
Co-authored-by: quicksand <quicksandzn@gmail.com >
Co-authored-by: Jyong <76649700+JohnJyong@users.noreply.github.com >
Co-authored-by: lyzno1 <92089059+lyzno1@users.noreply.github.com >
Co-authored-by: zxhlyh <jasonapring2015@outlook.com >
Co-authored-by: Yongtao Huang <yongtaoh2022@gmail.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Joel <iamjoel007@gmail.com >
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
Co-authored-by: nite-knite <nkCoding@gmail.com >
Co-authored-by: Hanqing Zhao <sherry9277@gmail.com >
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Harry <xh001x@hotmail.com >
2025-09-18 12:49:10 +08:00
bdd85b36a4
ruff check preview ( #25653 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-09-16 12:58:12 +08:00
bab4975809
chore: add ast-grep rule to convert Optional[T] to T | None ( #25560 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-09-15 13:06:33 +08:00
74be2087b5
fix: ensure Performance Tracing button visible when no tracing provid… ( #25351 )
2025-09-08 16:38:09 +08:00
9d5956cef8
[Chore/Refactor] Switch from MyPy to Basedpyright for type checking ( #25047 )
...
Signed-off-by: -LAN- <laipz8200@outlook.com >
2025-09-03 11:52:26 +08:00
be3af1e234
Migrate SQLAlchemy from 1.x to 2.0 with automated and manual adjustments ( #23224 )
...
Co-authored-by: Yongtao Huang <99629139+hyongtao-db@users.noreply.github.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-09-02 10:30:19 +08:00
30f2d756a7
fix_trace_config ( #24669 )
...
Co-authored-by: renming <renming@renmingdeMacBook-Air.local >
2025-08-28 13:54:49 +08:00
fa753239ad
Refactor: use logger = logging.getLogger(__name__) in logging ( #24515 )
...
Co-authored-by: Yongtao Huang <99629139+hyongtao-db@users.noreply.github.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com >
2025-08-26 18:10:31 +08:00
a434f6240f
Chroe: some misc cleanup ( #23203 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-31 15:33:39 +08:00
4e2129d74f
fix: Error processing trace tasks ( #23170 )
2025-07-30 18:00:15 +08:00
00cb1c26a1
refactor: pass external_trace_id to message trace ( #23089 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-07-29 19:34:46 +08:00
a189d293f8
make logging not use f-str, change others to f-str ( #22882 )
2025-07-25 10:32:48 +08:00
ef51678c73
orm filter -> where ( #22801 )
...
Signed-off-by: -LAN- <laipz8200@outlook.com >
Co-authored-by: -LAN- <laipz8200@outlook.com >
Co-authored-by: Claude <noreply@anthropic.com >
2025-07-24 00:57:45 +08:00
841e53dbbe
feat(trace): support external trace id propagation ( #22623 )
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-07-22 15:17:43 +08:00
a201e9faee
feat: Add Aliyun LLM Observability Integration ( #21471 )
2025-07-04 21:54:33 +08:00
2639f950cc
minor fix: removes the duplicated handling logic for TracingProviderEnum.ARIZE and TracingProviderEnum.PHOENIX from the OpsTraceProviderConfigMap ( #21927 )
...
Signed-off-by: neatguycoding <15627489+NeatGuyCoding@users.noreply.github.com >
2025-07-04 16:46:48 +08:00
1af3d40c1a
feat: Improve Observability with Arize & Phoenix Integration ( #19840 )
...
Co-authored-by: crazywoola <427733928@qq.com >
Co-authored-by: Gu <guchenhe@gmail.com >
2025-07-03 13:52:14 +08:00
2eae7503e1
Minor Improvements for File Validation and Configuration Handling #21179 ( #21171 )
...
Co-authored-by: tech <cto@sb>
2025-06-18 18:33:28 +08:00
e6e76852d5
Add support for W&B dedicated cloud instances in Weave tracing integration ( #20765 )
...
Co-authored-by: crazywoola <427733928@qq.com >
2025-06-07 23:06:23 +08:00
f2e0d161a1
fix(ops_trace_manager): Adds app_id to TraceTask initialization ( #20461 )
...
Signed-off-by: -LAN- <laipz8200@outlook.com >
2025-05-30 09:00:05 +08:00
482e50aae9
Refactor/remove db from cycle manager ( #20455 )
...
Signed-off-by: -LAN- <laipz8200@outlook.com >
2025-05-30 04:34:13 +08:00
648393cc7b
fix: improve tracing provider validation logic in OpsTraceManager ( #20042 )
2025-05-22 14:08:36 +08:00
02929b2cce
Fix/fix trace provider delete err ( #20070 )
2025-05-21 23:51:42 +08:00
d31235ca13
feat: Introduce WorkflowExecution Domain Entity and Repository, Replace WorkflowRun Direct Usage, and Unify Stream Response Logic ( #20067 )
...
Signed-off-by: -LAN- <laipz8200@outlook.com >
2025-05-21 22:01:53 +08:00
36b321735e
fix create_tracing_app_config error ( #19884 ) ( #20004 )
...
Co-authored-by: codly <codly.fun@gmail.com >
2025-05-21 10:45:10 +08:00
11146b6bae
fix create_tracing_app_config error ( #19884 )
2025-05-19 10:09:21 +08:00
0b22e8b544
chore: speed up api service startup time by defering the imports for trace services ( #19504 )
2025-05-13 09:13:25 +08:00
0a20210a59
feat: Add W&B Weave Tracing Integration ( #14262 )
...
Signed-off-by: Yuichiro Utsumi <utsumi.yuichiro@fujitsu.com >
Signed-off-by: -LAN- <laipz8200@outlook.com >
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
Signed-off-by: kenwoodjw <blackxin55+@gmail.com >
Signed-off-by: ChengZi <chen.zhang@zilliz.com >
Signed-off-by: cl <cailue@apache.org >
Co-authored-by: Yu Chun Chang <changyuchun159630@gmail.com >
Co-authored-by: Kyle Chang <kylechang@91app.com >
Co-authored-by: Lick-liu <51771897+Lick-liu@users.noreply.github.com >
Co-authored-by: crazywoola <427733928@qq.com >
Co-authored-by: Yuichiro Utsumi <81412151+utsumi-fj@users.noreply.github.com >
Co-authored-by: NFish <douxc512@gmail.com >
Co-authored-by: Yeuoly <45712896+Yeuoly@users.noreply.github.com >
Co-authored-by: Wu Tianwei <30284043+WTW0313@users.noreply.github.com >
Co-authored-by: DDDDD12138 <43703884+DDDDD12138@users.noreply.github.com >
Co-authored-by: Jyong <76649700+JohnJyong@users.noreply.github.com >
Co-authored-by: -LAN- <laipz8200@outlook.com >
Co-authored-by: Novice <857526207@qq.com >
Co-authored-by: yihong <zouzou0208@gmail.com >
Co-authored-by: Kalo Chin <91766386+fdb02983rhy@users.noreply.github.com >
Co-authored-by: zxhlyh <jasonapring2015@outlook.com >
Co-authored-by: jiangbo721 <365065261@qq.com >
Co-authored-by: 刘江波 <jiangbo721@163.com >
Co-authored-by: Lam <scau_ljw@126.com >
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com >
Co-authored-by: Mars <524574386@qq.com >
Co-authored-by: mars <linjx2@by-health.com >
Co-authored-by: Joe <79627742+ZhouhaoJiang@users.noreply.github.com >
Co-authored-by: Rafael Carvalho <r.carvalho@me.com >
Co-authored-by: Joel <iamjoel007@gmail.com >
Co-authored-by: 非法操作 <hjlarry@163.com >
Co-authored-by: kenwoodjw <blackxin55+@gmail.com >
Co-authored-by: codingjaguar <codingjaguar@gmail.com >
Co-authored-by: ChengZi <chen.zhang@zilliz.com >
Co-authored-by: Fei He <droxer.he@gmail.com >
Co-authored-by: Arcaner <52057416+lrhan321@users.noreply.github.com >
Co-authored-by: Xiyuan Chen <52963600+GareArc@users.noreply.github.com >
Co-authored-by: KVOJJJin <jzongcode@gmail.com >
Co-authored-by: XiaoBa <94062266+XiaoBa-Yu@users.noreply.github.com >
Co-authored-by: Xiaoba Yu <xb1823725853@gmail.com >
Co-authored-by: zhangyuhang <2827528315@qq.com >
Co-authored-by: yuhang2.zhang <yuhang2.zhang@ly.com >
Co-authored-by: 诗浓 <nyaashino@gmail.com >
Co-authored-by: RookieAgent <42060616+Sakura4036@users.noreply.github.com >
Co-authored-by: sho-takano-dev <shota.takano.dev@gmail.com >
Co-authored-by: 過世秋風 <1040926235@qq.com >
Co-authored-by: Yi Feng <66539215+bigyifeng@users.noreply.github.com >
Co-authored-by: QuantumGhost <obelisk.reg+git@gmail.com >
Co-authored-by: Yongtao Huang <99629139+hyongtao-db@users.noreply.github.com >
Co-authored-by: ShadowJobs <794878115@qq.com >
Co-authored-by: LinYing <linying@momenta.ai >
Co-authored-by: Benjamin <benjaminx@gmail.com >
Co-authored-by: LiuBodong <liubodong2010@126.com >
Co-authored-by: huangzhuo1949 <167434202+huangzhuo1949@users.noreply.github.com >
Co-authored-by: huangzhuo <huangzhuo1@xiaomi.com >
Co-authored-by: csurong <csurong1@gmail.com >
Co-authored-by: 傻笑zz <43721571+shaxiaozz@users.noreply.github.com >
Co-authored-by: L8ng <straydragonl@foxmail.com >
Co-authored-by: Bowen Liang <liangbowen@gf.com.cn >
Co-authored-by: Novice Lee <novicelee@NoviPro.local >
Co-authored-by: GuanMu <ballmanjq@gmail.com >
Co-authored-by: LittleFish-15 <58618983+LittleFish-15@users.noreply.github.com >
Co-authored-by: 诗浓 <844670992@qq.com >
Co-authored-by: luckylhb90 <luckylhb90@gmail.com >
Co-authored-by: hobo.l <hobo.l@binance.com >
Co-authored-by: Gen Sato <52241300+halogen22@users.noreply.github.com >
Co-authored-by: twwu <twwu@dify.ai >
Co-authored-by: StoneFancyX <53338920+StoneFancyX@users.noreply.github.com >
Co-authored-by: StoneFancyX <kindbin@qq.com >
Co-authored-by: Naoki KOBAYASHI <naotama@gmail.com >
Co-authored-by: kurokobo <kuro664@gmail.com >
Co-authored-by: cyflhn <cyflhn@163.com >
Co-authored-by: Yingchun Lai <laiyingchun@apache.org >
Co-authored-by: jimmyfen <757343258@qq.com >
Co-authored-by: Xuetao Song <xuetaomagicsong@gmail.com >
Co-authored-by: Panpan <wurui.dev@gmail.com >
Co-authored-by: wyy-holding <59436937+wyy-holding@users.noreply.github.com >
Co-authored-by: リイノ Lin <sorphwer@gmail.com >
Co-authored-by: Ning <accelerator314@gmail.com >
Co-authored-by: Linh Nguyen <55907715+batman0911@users.noreply.github.com >
Co-authored-by: Junjie.M <118170653@qq.com >
Co-authored-by: Ron <svcvit@gmail.com >
Co-authored-by: Novice <novice12185727@gmail.com >
Co-authored-by: NanoNova <kid1412621@gmail.com >
Co-authored-by: JaydenZhou <380774082@qq.com >
Co-authored-by: dotdotdot <823150982@qq.com >
Co-authored-by: Good Wood <slm_1990@126.com >
Co-authored-by: Ryosei Karaki <38310693+karamaru-alpha@users.noreply.github.com >
Co-authored-by: chenhuan0728 <54611342+chenhuan0728@users.noreply.github.com >
Co-authored-by: chenhuan <huan.chen0728@foxmail>
Co-authored-by: lenbo <islenbo@qq.com >
Co-authored-by: Jiang <65766008+AlwaysBluer@users.noreply.github.com >
Co-authored-by: jiangzhijie <jiangzhijie.jzj@alibaba-inc.com >
Co-authored-by: Yongtao Huang <yongtaoh2022@gmail.com >
Co-authored-by: zhangkun-21 <sephiroth0932@gmail.com >
Co-authored-by: hsiong <37357447+hsiong@users.noreply.github.com >
Co-authored-by: 李远军 <4842@9ji.com >
Co-authored-by: yourchanges <yourchanges@gmail.com >
Co-authored-by: David <guyuezhuying@126.com >
Co-authored-by: liuzhenghua <1090179900@qq.com >
Co-authored-by: taokuizu <taokuizu@qq.com >
Co-authored-by: Hanqing Zhao <sherry9277@gmail.com >
Co-authored-by: JimintheBox <gjwlals111@gmail.com >
Co-authored-by: wlleiiwang <1025164922@qq.com >
Co-authored-by: wlleiiwang <wlleiiwang@tencent.com >
Co-authored-by: Alex <32982705+AlexYuan997@users.noreply.github.com >
Co-authored-by: yuanlong <yuanlong@boco.com.cn >
Co-authored-by: wanttobeamaster <45583625+wanttobeamaster@users.noreply.github.com >
Co-authored-by: xiaozhiqing.xzq <xiaozhiqing.xzq@alibaba-inc.com >
Co-authored-by: Chenhe Gu <guchenhe@gmail.com >
Co-authored-by: tyounami <vkbo@qq.com >
Co-authored-by: bo.zhao <bo.zhao@iglooinsure.com >
Co-authored-by: ClSlaid <cailue@apache.org >
Co-authored-by: adru <106513264+adpanru@users.noreply.github.com >
Co-authored-by: horochx <32632779+horochx@users.noreply.github.com >
2025-04-26 04:28:30 -07:00
85004f8510
fix(typo): workflow ops triggered from ( #18019 )
2025-04-14 19:08:05 +08:00
46d235bca0
feat: poolize the ops trace instance ( #15947 )
2025-03-30 13:20:23 +08:00
0e2e2db3fa
refactor: add OpikDataTrace instance builder. ( #16444 )
...
Signed-off-by: -LAN- <laipz8200@outlook.com >
2025-03-21 18:09:39 +08:00
fe76dfe1f8
When decrypt_trace_config is empty, it should be skipped directly ( #15870 )
2025-03-17 11:29:20 +08:00
69d58fbb50
Add new integration with Opik Tracking tool ( #11501 )
2025-01-13 17:41:44 +08:00
83ea931e3c
refactor: optimize database usage ( #12071 )
...
Signed-off-by: -LAN- <laipz8200@outlook.com >
2024-12-25 16:24:52 +08:00
56e15d09a9
feat: mypy for all type check ( #10921 )
2024-12-24 18:38:51 +08:00