GareArc
1e845b9bdd
fix(telemetry): enable metrics and logs for standalone prompt generation
...
Remove app_id parameter from three endpoints and update trace manager to use
tenant_id as storage identifier when app_id is unavailable. This allows
standalone prompt generation utilities to emit telemetry.
Changes:
- controllers/console/app/generator.py: Remove app_id=None from 3 endpoints
(RuleGenerateApi, RuleCodeGenerateApi, RuleStructuredOutputGenerateApi)
- core/ops/ops_trace_manager.py: Use tenant_id fallback in send_to_celery
- Extract tenant_id from task.kwargs when app_id is None
- Use 'tenant-{tenant_id}' format as storage identifier
- Skip traces only if neither app_id nor tenant_id available
The trace metadata still contains the actual tenant_id, so enterprise
telemetry correctly emits metrics and logs grouped by tenant.
2026-02-04 01:52:13 -08:00
GareArc
c56e5a5b71
feat(telemetry): add prompt generation telemetry to Enterprise OTEL
...
- Add PromptGenerationTraceInfo trace entity with operation_type field
- Implement telemetry for rule-generate, code-generate, structured-output, instruction-modify operations
- Emit metrics: tokens (total/input/output), duration histogram, requests counter, errors counter
- Emit structured logs with model info and operation context
- Content redaction controlled by ENTERPRISE_INCLUDE_CONTENT env var
- Fix user_id propagation in TraceTask kwargs
- Fix latency calculation when llm_result is None
No spans exported - metrics and logs only for lightweight observability.
2026-02-04 00:38:17 -08:00
GareArc
d858cbdc0c
feat(telemetry): add input/output token split to enterprise OTEL traces
...
- Add PROMPT_TOKENS and COMPLETION_TOKENS to WorkflowNodeExecutionMetadataKey
- Store prompt/completion tokens in node execution metadata JSON (no schema change)
- Calculate workflow-level token split by summing node executions on-the-fly
- Export gen_ai.usage.input_tokens and output_tokens to enterprise telemetry
- Add semantic convention constants for token attributes
- Maintain backward compatibility (historical data shows null)
BREAKING: None
MIGRATION: None (uses JSON metadata, no schema changes)
2026-02-03 19:27:11 -08:00
GareArc
ae43fd96bf
feat(telemetry): add invoked_by user tracking to enterprise OTEL
2026-02-03 01:27:16 -08:00
GareArc
8fc0cbe20d
feat(enterprise): Add OTEL telemetry with slim traces, metrics, and structured logs
...
- Add EnterpriseOtelTrace handler with span emission for workflows and nodes
- Implement minimal-span strategy: slim spans + detailed companion logs
- Add deterministic span/trace IDs for cross-workflow trace correlation
- Add metric collection at 100% accuracy (counters & histograms)
- Add event handlers for app lifecycle and feedback telemetry
- Add cross-workflow trace linking with parent context propagation
- Add OTEL exporter with configurable sampling and privacy controls
- Wire enterprise telemetry into workflow execution pipeline
- Add telemetry configuration in enterprise configs
2026-02-02 15:50:43 -08:00
GareArc
915b4ce840
feat: Add parent trace context propagation for workflow-as-tool hierarchy
...
Enables distributed tracing for nested workflows across all trace providers
(Langfuse, LangSmith, community providers). When a workflow invokes another
workflow via workflow-as-tool, the child workflow now includes parent context
attributes that allow trace systems to reconstruct the full execution tree.
Changes:
- Add parent_trace_context field to WorkflowTool
- Set parent context in tool node when invoking workflow-as-tool
- Extract and pass parent context through app generator
This is a community enhancement (ungated) that improves distributed tracing
for all users. Parent context includes: trace_id, node_execution_id,
workflow_run_id, and app_id.
2026-01-29 20:05:11 -08:00
wangxiaolei
5cd11a0071
fix: remove _try_resolve_user_from_request ( #31360 )
2026-01-22 11:25:06 +08:00
wangxiaolei
37c2f3d4b6
fix: fix instance is not bind to session ( #30913 )
2026-01-21 17:05:13 +08:00
wangxiaolei
2d53ba8671
fix: fix object value is optional should skip validate ( #30894 )
2026-01-13 15:21:06 +08:00
呆萌闷油瓶
9be863fefa
fix: missing content if assistant message with tool_calls ( #30083 )
...
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>
2026-01-13 12:46:33 +08:00
heyszt
450578d4c0
feat(ops): set root span kind for AliyunTrace to enable service-level metrics aggregation ( #30728 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-13 10:12:00 +08:00
非法操作
837237aa6d
fix: use node factory for single-step workflow nodes ( #30859 )
2026-01-13 10:11:18 +08:00
QuantumGhost
b63dfbf654
fix(api): defer streaming response until referenced variables are updated ( #30832 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-12 16:23:18 +08:00
非法操作
51ea87ab85
feat: clear free plan workflow run logs ( #29494 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
2026-01-12 15:57:40 +08:00
-LAN-
1e10bf525c
refactor(models): Refine MessageAgentThought SQLAlchemy typing ( #27749 )
...
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-10 17:17:45 +09:00
wangxiaolei
0711dd4159
feat: enhance start node object value check ( #30732 )
2026-01-09 16:13:17 +08:00
QuantumGhost
ae0a26f5b6
revert: "fix: fix assign value stand as default ( #30651 )" ( #30717 )
...
The original fix seems correct on its own. However, for chatflows with multiple answer nodes, the `message_replace` command only preserves the output of the last executed answer node.
2026-01-09 16:08:24 +08:00
zyssyz123
fe0802262c
feat: credit pool ( #30720 )
...
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>
2026-01-08 13:17:30 +08:00
-LAN-
7ccf858ce6
fix(workflow): pass correct user_from/invoke_from into graph init ( #30637 )
2026-01-07 21:47:23 +08:00
wangxiaolei
187bfafe8b
fix: fix assign value stand as default ( #30651 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-07 14:54:11 +08:00
Sara Rasool
4f0fb6df2b
chore: use from __future__ import annotations ( #30254 )
...
Co-authored-by: Dev <dev@Devs-MacBook-Pro-4.local>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
2026-01-06 23:57:20 +09:00
-LAN-
55de731f9c
refactor(api): clarify published RAG pipeline invoke naming ( #30644 )
2026-01-06 23:48:06 +09:00
-LAN-
1f5d744cc2
fix(db): parameterize sessionmaker with Session ( #30612 )
2026-01-06 15:23:50 +08:00
wangxiaolei
68d68a46a0
refactor: generate_url to support scenario to build url ( #30598 )
2026-01-06 14:53:38 +08:00
-LAN-
d12b91a01a
refactor(api): inject sessionmaker into conversation variable updater ( #30609 )
2026-01-06 14:52:59 +08:00
lif
f3ca8be9f9
refactor: clean type: ignore comments in login.py and template_transformer.py ( #30510 )
...
Signed-off-by: majiayu000 <1835304752@qq.com>
2026-01-06 14:33:27 +08:00
-LAN-
d6e9c3310f
feat: Add conversation variable persistence layer ( #30531 )
2026-01-06 14:05:33 +08:00
Zhiqiang Yang
114a34e008
fix: correct docx hyperlink extraction ( #30360 )
2026-01-06 11:24:26 +08:00
wangxiaolei
061d552928
feat: unified management stop event ( #30479 )
2026-01-06 10:12:05 +08:00
NeatGuyCoding
615c313f80
fix(api): refactors the SQL LIKE pattern escaping logic to use a centralized utility function, ensuring consistent and secure handling of special characters across all database queries. ( #30450 )
...
Signed-off-by: NeatGuyCoding <15627489+NeatGuyCoding@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-06 09:56:30 +08:00
-LAN-
a9e2c05a10
feat(graph-engine): add command to update variables at runtime ( #30563 )
...
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-01-05 16:47:34 +08:00
-LAN-
6f8bd58e19
feat(graph-engine): make layer runtime state non-null and bound early ( #30552 )
...
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>
2026-01-05 16:43:42 +08:00
-LAN-
a99ac3fe0d
refactor(models): Add mapped type hints to MessageAnnotation ( #27751 )
2026-01-05 15:50:03 +08:00
wangxiaolei
631f999f65
refactor: use contains_any instead of Chaining where = where | f ( #30559 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-05 15:48:31 +08:00
hsiong
be3ef9f050
fix : #30511 [Bug] knowledge_retrieval_node fails when using Rerank Model: "Working outside of application context" and add regression test ( #30549 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-05 15:02:21 +08:00
-LAN-
95edbad1c7
refactor(workflow): add Jinja2 renderer abstraction for template transform ( #30535 )
...
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-01-05 10:46:37 +08:00
-LAN-
06ba40f016
refactor(code_node): implement DI for the code node ( #30519 )
2026-01-04 21:50:42 +08:00
wangxiaolei
473f8ef29c
feat: skip rerank if only one dataset is retrieved ( #30075 )
...
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
2026-01-04 20:22:51 +08:00
Byron.wang
5362f69083
feat(refactoring): Support Structured Logging (JSON) ( #30170 )
2026-01-04 11:46:46 +08:00
非法操作
c1bb310183
chore: remove icon_large of models ( #30466 )
...
Co-authored-by: zhsama <torvalds@linux.do>
2026-01-03 02:35:17 +09:00
wangxiaolei
9b6b2f3195
feat: add AgentMaxIterationError exc ( #30423 )
2026-01-01 00:40:54 +08:00
Zhiqiang Yang
cad7101534
feat: support image extraction in PDF RAG extractor ( #30399 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-12-31 15:49:06 +08:00
Sai
64dc98e607
fix: workflow incorrectly marked as completed while nodes are still executing ( #30251 )
...
Co-authored-by: sai <>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-12-31 10:45:43 +08:00
wangxiaolei
9007109a6b
fix: [xxx](xxx) render as xxx](xxx) ( #30392 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-12-31 10:30:15 +08:00
Asuka Minato
fb5edd0bf6
refactor: split changes for api/services/tools/api_tools_manage_servi… ( #29899 )
2025-12-31 10:24:35 +08:00
wangxiaolei
c1af6a7127
fix: fix provider_id is empty ( #30374 )
2025-12-30 16:28:31 +08:00
wangxiaolei
30dd50ff83
feat: allow fail fast ( #30262 )
2025-12-30 09:27:40 +08:00
Maries
14bff10201
fix(api): remove tool provider list cache to fix cache inconsistency ( #30323 )
...
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-12-29 16:58:38 +08:00
DevByteAI
0b1439fee4
fix(template-transform): use base64 encoding for Jinja2 templates to fix #26818 ( #30223 )
...
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-12-29 13:03:39 +08:00
Shemol
d9cecabe93
fix: release graph_runtime_state reference to prevent memory leak under high load ( #30236 )
...
Signed-off-by: SherlockShemol <shemol@163.com>
2025-12-29 10:35:47 +08:00