Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
feat(tracing): configure Agent tracing and link workflow runs to traces (#44186)
yyh42bde2e983e8
diff --git a/oxlint-suppressions.json b/oxlint-suppressions.jsonindex 6d3d52473f6..1f59fcdbe22 100644--- a/oxlint-suppressions.json+++ b/oxlint-suppressions.json@@ -42,11 +42,6 @@"count": 1}},- "web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/provider-config-modal.tsx": {- "shadcn/no-restyle": {- "count": 2- }- },"web/app/(commonLayout)/plugins/page.tsx": {"no-restricted-globals": {"count": 1@@ -3324,11 +3319,6 @@"count": 1}},- "web/features/agent-v2/agent-detail/configure/components/preview/__tests__/chat.spec.tsx": {- "typescript/no-deprecated": {- "count": 1- }- },"web/features/agent-v2/agent-detail/configure/components/preview/working-directory-panel.tsx": {"@tanstack/query/prefer-query-options": {"count": 2diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/__tests__/view.spec.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/__tests__/view.spec.tsxindex 7c85305a793..1903de77ff3 100644--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/__tests__/view.spec.tsx+++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/__tests__/view.spec.tsx@@ -35,8 +35,8 @@ vi.mock('../chart-view', () => ({),}))-vi.mock('../tracing/panel', () => ({- default: () => <button type="button">tracing</button>,+vi.mock('@/app/components/app/tracing/configuration', () => ({+ TracingConfiguration: () => <button type="button">tracing</button>,}))const render = (ui: Parameters<typeof renderWithConsoleQuery>[0]) => {diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/__tests__/panel.spec.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/__tests__/panel.spec.tsxdeleted file mode 100644index 86066f3c79d..00000000000--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/__tests__/panel.spec.tsx+++ /dev/null@@ -1,367 +0,0 @@-import { act, render, screen, waitFor, within } from '@testing-library/react'-import userEvent from '@testing-library/user-event'-import { consoleQuery } from '@/service/console'-import { createQueryClientWrapper } from '@/test/console/query-client'-import { createDeferred } from '@/test/deferred'-import { createTestQueryClient } from '@/test/query-client'-import Panel from '../panel'--const { request } = vi.hoisted(() => ({- request:- vi.fn<(url: string, init: RequestInit, options: { request: Request }) => Promise<Response>>(),-}))-vi.mock('@/service/base', () => ({ request }))-vi.mock('@/app/notifications', () => ({ toast: vi.fn() }))--const langfuseConfig = {- public_key: 'public-key',- secret_key: '[__MASKED__]',- host: 'https://cloud.langfuse.com',-}--function mockServer(configured = true) {- let status = { enabled: configured, tracing_provider: configured ? 'langfuse' : null }- let config: Record<string, unknown> | null = configured ? langfuseConfig : null- const writes: Array<{ method: string; body: unknown }> = []- request.mockImplementation(async (_url, _init, { request: sent }) => {- const url = new URL(sent.url)- if (url.pathname.endsWith('/trace')) {- if (sent.method === 'POST') {- status = await sent.json()- writes.push({ method: sent.method, body: status })- return Response.json({ result: 'success' })- }- return Response.json(status)- }- if (sent.method === 'GET') {- const providerConfig = url.searchParams.get('tracing_provider') === 'langfuse' ? config : null- return Response.json({ tracing_config: providerConfig, has_not_configured: !providerConfig })- }- if (sent.method === 'DELETE') {- config = null- writes.push({ method: sent.method, body: null })- return new Response(null, { status: 204 })- }- const body = await sent.json()- writes.push({ method: sent.method, body })- config = { ...body.tracing_config, secret_key: '[__MASKED__]' }- return Response.json({ result: 'success' })- })- return writes-}--function renderPanel(readOnly = false) {- const client = createTestQueryClient()- const view = render(<Panel appId="app-1" readOnly={readOnly} />, {- wrapper: createQueryClientWrapper(client),- })- return { ...view, client }-}--async function openConfiguredPanel() {- const user = userEvent.setup()- await user.click(await screen.findByText('app.tracing.enabled'))- await screen.findByText('app.tracing.tracing')- return user-}--describe('Tracing overview panel', () => {- beforeEach(() => {- vi.clearAllMocks()- })-- it('keeps the tracing entry visible and disabled until configuration is ready', async () => {- request.mockImplementation(() => new Promise<Response>(() => {}))- renderPanel()- expect(screen.getByRole('button', { name: 'app.tracing.title' })).toBeDisabled()- expect(screen.queryByRole('status')).not.toBeInTheDocument()- })-- it('offers retry when tracing cannot load instead of remaining in a loading state', async () => {- const user = userEvent.setup()- request.mockRejectedValue(new Error('Tracing unavailable'))- renderPanel()- const retry = await screen.findByRole('button', { name: /common.errorBoundary.tryAgain/ })- expect(screen.queryByRole('status')).not.toBeInTheDocument()- mockServer(false)- await user.click(retry)- expect(await screen.findByText('app.tracing.title')).toBeInTheDocument()- expect(- screen.queryByRole('button', { name: /common.errorBoundary.tryAgain/ }),- ).not.toBeInTheDocument()- })-- it('keeps one disabled entry when status arrives before provider configurations', async () => {- mockServer()- const server = request.getMockImplementation()!- const configsReady = createDeferred()- request.mockImplementation(async (...args) => {- if (new URL(args[2].request.url).pathname.endsWith('/trace-config'))- await configsReady.promise- return server(...args)- })- const { client } = renderPanel()- await waitFor(() =>- expect(- client.getQueryData(- consoleQuery.apps.byAppId.trace.get.queryKey({ input: { params: { app_id: 'app-1' } } }),- ),- ).toEqual({ enabled: true, tracing_provider: 'langfuse' }),- )- expect(screen.getByRole('button')).toBeDisabled()- await act(async () => configsReady.resolve())- await waitFor(() => expect(screen.getByRole('button')).toBeEnabled())- })-- it('keeps healthy providers usable and retries only the unavailable provider', async () => {- const writes = mockServer()- const server = request.getMockImplementation()!- let unavailable = true- const retryReady = createDeferred()- request.mockImplementation(async (...args) => {- const url = new URL(args[2].request.url)- if (url.searchParams.get('tracing_provider') === 'langsmith')- return Response.json({ tracing_config: { api_key: 'key', project: 'project' } })- if (url.searchParams.get('tracing_provider') === 'phoenix') {- if (unavailable)- return Response.json(- { code: 'tracing_provider_unavailable', message: 'Unavailable' },- { status: 400 },- )- await retryReady.promise- }- return server(...args)- })- const { client } = renderPanel()- await waitFor(() => expect(client.isFetching()).toBe(0))- const user = await openConfiguredPanel()- const phoenix = within(screen.getByRole('group', { name: 'app.tracing.phoenix.title' }))- expect(phoenix.queryByRole('button', { name: 'app.tracing.config' })).not.toBeInTheDocument()- expect(- phoenix.queryByRole('button', { name: 'app.tracing.phoenix.title' }),- ).not.toBeInTheDocument()- await user.click(screen.getByRole('switch'))- await waitFor(() => expect(screen.getByRole('switch')).not.toBeChecked())- expect(writes).toEqual([- { method: 'POST', body: { enabled: false, tracing_provider: 'langfuse' } },- ])- await user.click(screen.getByRole('button', { name: 'app.tracing.langsmith.title' }))- await waitFor(() => expect(screen.getByRole('switch')).toBeChecked())- expect(writes[1]).toEqual({- method: 'POST',- body: { enabled: true, tracing_provider: 'langsmith' },- })-- request.mockClear()- unavailable = false- await user.click(phoenix.getByRole('button', { name: 'common.errorBoundary.tryAgain' }))- expect(phoenix.getByRole('button', { name: 'common.errorBoundary.tryAgain' })).toBeDisabled()- expect(phoenix.queryByRole('button', { name: 'app.tracing.config' })).not.toBeInTheDocument()- expect(screen.getByRole('switch')).not.toHaveAttribute('aria-disabled', 'true')- await act(async () => retryReady.resolve())- expect(await phoenix.findByRole('button', { name: 'app.tracing.config' })).toBeEnabled()- expect(request).toHaveBeenCalledTimes(1)- expect(- new URL(request.mock.calls[0]![2].request.url).searchParams.get('tracing_provider'),- ).toBe('phoenix')- })-- it('allows disabling tracing when its active provider configuration is unavailable', async () => {- const writes = mockServer()- const server = request.getMockImplementation()!- request.mockImplementation(async (...args) => {- if (new URL(args[2].request.url).searchParams.get('tracing_provider') === 'langfuse')- return Response.json(- { code: 'tracing_provider_unavailable', message: 'Unavailable' },- { status: 400 },- )- return server(...args)- })- const { client } = renderPanel()- await waitFor(() => expect(client.isFetching()).toBe(0))- const user = await openConfiguredPanel()- await user.click(screen.getByRole('switch'))- await waitFor(() => expect(screen.getByRole('switch')).not.toBeChecked())- expect(screen.getByRole('switch')).toHaveAttribute('aria-disabled', 'true')- await user.click(screen.getByRole('switch'))- expect(writes).toEqual([- { method: 'POST', body: { enabled: false, tracing_provider: 'langfuse' } },- ])- })-- it('shows one entry and requires a provider selection when saved configs have no active provider', async () => {- const writes = mockServer()- const { client } = renderPanel()- await waitFor(() => expect(client.isFetching()).toBe(0))- act(() =>- client.setQueryData(- consoleQuery.apps.byAppId.trace.get.queryKey({ input: { params: { app_id: 'app-1' } } }),- { enabled: false, tracing_provider: null, capture_content: false, capture_agent: true },- ),- )- const user = userEvent.setup()- await user.click(screen.getByRole('button'))- expect(screen.getByRole('switch')).toHaveAttribute('aria-disabled', 'true')- await user.click(screen.getByRole('button', { name: 'app.tracing.langfuse.title' }))- await waitFor(() => expect(screen.getByRole('switch')).toBeChecked())- expect(writes).toEqual([- { method: 'POST', body: { enabled: true, tracing_provider: 'langfuse' } },- ])- })-- it('hides configuration for a read-only app with no providers', async () => {- mockServer(false)- const { client } = renderPanel(true)- await waitFor(() => expect(client.isFetching()).toBe(0))- expect(screen.queryByText('app.tracing.title')).not.toBeInTheDocument()- })-- it('lets a read-only user inspect configured tracing without editing it', async () => {- mockServer()- renderPanel(true)- await openConfiguredPanel()- expect(screen.getByText('app.tracing.langfuse.description')).toBeInTheDocument()- expect(screen.queryByRole('switch')).not.toBeInTheDocument()- expect(screen.queryByText('app.tracing.config')).not.toBeInTheDocument()- })-- it('opens configuration without selecting the provider and supports keyboard selection', async () => {- const writes = mockServer()- const { client } = renderPanel()- await waitFor(() => expect(client.isFetching()).toBe(0))- act(() =>- client.setQueryData(- consoleQuery.apps.byAppId.trace.get.queryKey({ input: { params: { app_id: 'app-1' } } }),- {- enabled: true,- tracing_provider: 'langsmith',- capture_content: false,- capture_agent: true,- },- ),- )- const user = await openConfiguredPanel()- const provider = within(screen.getByRole('group', { name: 'app.tracing.langfuse.title' }))- await user.click(provider.getByRole('button', { name: 'app.tracing.config' }))- await user.click(screen.getByRole('button', { name: 'common.operation.close' }))- await waitFor(() =>- expect(provider.getByRole('button', { name: 'app.tracing.config' })).toHaveFocus(),- )- expect(writes).toEqual([])-- await user.tab({ shift: true })- await expect(provider.getByRole('button', { name: 'app.tracing.langfuse.title' })).toHaveFocus()- await user.keyboard('{Enter}')- await waitFor(() =>- expect(writes).toEqual([- { method: 'POST', body: { enabled: true, tracing_provider: 'langfuse' } },- ]),- )- })-- it('saves a new provider before enabling it', async () => {- const writes = mockServer(false)- renderPanel()- const user = userEvent.setup()- await user.click(await screen.findByText('app.tracing.title'))- await user.click(screen.getAllByText('app.tracing.config')[0]!)- await user.type(- screen.getByRole('textbox', { name: 'app.tracing.configProvider.publicKey' }),- 'public-key',- )- await user.type(- screen.getByRole('textbox', { name: 'app.tracing.configProvider.secretKey' }),- 'secret-key',- )- await user.type(screen.getByRole('textbox', { name: 'Host' }), 'https://cloud.langfuse.com')- await user.click(screen.getByRole('button', { name: 'common.operation.saveAndEnable' }))- await waitFor(() =>- expect(writes).toEqual([- {- method: 'POST',- body: {- tracing_provider: 'langfuse',- tracing_config: { ...langfuseConfig, secret_key: 'secret-key' },- },- },- { method: 'POST', body: { enabled: true, tracing_provider: 'langfuse' } },- ]),- )- await waitFor(() =>- expect(- screen.queryByRole('dialog', { name: /app.tracing.configProvider.title/ }),- ).not.toBeInTheDocument(),- )- expect(screen.getByRole('switch')).toBeChecked()- })-- it('reopens an edited provider from the refreshed masked config', async () => {- const writes = mockServer()- const { client } = renderPanel()- const user = await openConfiguredPanel()- await user.click(screen.getAllByText('app.tracing.config')[0]!)- const secret = screen.getByRole('textbox', { name: 'app.tracing.configProvider.secretKey' })- await user.clear(secret)- await user.type(secret, 'new-secret')- await user.click(screen.getByRole('button', { name: 'common.operation.save' }))- await waitFor(() =>- expect(- screen.queryByRole('button', { name: 'common.operation.save' }),- ).not.toBeInTheDocument(),- )- await waitFor(() => expect(client.isFetching()).toBe(0))- await user.click(screen.getAllByText('app.tracing.config')[0]!)- expect(- screen.getByRole('textbox', { name: 'app.tracing.configProvider.secretKey' }),- ).toHaveValue('[__MASKED__]')- expect(writes).toEqual([- {- method: 'PATCH',- body: {- tracing_provider: 'langfuse',- tracing_config: { ...langfuseConfig, secret_key: 'new-secret' },- },- },- ])- })-- it('disables tracing after deleting the last selected provider', async () => {- const writes = mockServer()- renderPanel()- const user = await openConfiguredPanel()- await user.click(screen.getAllByText('app.tracing.config')[0]!)- await user.click(screen.getByRole('button', { name: 'common.operation.remove' }))- await user.click(screen.getByRole('button', { name: 'common.operation.confirm' }))- await waitFor(() =>- expect(writes).toEqual([- { method: 'DELETE', body: null },- { method: 'POST', body: { enabled: false, tracing_provider: null } },- ]),- )- expect(await screen.findByText('app.tracing.title')).toBeInTheDocument()- })-- it('keeps an open draft across config refreshes and starts a new session for another app', async () => {- mockServer()- const { client, rerender } = renderPanel()- const user = await openConfiguredPanel()- await user.click(screen.getAllByText('app.tracing.config')[0]!)- const host = screen.getByRole('textbox', { name: 'Host' })- await user.clear(host)- await user.type(host, 'https://draft.langfuse.com')- act(() =>- client.setQueryData(- consoleQuery.apps.byAppId.traceConfig.get.queryKey({- input: { params: { app_id: 'app-1' }, query: { tracing_provider: 'langfuse' } },- }),- { tracing_config: { ...langfuseConfig, host: 'https://server.langfuse.com' } },- ),- )- expect(host).toHaveValue('https://draft.langfuse.com')- rerender(<Panel appId="app-2" readOnly={false} />)- await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument())- await openConfiguredPanel()- await user.click(screen.getAllByText('app.tracing.config')[0]!)- expect(screen.getByRole('textbox', { name: 'Host' })).toHaveValue(langfuseConfig.host)- })-})diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config-button.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config-button.tsxdeleted file mode 100644index 8bf0e632e61..00000000000--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config-button.tsx+++ /dev/null@@ -1,53 +0,0 @@-'use client'-import type { FC } from 'react'-import type { PopupProps } from './config-popup'-import { Button } from '@langgenius/dify-ui/button'-import { cn } from '@langgenius/dify-ui/cn'-import { Popover, PopoverContent, PopoverTrigger } from '@langgenius/dify-ui/popover'-import * as React from 'react'-import ConfigPopup from './config-popup'--type Props = Readonly<{- readOnly: boolean- className?: string- hasConfigured: boolean- disabled?: boolean- children?: React.ReactNode-}> &- PopupProps--const ConfigBtn: FC<Props> = ({- className,- hasConfigured,- disabled = false,- children,- ...popupProps-}) => {- if (popupProps.readOnly && !hasConfigured) return null-- return (- <Popover>- <PopoverTrigger- disabled={disabled}- render={- <Button- className={cn(- 'h-auto gap-0 rounded-xl border-components-panel-border bg-background-default-dodge p-2 hover:bg-background-default-lighter',- className,- )}- />- }- >- {children}- </PopoverTrigger>- <PopoverContent- placement="bottom-end"- sideOffset={12}- className="border-none bg-transparent shadow-none"- >- <ConfigPopup {...popupProps} />- </PopoverContent>- </Popover>- )-}-export default React.memo(ConfigBtn)diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config-popup.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config-popup.tsxdeleted file mode 100644index 213986eb3ea..00000000000--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config-popup.tsx+++ /dev/null@@ -1,381 +0,0 @@-'use client'-import type { TraceAppConfigResponse } from '@dify/contracts/api/console/apps/types.gen'-import type { DialogActions } from '@langgenius/dify-ui/dialog'-import type { FC, JSX } from 'react'-import type { ProviderConfigError } from './provider-panel'-import { cn } from '@langgenius/dify-ui/cn'-import { Dialog, DialogContent } from '@langgenius/dify-ui/dialog'-import { Separator } from '@langgenius/dify-ui/separator'-import { StatusDot } from '@langgenius/dify-ui/status-dot'-import { Switch } from '@langgenius/dify-ui/switch'-import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'-import * as React from 'react'-import { useCallback } from 'react'-import { useTranslation } from 'react-i18next'-import ProviderConfigModal from './provider-config-modal'-import ProviderPanel from './provider-panel'-import TracingIcon from './tracing-icon'-import { TracingProvider } from './type'--const I18N_PREFIX = 'tracing'--export type PopupProps = {- appId: string- configErrors?: Partial<Record<TracingProvider, ProviderConfigError>>- onConfigRemoved: (provider: TracingProvider) => void- readOnly: boolean- enabled: boolean- onStatusChange: (enabled: boolean) => void- chosenProvider: TracingProvider | null- onChooseProvider: (provider: TracingProvider) => void- arizeConfig: TraceAppConfigResponse['tracing_config']- phoenixConfig: TraceAppConfigResponse['tracing_config']- langSmithConfig: TraceAppConfigResponse['tracing_config']- langFuseConfig: TraceAppConfigResponse['tracing_config']- opikConfig: TraceAppConfigResponse['tracing_config']- weaveConfig: TraceAppConfigResponse['tracing_config']- aliyunConfig: TraceAppConfigResponse['tracing_config']- mlflowConfig: TraceAppConfigResponse['tracing_config']- databricksConfig: TraceAppConfigResponse['tracing_config']- tencentConfig: TraceAppConfigResponse['tracing_config']-}--const ConfigPopup: FC<PopupProps> = ({- appId,- configErrors,- onConfigRemoved,- readOnly,- enabled,- onStatusChange,- chosenProvider,- onChooseProvider,- arizeConfig,- phoenixConfig,- langSmithConfig,- langFuseConfig,- opikConfig,- weaveConfig,- aliyunConfig,- mlflowConfig,- databricksConfig,- tencentConfig,-}) => {- const { t } = useTranslation(['app'])- const dialogActionsRef = React.useRef<DialogActions>(null)- const firstInputRef = React.useRef<HTMLInputElement>(null)- const closeConfig = () => dialogActionsRef.current?.close()-- const handleOnChoose = useCallback(- (provider: TracingProvider) => {- return () => {- onChooseProvider(provider)- }- },- [onChooseProvider],- )-- const providerConfigs = {- [TracingProvider.arize]: arizeConfig,- [TracingProvider.phoenix]: phoenixConfig,- [TracingProvider.langSmith]: langSmithConfig,- [TracingProvider.langfuse]: langFuseConfig,- [TracingProvider.opik]: opikConfig,- [TracingProvider.weave]: weaveConfig,- [TracingProvider.aliyun]: aliyunConfig,- [TracingProvider.mlflow]: mlflowConfig,- [TracingProvider.databricks]: databricksConfig,- [TracingProvider.tencent]: tencentConfig,- } satisfies Record<TracingProvider, TraceAppConfigResponse['tracing_config']>- const providerAllConfigured = Object.values(providerConfigs).every(Boolean)- const providerAllNotConfigured = Object.values(providerConfigs).every((config) => !config)-- const cannotEnable = !enabled && (!chosenProvider || !providerConfigs[chosenProvider])-- const switchContent = (- <Switch- aria-label={t(($) => $[`${I18N_PREFIX}.tracing`], { ns: 'app' })}- className="ml-3"- checked={enabled}- onCheckedChange={onStatusChange}- disabled={cannotEnable}- />- )- const arizePanel = (- <ProviderPanel- type={TracingProvider.arize}- configError={configErrors?.[TracingProvider.arize]}- readOnly={readOnly}- config={arizeConfig}- isChosen={chosenProvider === TracingProvider.arize}- onChoose={handleOnChoose(TracingProvider.arize)}- key="arize-provider-panel"- />- )-- const phoenixPanel = (- <ProviderPanel- type={TracingProvider.phoenix}- configError={configErrors?.[TracingProvider.phoenix]}- readOnly={readOnly}- config={phoenixConfig}- isChosen={chosenProvider === TracingProvider.phoenix}- onChoose={handleOnChoose(TracingProvider.phoenix)}- key="phoenix-provider-panel"- />- )-- const langSmithPanel = (- <ProviderPanel- type={TracingProvider.langSmith}- configError={configErrors?.[TracingProvider.langSmith]}- readOnly={readOnly}- config={langSmithConfig}- isChosen={chosenProvider === TracingProvider.langSmith}- onChoose={handleOnChoose(TracingProvider.langSmith)}- key="langSmith-provider-panel"- />- )-- const langfusePanel = (- <ProviderPanel- type={TracingProvider.langfuse}- configError={configErrors?.[TracingProvider.langfuse]}- readOnly={readOnly}- config={langFuseConfig}- isChosen={chosenProvider === TracingProvider.langfuse}- onChoose={handleOnChoose(TracingProvider.langfuse)}- key="langfuse-provider-panel"- />- )-- const opikPanel = (- <ProviderPanel- type={TracingProvider.opik}- configError={configErrors?.[TracingProvider.opik]}- readOnly={readOnly}- config={opikConfig}- isChosen={chosenProvider === TracingProvider.opik}- onChoose={handleOnChoose(TracingProvider.opik)}- key="opik-provider-panel"- />- )-- const weavePanel = (- <ProviderPanel- type={TracingProvider.weave}- configError={configErrors?.[TracingProvider.weave]}- readOnly={readOnly}- config={weaveConfig}- isChosen={chosenProvider === TracingProvider.weave}- onChoose={handleOnChoose(TracingProvider.weave)}- key="weave-provider-panel"- />- )-- const aliyunPanel = (- <ProviderPanel- type={TracingProvider.aliyun}- configError={configErrors?.[TracingProvider.aliyun]}- readOnly={readOnly}- config={aliyunConfig}- isChosen={chosenProvider === TracingProvider.aliyun}- onChoose={handleOnChoose(TracingProvider.aliyun)}- key="aliyun-provider-panel"- />- )-- const mlflowPanel = (- <ProviderPanel- type={TracingProvider.mlflow}- configError={configErrors?.[TracingProvider.mlflow]}- readOnly={readOnly}- config={mlflowConfig}- isChosen={chosenProvider === TracingProvider.mlflow}- onChoose={handleOnChoose(TracingProvider.mlflow)}- key="mlflow-provider-panel"- />- )-- const databricksPanel = (- <ProviderPanel- type={TracingProvider.databricks}- configError={configErrors?.[TracingProvider.databricks]}- readOnly={readOnly}- config={databricksConfig}- isChosen={chosenProvider === TracingProvider.databricks}- onChoose={handleOnChoose(TracingProvider.databricks)}- key="databricks-provider-panel"- />- )-- const tencentPanel = (- <ProviderPanel- type={TracingProvider.tencent}- configError={configErrors?.[TracingProvider.tencent]}- readOnly={readOnly}- config={tencentConfig}- isChosen={chosenProvider === TracingProvider.tencent}- onChoose={handleOnChoose(TracingProvider.tencent)}- key="tencent-provider-panel"- />- )- const configuredProviderPanel = () => {- const configuredPanels: JSX.Element[] = []-- if (langFuseConfig) configuredPanels.push(langfusePanel)-- if (langSmithConfig) configuredPanels.push(langSmithPanel)-- if (opikConfig) configuredPanels.push(opikPanel)-- if (weaveConfig) configuredPanels.push(weavePanel)-- if (arizeConfig) configuredPanels.push(arizePanel)-- if (phoenixConfig) configuredPanels.push(phoenixPanel)-- if (aliyunConfig) configuredPanels.push(aliyunPanel)-- if (mlflowConfig) configuredPanels.push(mlflowPanel)-- if (databricksConfig) configuredPanels.push(databricksPanel)-- if (tencentConfig) configuredPanels.push(tencentPanel)-- return configuredPanels- }-- const moreProviderPanel = () => {- const notConfiguredPanels: JSX.Element[] = []-- if (!arizeConfig) notConfiguredPanels.push(arizePanel)-- if (!phoenixConfig) notConfiguredPanels.push(phoenixPanel)-- if (!langFuseConfig) notConfiguredPanels.push(langfusePanel)-- if (!langSmithConfig) notConfiguredPanels.push(langSmithPanel)-- if (!opikConfig) notConfiguredPanels.push(opikPanel)-- if (!weaveConfig) notConfiguredPanels.push(weavePanel)-- if (!aliyunConfig) notConfiguredPanels.push(aliyunPanel)-- if (!mlflowConfig) notConfiguredPanels.push(mlflowPanel)-- if (!databricksConfig) notConfiguredPanels.push(databricksPanel)-- if (!tencentConfig) notConfiguredPanels.push(tencentPanel)-- return notConfiguredPanels- }-- return (- <Dialog<TracingProvider> actionsRef={dialogActionsRef} disablePointerDismissal>- {({ payload: provider }) => (- <>- <div className="w-105 rounded-2xl border-[0.5px] border-components-panel-border bg-components-panel-bg p-4 shadow-xl">- <div className="flex items-center justify-between">- <div className="flex items-center">- <TracingIcon size="md" className="mr-2" />- <div className="title-2xl-semi-bold text-text-primary">- {t(($) => $[`${I18N_PREFIX}.tracing`], { ns: 'app' })}- </div>- </div>- <div className="flex items-center">- <StatusDot status={enabled ? 'success' : 'disabled'} />- <div- className={cn(- 'ml-1 system-xs-semibold-uppercase text-text-tertiary',- enabled && 'text-util-colors-green-green-600',- )}- >- {t(($) => $[`${I18N_PREFIX}.${enabled ? 'enabled' : 'disabled'}`], { ns: 'app' })}- </div>- {!readOnly && (- <>- {cannotEnable ? (- <Tooltip>- <TooltipTrigger render={switchContent} />- <TooltipContent>- {t(($) => $[`${I18N_PREFIX}.disabledTip`], { ns: 'app' })}- </TooltipContent>- </Tooltip>- ) : (- switchContent- )}- </>- )}- </div>- </div>-- <div className="mt-2 system-xs-regular text-text-tertiary">- {t(($) => $[`${I18N_PREFIX}.tracingDescription`], { ns: 'app' })}- </div>- <Separator className="my-3 h-[0.5px]" />- <div className="relative">- {providerAllConfigured || providerAllNotConfigured ? (- <>- <div className="system-xs-medium-uppercase text-text-tertiary">- {t(- ($) =>- $[- `${I18N_PREFIX}.configProviderTitle.${providerAllConfigured ? 'configured' : 'notConfigured'}`- ],- { ns: 'app' },- )}- </div>- <div className="mt-2 max-h-96 space-y-2 overflow-y-auto">- {langfusePanel}- {langSmithPanel}- {opikPanel}- {mlflowPanel}- {databricksPanel}- {weavePanel}- {arizePanel}- {phoenixPanel}- {aliyunPanel}- {tencentPanel}- </div>- </>- ) : (- <>- <div className="system-xs-medium-uppercase text-text-tertiary">- {t(($) => $[`${I18N_PREFIX}.configProviderTitle.configured`], { ns: 'app' })}- </div>- <div className="mt-2 max-h-40 space-y-2 overflow-y-auto">- {configuredProviderPanel()}- </div>- <div className="mt-3 system-xs-medium-uppercase text-text-tertiary">- {t(($) => $[`${I18N_PREFIX}.configProviderTitle.moreProvider`], { ns: 'app' })}- </div>- <div className="mt-2 max-h-40 space-y-2 overflow-y-auto">- {moreProviderPanel()}- </div>- </>- )}- </div>- </div>- <DialogContent initialFocus={firstInputRef} className="max-h-[calc(100dvh-2rem)] w-160">- {provider && (- <ProviderConfigModal- appId={appId}- type={provider}- payload={providerConfigs[provider]}- firstInputRef={firstInputRef}- onSaved={closeConfig}- onChosen={onChooseProvider}- onRemoved={() => {- onConfigRemoved(provider)- closeConfig()- }}- />- )}- </DialogContent>- </>- )}- </Dialog>- )-}-export default React.memo(ConfigPopup)diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config.ts b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config.tsdeleted file mode 100644index fc342a8745f..00000000000--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config.ts+++ /dev/null@@ -1,15 +0,0 @@-import { TracingProvider } from './type'--export const docURL = {- [TracingProvider.arize]: 'https://docs.arize.com/arize',- [TracingProvider.phoenix]: 'https://docs.arize.com/phoenix',- [TracingProvider.langSmith]: 'https://docs.smith.langchain.com/',- [TracingProvider.langfuse]: 'https://docs.langfuse.com',- [TracingProvider.opik]: 'https://www.comet.com/docs/opik/integrations/dify',- [TracingProvider.weave]: 'https://weave-docs.wandb.ai/',- [TracingProvider.aliyun]:- 'https://help.aliyun.com/zh/arms/tracing-analysis/untitled-document-1750672984680',- [TracingProvider.mlflow]: 'https://mlflow.org/docs/latest/genai/',- [TracingProvider.databricks]: 'https://docs.databricks.com/aws/en/mlflow3/genai/tracing/',- [TracingProvider.tencent]: 'https://cloud.tencent.com/document/product/248/116531',-}diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/panel.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/panel.tsxdeleted file mode 100644index c41d1d00d21..00000000000--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/panel.tsx+++ /dev/null@@ -1,192 +0,0 @@-'use client'--import type { AppTracePayload } from '@dify/contracts/api/console/apps/types.gen'-import type { FC } from 'react'-import type { ProviderConfigError } from './provider-panel'-import { Button } from '@langgenius/dify-ui/button'-import { cn } from '@langgenius/dify-ui/cn'-import { Separator } from '@langgenius/dify-ui/separator'-import { StatusDot } from '@langgenius/dify-ui/status-dot'-import { useMutation, useQueries, useQuery } from '@tanstack/react-query'-import * as React from 'react'-import { useTranslation } from 'react-i18next'-import { toast } from '@/app/notifications'-import { consoleQuery } from '@/service/console'-import ConfigButton from './config-button'-import TracingIcon from './tracing-icon'-import { TracingProvider } from './type'--const I18N_PREFIX = 'tracing'--type PanelProps = {- appId: string- readOnly: boolean-}--const Panel: FC<PanelProps> = ({ appId, readOnly }) => {- const { t } = useTranslation(['app', 'common'])- const statusQuery = useQuery(- consoleQuery.apps.byAppId.trace.get.queryOptions({- input: { params: { app_id: appId } },- }),- )- const tracingStatus = statusQuery.data- const providers = Object.values(TracingProvider)- const configQueries = useQueries({- queries: providers.map((provider) =>- consoleQuery.apps.byAppId.traceConfig.get.queryOptions({- input: { params: { app_id: appId }, query: { tracing_provider: provider } },- }),- ),- })- const configs = new Map(- providers.map((provider, index) => {- const response = configQueries[index]?.data- return [- provider,- response?.has_not_configured ? null : (response?.tracing_config ?? null),- ] as const- }),- )- const { mutate: updateTracingStatus } = useMutation(- consoleQuery.apps.byAppId.trace.post.mutationOptions(),- )- const enabled = tracingStatus?.enabled ?? false- const inUseTracingProvider =- providers.find((provider) => provider === tracingStatus?.tracing_provider) ?? null- const handleTracingStatusChange = (body: AppTracePayload, noToast = false) => {- updateTracingStatus(- { params: { app_id: appId }, body },- {- onSuccess: () => {- if (!noToast)- toast(- t(($) => $['api.success'], { ns: 'common' }),- { type: 'success' },- )- },- },- )- }- const handleTracingEnabledChange = (enabled: boolean) => {- handleTracingStatusChange({ tracing_provider: inUseTracingProvider, enabled })- }- const handleChooseProvider = (provider: TracingProvider) => {- handleTracingStatusChange({ tracing_provider: provider, enabled: true })- }- const providerIconClassMap: Record<TracingProvider, string> = {- [TracingProvider.arize]: 'i-custom-public-tracing-arize-icon w-18.5',- [TracingProvider.phoenix]: 'i-custom-public-tracing-phoenix-icon w-18.5',- [TracingProvider.langSmith]: 'i-custom-public-tracing-langsmith-icon w-21',- [TracingProvider.langfuse]: 'i-custom-public-tracing-langfuse-icon w-18.5',- [TracingProvider.opik]: 'i-custom-public-tracing-opik-icon w-[47.133904px]',- [TracingProvider.weave]: 'i-custom-public-tracing-weave-icon w-30',- [TracingProvider.aliyun]: 'i-custom-public-tracing-aliyun-icon w-16.25',- [TracingProvider.mlflow]: 'i-custom-public-tracing-mlflow-icon w-11',- [TracingProvider.databricks]: 'i-custom-public-tracing-databricks-icon w-25',- [TracingProvider.tencent]: 'i-custom-public-tracing-tencent-icon w-20',- }- const inUseProviderIconClassName = inUseTracingProvider- ? providerIconClassMap[inUseTracingProvider]- : undefined-- const hasConfiguredTracing =- !!inUseTracingProvider || [...configs.values()].some((config) => config !== null)- const handleTracingConfigRemoved = (provider: TracingProvider) => {- if (provider === inUseTracingProvider) {- handleTracingStatusChange({ enabled: false, tracing_provider: null }, true)- }- }-- const configErrors: Partial<Record<TracingProvider, ProviderConfigError>> = {}- configQueries.forEach((query, index) => {- const provider = providers[index]- if (provider && query.isFetched && !query.data) {- configErrors[provider] = {- onRetry: () => {- void query.refetch()- },- isRetrying: query.isFetching,- }- }- })- const statusFailed = statusQuery.isError && !tracingStatus- if (statusFailed) {- return (- <Button- variant="secondary"- disabled={statusQuery.isFetching}- onClick={() => {- void statusQuery.refetch()- }}- >- {t(($) => $['tracing.title'], { ns: 'app' })}- {' · '}- {t(($) => $['errorBoundary.tryAgain'], { ns: 'common' })}- </Button>- )- }- const isLoading =- statusQuery.isPending || configQueries.some((query) => query.isPending && !query.isFetched)-- return (- <div className={cn('flex items-center justify-between')}>- <ConfigButton- key={appId}- appId={appId}- readOnly={readOnly}- disabled={isLoading}- hasConfigured={hasConfiguredTracing}- enabled={enabled}- onStatusChange={handleTracingEnabledChange}- chosenProvider={inUseTracingProvider}- onChooseProvider={handleChooseProvider}- arizeConfig={configs.get(TracingProvider.arize)}- phoenixConfig={configs.get(TracingProvider.phoenix)}- langSmithConfig={configs.get(TracingProvider.langSmith)}- langFuseConfig={configs.get(TracingProvider.langfuse)}- opikConfig={configs.get(TracingProvider.opik)}- weaveConfig={configs.get(TracingProvider.weave)}- aliyunConfig={configs.get(TracingProvider.aliyun)}- mlflowConfig={configs.get(TracingProvider.mlflow)}- databricksConfig={configs.get(TracingProvider.databricks)}- tencentConfig={configs.get(TracingProvider.tencent)}- configErrors={configErrors}- onConfigRemoved={handleTracingConfigRemoved}- >- {!isLoading && hasConfiguredTracing ? (- <>- <span className="mr-1 ml-4 flex items-center">- <StatusDot status={enabled ? 'success' : 'disabled'} />- <span className="ml-1.5 system-xs-semibold-uppercase text-text-tertiary">- {t(($) => $[`${I18N_PREFIX}.${enabled ? 'enabled' : 'disabled'}`], { ns: 'app' })}- </span>- </span>- {inUseProviderIconClassName && (- <span aria-hidden className={cn(inUseProviderIconClassName, 'ml-1 h-4')} />- )}- <span className="ml-2 rounded-md p-1">- <span className="i-ri-equalizer-2-line size-4 text-text-tertiary" />- </span>- <Separator decorative orientation="vertical" className="mx-2 h-3.5" />- </>- ) : (- <>- <TracingIcon size="md" />- <span className="mx-2 system-sm-semibold text-text-secondary">- {t(($) => $[`${I18N_PREFIX}.title`], { ns: 'app' })}- </span>- <span className="rounded-md p-1">- <span className="i-ri-equalizer-2-line size-4 text-text-tertiary" />- </span>- <Separator decorative orientation="vertical" className="mx-2 h-3.5" />- <span className="rounded-md p-1">- <span className="i-ri-arrow-down-double-line size-4 text-text-tertiary" />- </span>- </>- )}- </ConfigButton>- </div>- )-}-export default React.memo(Panel)diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/provider-config-modal.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/provider-config-modal.tsxdeleted file mode 100644index b0289f122bb..00000000000--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/provider-config-modal.tsx+++ /dev/null@@ -1,778 +0,0 @@-'use client'-import type {- TraceAppConfigResponse,- TraceConfigPayload,-} from '@dify/contracts/api/console/apps/types.gen'-import type { FC, RefObject } from 'react'-import {- AlertDialog,- AlertDialogCancelButton,- AlertDialogConfirmButton,- AlertDialogContent,- AlertDialogDescription,- AlertDialogFooter,- AlertDialogHeader,- AlertDialogTitle,- AlertDialogTrigger,-} from '@langgenius/dify-ui/alert-dialog'-import { Button } from '@langgenius/dify-ui/button'-import { DialogClose, DialogTitle } from '@langgenius/dify-ui/dialog'-import { Field, FieldError, FieldLabel } from '@langgenius/dify-ui/field'-import { Form } from '@langgenius/dify-ui/form'-import { IconButton } from '@langgenius/dify-ui/icon-button'-import { Input } from '@langgenius/dify-ui/input'-import { Separator } from '@langgenius/dify-ui/separator'-import { useMutation } from '@tanstack/react-query'-import * as React from 'react'-import { useTranslation } from 'react-i18next'-import { consoleQuery } from '@/service/console'-import { docURL } from './config'-import { TracingProvider } from './type'--type Props = Readonly<{- appId: string- type: TracingProvider- payload?: TraceAppConfigResponse['tracing_config']- onRemoved: () => void- firstInputRef: RefObject<HTMLInputElement | null>- onSaved: () => void- onChosen: (provider: TracingProvider) => void-}>--const I18N_PREFIX = 'tracing.configProvider'--const ProviderConfigModal: FC<Props> = ({- appId,- type,- payload,- onRemoved,- firstInputRef,- onSaved,- onChosen,-}) => {- const { t } = useTranslation(['app', 'common', 'modelProvider'])- const isEdit = !!payload- const createConfig = useMutation(- consoleQuery.apps.byAppId.traceConfig.post.mutationOptions({- context: { silent: true },- onSuccess: () => {- onSaved()- onChosen(type)- },- }),- )- const updateConfig = useMutation(- consoleQuery.apps.byAppId.traceConfig.patch.mutationOptions({- context: { silent: true },- onSuccess: onSaved,- }),- )- const removeConfig = useMutation(- consoleQuery.apps.byAppId.traceConfig.delete.mutationOptions({- onSuccess: onRemoved,- }),- )- const saveConfig = isEdit ? updateConfig : createConfig-- const handleRemove = () => {- removeConfig.mutate({- params: { app_id: appId },- query: { tracing_provider: type },- })- }-- const handleSave = (values: TraceConfigPayload['tracing_config']) => {- if (saveConfig.isPending) return- const config: TraceConfigPayload['tracing_config'] = {}- for (const [key, value] of Object.entries(values))- config[key] = value === '' && payload?.[key] === null ? null : value- saveConfig.mutate({- params: { app_id: appId },- body: { tracing_provider: type, tracing_config: config },- })- }-- return (- <>- <div className="flex items-center justify-between gap-4 px-8 pt-8 pb-4">- <DialogTitle className="min-w-0 flex-1">- {t(($) => $[`${I18N_PREFIX}.title`], { ns: 'app' })}- {t(($) => $[`tracing.${type}.title`], { ns: 'app' })}- </DialogTitle>- <DialogClose- render={- <IconButton aria-label={t(($) => $['operation.close'], { ns: 'common' })} size="lg">- <span aria-hidden className="i-ri-close-line size-4" />- </IconButton>- }- />- </div>-- <Form<TraceConfigPayload['tracing_config']> className="px-8 pb-8" onFormSubmit={handleSave}>- <div className="space-y-4">- {type === TracingProvider.arize && (- <>- <Field disabled={saveConfig.isPending} name="api_key">- <FieldLabel>- API Key- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input- ref={firstInputRef}- required- defaultValue={payload?.api_key ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: 'API Key',- })}- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="space_id">- <FieldLabel>- Space ID- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input- required- defaultValue={payload?.space_id ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: 'Space ID',- })}- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="project">- <FieldLabel>- {t(($) => $[`${I18N_PREFIX}.project`], { ns: 'app' })}- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input- required- defaultValue={payload?.project ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: t(($) => $[`${I18N_PREFIX}.project`], { ns: 'app' }),- })}- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="endpoint">- <FieldLabel>Endpoint</FieldLabel>- <Input- type="url"- pattern="[Hh][Tt][Tt][Pp][Ss]?://.+"- defaultValue={payload?.endpoint ?? ''}- placeholder="https://otlp.arize.com"- />- <FieldError />- </Field>- </>- )}- {type === TracingProvider.phoenix && (- <>- <Field disabled={saveConfig.isPending} name="api_key">- <FieldLabel>- API Key- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input- ref={firstInputRef}- required- defaultValue={payload?.api_key ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: 'API Key',- })}- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="project">- <FieldLabel>- {t(($) => $[`${I18N_PREFIX}.project`], { ns: 'app' })}- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input- required- defaultValue={payload?.project ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: t(($) => $[`${I18N_PREFIX}.project`], { ns: 'app' }),- })}- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="endpoint">- <FieldLabel>Endpoint</FieldLabel>- <Input- type="url"- pattern="[Hh][Tt][Tt][Pp][Ss]?://.+"- defaultValue={payload?.endpoint ?? ''}- placeholder="https://app.phoenix.arize.com"- />- <FieldError />- </Field>- </>- )}- {type === TracingProvider.aliyun && (- <>- <Field disabled={saveConfig.isPending} name="license_key">- <FieldLabel>- License Key- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input- pattern=".*\S.*"- ref={firstInputRef}- required- defaultValue={payload?.license_key ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: 'License Key',- })}- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="endpoint">- <FieldLabel>- Endpoint- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input- type="url"- pattern="[Hh][Tt][Tt][Pp][Ss]?://.+"- required- defaultValue={payload?.endpoint ?? ''}- placeholder="https://tracing.arms.aliyuncs.com"- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="app_name">- <FieldLabel>- App Name- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input required defaultValue={payload?.app_name ?? ''} />- <FieldError />- </Field>- </>- )}- {type === TracingProvider.tencent && (- <>- <Field disabled={saveConfig.isPending} name="token">- <FieldLabel>- Token- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input- pattern=".*\S.*"- ref={firstInputRef}- required- defaultValue={payload?.token ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: 'Token',- })}- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="endpoint">- <FieldLabel>- Endpoint- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input- type="url"- pattern="[Hh][Tt][Tt][Pp][Ss]?://.+"- required- defaultValue={payload?.endpoint ?? ''}- placeholder="https://your-region.cls.tencentcs.com"- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="service_name">- <FieldLabel>- Service Name- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input required defaultValue={payload?.service_name ?? ''} placeholder="dify_app" />- <FieldError />- </Field>- </>- )}- {type === TracingProvider.weave && (- <>- <Field disabled={saveConfig.isPending} name="api_key">- <FieldLabel>- API Key- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input- ref={firstInputRef}- required- defaultValue={payload?.api_key ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: 'API Key',- })}- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="project">- <FieldLabel>- {t(($) => $[`${I18N_PREFIX}.project`], { ns: 'app' })}- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input- required- defaultValue={payload?.project ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: t(($) => $[`${I18N_PREFIX}.project`], { ns: 'app' }),- })}- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="entity">- <FieldLabel>Entity</FieldLabel>- <Input- defaultValue={payload?.entity ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: 'Entity',- })}- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="endpoint">- <FieldLabel>Endpoint</FieldLabel>- <Input- type="url"- pattern="[Hh][Tt][Tt][Pp][Ss]://.+"- defaultValue={payload?.endpoint ?? ''}- placeholder="https://trace.wandb.ai/"- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="host">- <FieldLabel>Host</FieldLabel>- <Input- type="url"- pattern="[Hh][Tt][Tt][Pp][Ss]?://.+"- defaultValue={payload?.host ?? ''}- placeholder="https://api.wandb.ai"- />- <FieldError />- </Field>- </>- )}- {type === TracingProvider.langSmith && (- <>- <Field disabled={saveConfig.isPending} name="api_key">- <FieldLabel>- API Key- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input- ref={firstInputRef}- required- defaultValue={payload?.api_key ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: 'API Key',- })}- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="project">- <FieldLabel>- {t(($) => $[`${I18N_PREFIX}.project`], { ns: 'app' })}- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input- required- defaultValue={payload?.project ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: t(($) => $[`${I18N_PREFIX}.project`], { ns: 'app' }),- })}- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="endpoint">- <FieldLabel>Endpoint</FieldLabel>- <Input- type="url"- pattern="[Hh][Tt][Tt][Pp][Ss]://.+"- defaultValue={payload?.endpoint ?? ''}- placeholder="https://api.smith.langchain.com"- />- <FieldError />- </Field>- </>- )}- {type === TracingProvider.langfuse && (- <>- <Field disabled={saveConfig.isPending} name="secret_key">- <FieldLabel>- {t(($) => $[`${I18N_PREFIX}.secretKey`], { ns: 'app' })}- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input- ref={firstInputRef}- defaultValue={payload?.secret_key ?? ''}- required- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: t(($) => $[`${I18N_PREFIX}.secretKey`], { ns: 'app' }),- })}- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="public_key">- <FieldLabel>- {t(($) => $[`${I18N_PREFIX}.publicKey`], { ns: 'app' })}- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input- required- defaultValue={payload?.public_key ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: t(($) => $[`${I18N_PREFIX}.publicKey`], { ns: 'app' }),- })}- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="host">- <FieldLabel>- Host- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input- type="url"- pattern="[Hh][Tt][Tt][Pp][Ss]?://.+"- required- defaultValue={payload?.host ?? ''}- placeholder="https://cloud.langfuse.com"- />- <FieldError />- </Field>- </>- )}- {type === TracingProvider.opik && (- <>- <Field disabled={saveConfig.isPending} name="api_key">- <FieldLabel>API Key</FieldLabel>- <Input- ref={firstInputRef}- defaultValue={payload?.api_key ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: 'API Key',- })}- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="project">- <FieldLabel>{t(($) => $[`${I18N_PREFIX}.project`], { ns: 'app' })}</FieldLabel>- <Input- defaultValue={payload?.project ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: t(($) => $[`${I18N_PREFIX}.project`], { ns: 'app' }),- })}- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="workspace">- <FieldLabel>Workspace</FieldLabel>- <Input defaultValue={payload?.workspace ?? ''} placeholder="default" />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="url">- <FieldLabel>Url</FieldLabel>- <Input- type="url"- pattern="[Hh][Tt][Tt][Pp][Ss]?://.*/api/"- defaultValue={payload?.url ?? ''}- placeholder="https://www.comet.com/opik/api/"- />- <FieldError />- </Field>- </>- )}- {type === TracingProvider.mlflow && (- <>- <Field disabled={saveConfig.isPending} name="tracking_uri">- <FieldLabel>- {t(($) => $[`${I18N_PREFIX}.trackingUri`], { ns: 'app' })}- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input- type="url"- pattern="[Hh][Tt][Tt][Pp][Ss]?://.+"- ref={firstInputRef}- defaultValue={payload?.tracking_uri ?? ''}- required- placeholder="http://localhost:5000"- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="experiment_id">- <FieldLabel>- {t(($) => $[`${I18N_PREFIX}.experimentId`], { ns: 'app' })}- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input- inputMode="numeric"- pattern="\s*[0-9]+\s*"- required- defaultValue={payload?.experiment_id ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: t(($) => $[`${I18N_PREFIX}.experimentId`], { ns: 'app' }),- })}- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="username">- <FieldLabel>{t(($) => $[`${I18N_PREFIX}.username`], { ns: 'app' })}</FieldLabel>- <Input- defaultValue={payload?.username ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: t(($) => $[`${I18N_PREFIX}.username`], { ns: 'app' }),- })}- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="password">- <FieldLabel>{t(($) => $[`${I18N_PREFIX}.password`], { ns: 'app' })}</FieldLabel>- <Input- defaultValue={payload?.password ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: t(($) => $[`${I18N_PREFIX}.password`], { ns: 'app' }),- })}- />- <FieldError />- </Field>- </>- )}- {type === TracingProvider.databricks && (- <>- <Field disabled={saveConfig.isPending} name="experiment_id">- <FieldLabel>- {t(($) => $[`${I18N_PREFIX}.experimentId`], { ns: 'app' })}- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input- inputMode="numeric"- pattern="\s*[0-9]+\s*"- ref={firstInputRef}- defaultValue={payload?.experiment_id ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: t(($) => $[`${I18N_PREFIX}.experimentId`], { ns: 'app' }),- })}- required- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="host">- <FieldLabel>- {t(($) => $[`${I18N_PREFIX}.databricksHost`], { ns: 'app' })}- <span aria-hidden className="text-text-destructive">- *- </span>- </FieldLabel>- <Input- type="url"- pattern="[Hh][Tt][Tt][Pp][Ss]?://.+"- defaultValue={payload?.host ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: t(($) => $[`${I18N_PREFIX}.databricksHost`], { ns: 'app' }),- })}- required- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="client_id">- <FieldLabel>{t(($) => $[`${I18N_PREFIX}.clientId`], { ns: 'app' })}</FieldLabel>- <Input- defaultValue={payload?.client_id ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: t(($) => $[`${I18N_PREFIX}.clientId`], { ns: 'app' }),- })}- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="client_secret">- <FieldLabel>{t(($) => $[`${I18N_PREFIX}.clientSecret`], { ns: 'app' })}</FieldLabel>- <Input- defaultValue={payload?.client_secret ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: t(($) => $[`${I18N_PREFIX}.clientSecret`], { ns: 'app' }),- })}- />- <FieldError />- </Field>- <Field disabled={saveConfig.isPending} name="personal_access_token">- <FieldLabel>- {t(($) => $[`${I18N_PREFIX}.personalAccessToken`], { ns: 'app' })}- </FieldLabel>- <Input- defaultValue={payload?.personal_access_token ?? ''}- placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {- ns: 'app',- key: t(($) => $[`${I18N_PREFIX}.personalAccessToken`], { ns: 'app' }),- })}- />- <FieldError />- </Field>- </>- )}- </div>- {saveConfig.error && (- <p role="alert" className="mt-4 system-sm-regular text-text-destructive">- {saveConfig.error.message}- </p>- )}- <div className="mt-8 flex items-center justify-between gap-4">- <a- className="flex items-center space-x-1 text-xs leading-4.5 font-normal text-primary-600"- target="_blank"- href={docURL[type]}- >- <span>- {t(($) => $[`${I18N_PREFIX}.viewDocsLink`], {- ns: 'app',- key: t(($) => $[`tracing.${type}.title`], { ns: 'app' }),- })}- </span>- <span aria-hidden className="i-custom-vender-line-general-link-external-02 size-3" />- </a>- <div className="flex items-center">- {isEdit && (- <>- <AlertDialog>- <AlertDialogTrigger- render={<Button className="h-9 text-sm font-medium" tone="destructive" />}- >- {t(($) => $['operation.remove'], { ns: 'common' })}- </AlertDialogTrigger>- <AlertDialogContent>- <AlertDialogHeader>- <AlertDialogTitle>- {t(($) => $[`${I18N_PREFIX}.removeConfirmTitle`], {- ns: 'app',- key: t(($) => $[`tracing.${type}.title`], { ns: 'app' }),- })}- </AlertDialogTitle>- <AlertDialogDescription>- {t(($) => $[`${I18N_PREFIX}.removeConfirmContent`], { ns: 'app' })}- </AlertDialogDescription>- </AlertDialogHeader>- <AlertDialogFooter>- <AlertDialogCancelButton>- {t(($) => $['operation.cancel'], { ns: 'common' })}- </AlertDialogCancelButton>- <AlertDialogConfirmButton- onClick={handleRemove}- loading={removeConfig.isPending}- >- {t(($) => $['operation.confirm'], { ns: 'common' })}- </AlertDialogConfirmButton>- </AlertDialogFooter>- </AlertDialogContent>- </AlertDialog>- <Separator orientation="vertical" className="mx-3 h-4.5" />- </>- )}- <DialogClose- render={<Button className="mr-2 h-9 text-sm font-medium text-text-secondary" />}- >- {t(($) => $['operation.cancel'], { ns: 'common' })}- </DialogClose>- <Button- className="h-9 text-sm font-medium"- variant="primary"- type="submit"- loading={saveConfig.isPending}- >- {t(($) => $[`operation.${isEdit ? 'save' : 'saveAndEnable'}`], {- ns: 'common',- })}- </Button>- </div>- </div>- </Form>- <div className="border-t-[0.5px] border-divider-regular">- <div className="flex items-center justify-center bg-background-section-burn py-3 text-xs text-text-tertiary">- <span- aria-hidden- className="mr-1 i-custom-vender-solid-security-lock-01 size-3 text-text-tertiary"- />- {t(($) => $['modelProvider.encrypted.front'], { ns: 'modelProvider' })}- <a- className="mx-1 text-primary-600"- target="_blank"- rel="noopener noreferrer"- href="https://pycryptodome.readthedocs.io/en/latest/src/cipher/oaep.html"- >- PKCS1_OAEP- </a>- {t(($) => $['modelProvider.encrypted.back'], { ns: 'modelProvider' })}- </div>- </div>- </>- )-}-export default React.memo(ProviderConfigModal)diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/type.ts b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/type.tsdeleted file mode 100644index 254cce08963..00000000000--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/type.ts+++ /dev/null@@ -1,14 +0,0 @@-export const TracingProvider = {- arize: 'arize',- phoenix: 'phoenix',- langSmith: 'langsmith',- langfuse: 'langfuse',- opik: 'opik',- weave: 'weave',- aliyun: 'aliyun',- mlflow: 'mlflow',- databricks: 'databricks',- tencent: 'tencent',-} as const--export type TracingProvider = (typeof TracingProvider)[keyof typeof TracingProvider]diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/view.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/view.tsxindex f91c3195859..7eed5c49172 100644--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/view.tsx+++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/view.tsx@@ -3,12 +3,12 @@import { useSuspenseQueries } from '@tanstack/react-query'import { useAtomValue } from 'jotai'import * as React from 'react'+import { TracingConfiguration } from '@/app/components/app/tracing/configuration'import { workspacePermissionKeysAtom } from '@/context/permission-state'import { userProfileQueryOptions } from '@/features/account-profile/client'import { consoleQuery } from '@/service/console'import { getAppACLCapabilities } from '@/utils/permission'import ChartView from './chart-view'-import TracingPanel from './tracing/panel'type OverviewViewProps = {appId: string@@ -43,7 +43,10 @@ const OverviewView = ({ appId }: OverviewViewProps) => {appMode={appDetail.mode}headerRight={appACLCapabilities.canConfigureTracing ? (- <TracingPanel appId={appId} readOnly={false} />+ <TracingConfiguration+ resource={{ kind: 'app', appId, mode: appDetail.mode }}+ readOnly={false}+ />) : null}/>diff --git a/web/app/components/app/log/__tests__/list.spec.tsx b/web/app/components/app/log/__tests__/list.spec.tsxindex bcc72763632..3e1c1d163c0 100644--- a/web/app/components/app/log/__tests__/list.spec.tsx+++ b/web/app/components/app/log/__tests__/list.spec.tsx@@ -26,6 +26,7 @@ import { createNuqsTestWrapper } from '@/test/nuqs-testing'import ConversationList from '../list'const api = vi.hoisted(() => ({+ externalTrace: vi.fn<typeof consoleClient.apps.byAppId.traceRuns.bySourceKind.bySourceId.get>(),messages: vi.fn<typeof consoleClient.apps.byAppId.chatMessages.get>(),feedback: vi.fn<typeof consoleClient.apps.byAppId.feedbacks.post>(),addAnnotation: vi.fn<typeof consoleClient.apps.byAppId.annotations.post>(),@@ -52,6 +53,7 @@ vi.mock('@/service/console', async (importOriginal) => {return {...actual,consoleQuery: withConsoleResponses(actual.consoleQuery, {+ 'apps.byAppId.traceRuns.bySourceKind.bySourceId.get': (input) => api.externalTrace(input),'apps.byAppId.chatMessages.get': (input) => api.messages(input),'apps.byAppId.chatConversations.byConversationId.get': (input) => api.chatDetail(input),'apps.byAppId.completionConversations.byConversationId.get': (input) =>@@ -227,6 +229,13 @@ function renderConversationList({beforeEach(() => {for (const mock of Object.values(api)) mock.mockReset()+ api.externalTrace.mockReset().mockResolvedValue({+ status: 'accepted',+ source_kind: 'workflow',+ source_id: 'run-1',+ provider: 'langfuse',+ trace_url: 'https://cloud.langfuse.com/trace/run-1',+ })onRefresh.mockClear()api.chatDetail.mockImplementation(async ({ params }) =>createChatDetail({ id: params.conversation_id }),@@ -523,6 +532,13 @@ it('opens and closes the workflow run selected from an answer', async () => {'true',)await waitFor(() => expect(api.run).toHaveBeenCalledWith('/apps/app-1/workflow-runs/run-1'))+ expect(await screen.findByRole('link', { name: 'app.tracing.run.viewTrace' })).toHaveAttribute(+ 'href',+ 'https://cloud.langfuse.com/trace/run-1',+ )+ expect(api.externalTrace).toHaveBeenCalledWith({+ params: { app_id: 'app-1', source_kind: 'workflow', source_id: 'run-1' },+ })expect(api.tracing).toHaveBeenCalledWith({url: '/apps/app-1/workflow-runs/run-1/node-executions',})diff --git a/web/app/components/app/tracing/__tests__/inherited-tracing-summary.spec.tsx b/web/app/components/app/tracing/__tests__/inherited-tracing-summary.spec.tsxnew file mode 100644index 00000000000..6788f233ef5--- /dev/null+++ b/web/app/components/app/tracing/__tests__/inherited-tracing-summary.spec.tsx@@ -0,0 +1,227 @@+import type {+ AppTraceResponse,+ TraceProviderCapabilitiesResponse,+} from '@dify/contracts/api/console/apps/types.gen'+import { act, render, screen } from '@testing-library/react'+import userEvent from '@testing-library/user-event'+import { consoleQuery } from '@/service/console'+import { httpErrorFromResponse } from '@/service/http-error'+import { createConsoleQueryWrapper } from '@/test/console/query-data'+import { createAppDetailFixture } from '@/test/fixtures/app'+import { AppACLPermission } from '@/utils/permission'+import { InheritedTracingSummary } from '../inherited-tracing-summary'++const { request } = vi.hoisted(() => ({+ request:+ vi.fn<(url: string, init: RequestInit, options: { request: Request }) => Promise<Response>>(),+}))+vi.mock('@/service/base', async (importOriginal) => ({+ ...(await importOriginal<typeof import('@/service/base')>()),+ request,+}))++const capabilities: TraceProviderCapabilitiesResponse = {+ provider: 'langfuse',+ agent_spans: true,+ session: true,+ native_usage: true,+ native_cost: true,+ trace_url: true,+ span_url: true,+ api_collection_enabled: true,+ export_ack: 'accepted',+}++function setup({+ policy = {+ enabled: true,+ tracing_provider: 'langfuse',+ capture_content: false,+ capture_agent: true,+ },+ permissions = [+ AppACLPermission.ViewLayout,+ AppACLPermission.Monitor,+ AppACLPermission.TracingConfig,+ ],+ providerCapabilities = capabilities,+ failPolicy = false,+ agentTracingEnabled = true,+}: {+ policy?: AppTraceResponse+ permissions?: string[]+ providerCapabilities?: TraceProviderCapabilitiesResponse+ failPolicy?: boolean+ agentTracingEnabled?: boolean+} = {}) {+ const { wrapper, queryClient } = createConsoleQueryWrapper({+ systemFeatures: { agent_tracing_api_collection_enabled: agentTracingEnabled },+ })+ queryClient.setQueryData(+ consoleQuery.apps.byAppId.get.queryKey({ input: { params: { app_id: 'workflow-1' } } }),+ createAppDetailFixture({ id: 'workflow-1', permission_keys: permissions }),+ )+ const sent: string[] = []+ const state = { failPolicy }+ request.mockImplementation(async (_url, _init, { request: req }) => {+ const url = new URL(req.url)+ sent.push(url.pathname)+ if (url.pathname.endsWith('/apps/workflow-1/trace')) {+ if (state.failPolicy)+ throw await httpErrorFromResponse(+ Response.json({ code: 'unknown', message: 'Unavailable' }, { status: 500 }),+ )+ return Response.json(policy)+ }+ if (url.pathname.endsWith('/apps/workflow-1/trace-capabilities'))+ return Response.json(providerCapabilities)+ throw new Error(`Unexpected request ${req.method} ${url.pathname}`)+ })+ render(+ <InheritedTracingSummary resource={{ kind: 'app', appId: 'workflow-1', mode: 'workflow' }} />,+ { wrapper },+ )+ return { sent, state, queryClient }+}++describe('InheritedTracingSummary', () => {+ it('shows the workflow provider status and explains the inheritance on demand', async () => {+ const user = userEvent.setup()+ setup()+ const status = await screen.findByText(+ 'app.tracing.inherited.providerEnabled:{"provider":"app.tracing.langfuse.title"}',+ )+ expect(screen.getByRole('group', { name: 'app.tracing.inherited.title' })).toContainElement(+ status,+ )+ expect(screen.queryByText('app.tracing.inherited.description')).not.toBeInTheDocument()++ await user.click(screen.getByRole('button', { name: 'app.tracing.inherited.title' }))++ expect(await screen.findByText('app.tracing.inherited.description')).toBeInTheDocument()+ expect(screen.getByText('app.tracing.captureContent').nextElementSibling).toHaveTextContent(+ 'app.tracing.inherited.off',+ )+ expect(screen.getByText('app.tracing.captureAgent').nextElementSibling).toHaveTextContent(+ 'app.tracing.inherited.on',+ )+ })++ it('distinguishes a disabled provider from a workflow without tracing', async () => {+ const user = userEvent.setup()+ setup({ policy: { enabled: false, tracing_provider: 'langfuse' } })+ expect(+ await screen.findByText(+ 'app.tracing.inherited.providerDisabled:{"provider":"app.tracing.langfuse.title"}',+ ),+ ).toBeInTheDocument()++ await user.click(screen.getByRole('button', { name: 'app.tracing.inherited.title' }))++ expect(await screen.findByText('app.tracing.inherited.description')).toBeInTheDocument()+ expect(screen.queryByText('app.tracing.captureContent')).not.toBeInTheDocument()+ })++ it('reports an unconfigured workflow without a provider', async () => {+ const { sent } = setup({ policy: { enabled: false, tracing_provider: null } })+ expect(await screen.findByText('app.tracing.inherited.notConfigured')).toBeInTheDocument()+ expect(sent.some((path) => path.endsWith('/trace-capabilities'))).toBe(false)+ })++ it('links to the workflow tracing settings only for users who can monitor and configure', async () => {+ setup()+ const link = await screen.findByRole('link', {+ name: 'app.tracing.inherited.providerEnabled:{"provider":"app.tracing.langfuse.title"}',+ })+ expect(link).toHaveAccessibleDescription(+ 'app.tracing.inherited.settings (common.operation.openInNewTab)',+ )+ expect(link).toHaveAttribute('href', '/app/workflow-1/overview?tracing=configure')+ expect(link).toHaveAttribute('target', '_blank')+ })++ it('hides the settings link and skips capabilities without monitor permission', async () => {+ const { sent } = setup({ permissions: [AppACLPermission.ViewLayout, AppACLPermission.Edit] })+ expect(+ await screen.findByText(+ 'app.tracing.inherited.providerEnabled:{"provider":"app.tracing.langfuse.title"}',+ ),+ ).toBeInTheDocument()+ expect(screen.queryByRole('link')).not.toBeInTheDocument()+ expect(sent.some((path) => path.endsWith('/trace-capabilities'))).toBe(false)+ })++ it('warns when the provider cannot export full Agent traces', async () => {+ setup({ providerCapabilities: { ...capabilities, agent_spans: false } })+ expect(+ await screen.findByText(+ 'app.tracing.agentSpansUnsupported:{"provider":"app.tracing.langfuse.title"}',+ ),+ ).toBeInTheDocument()+ })++ it('keeps the last known status when a background refresh fails', async () => {+ const { state, queryClient } = setup()+ await screen.findByText(+ 'app.tracing.inherited.providerEnabled:{"provider":"app.tracing.langfuse.title"}',+ )++ state.failPolicy = true+ await act(() =>+ queryClient.refetchQueries({+ queryKey: consoleQuery.apps.byAppId.trace.get.queryKey({+ input: { params: { app_id: 'workflow-1' } },+ }),+ }),+ )++ expect(+ screen.getByText(+ 'app.tracing.inherited.providerEnabled:{"provider":"app.tracing.langfuse.title"}',+ ),+ ).toBeInTheDocument()+ expect(screen.queryByText('app.tracing.inherited.loadFailed')).not.toBeInTheDocument()+ })++ it('drops the capture policy and says why when Agent tracing is unavailable', async () => {+ const user = userEvent.setup()+ setup({ agentTracingEnabled: false })+ expect(await screen.findByText('app.tracing.agentTracingUnavailable')).toBeInTheDocument()++ await user.click(screen.getByRole('button', { name: 'app.tracing.inherited.title' }))++ expect(await screen.findByText('app.tracing.inherited.description')).toBeInTheDocument()+ expect(screen.queryByText('app.tracing.captureContent')).not.toBeInTheDocument()+ })++ it('retries a failed status request in place', async () => {+ const user = userEvent.setup()+ const { state } = setup({ failPolicy: true })+ expect(await screen.findByText('app.tracing.inherited.loadFailed')).toBeInTheDocument()++ state.failPolicy = false+ await user.click(screen.getByRole('button', { name: 'common.operation.retry' }))++ expect(+ await screen.findByText(+ 'app.tracing.inherited.providerEnabled:{"provider":"app.tracing.langfuse.title"}',+ ),+ ).toBeInTheDocument()+ })+})++describe('Deployment availability', () => {+ it.each([null, 'langfuse'])(+ 'shows the deployment gate with disabled policy and provider %s',+ async (provider) => {+ const { sent } = setup({+ policy: { enabled: false, tracing_provider: provider },+ agentTracingEnabled: false,+ permissions: [AppACLPermission.ViewLayout],+ })+ expect(await screen.findByText('app.tracing.agentTracingUnavailable')).toBeVisible()+ expect(screen.queryByRole('link')).not.toBeInTheDocument()+ expect(sent.some((path) => path.endsWith('/trace-capabilities'))).toBe(false)+ },+ )+})diff --git a/web/app/components/app/tracing/__tests__/panel.spec.tsx b/web/app/components/app/tracing/__tests__/panel.spec.tsxnew file mode 100644index 00000000000..cc69c04c9f6--- /dev/null+++ b/web/app/components/app/tracing/__tests__/panel.spec.tsx@@ -0,0 +1,1090 @@+import type {+ AppMode,+ TraceProviderCapabilitiesResponse,+} from '@dify/contracts/api/console/apps/types.gen'+import { act, render, screen, waitFor, within } from '@testing-library/react'+import userEvent from '@testing-library/user-event'+import { consoleQuery } from '@/service/console'+import { httpErrorFromResponse } from '@/service/http-error'+import { createQueryClientWrapper } from '@/test/console/query-client'+import { createSystemFeaturesFixture } from '@/test/console/system-features'+import { createDeferred } from '@/test/deferred'+import { createNuqsTestWrapper } from '@/test/nuqs-testing'+import { createTestQueryClient } from '@/test/query-client'+import { TracingConfiguration as Panel } from '../configuration'++const { request } = vi.hoisted(() => ({+ request:+ vi.fn<(url: string, init: RequestInit, options: { request: Request }) => Promise<Response>>(),+}))+vi.mock('@/service/base', () => ({ request }))++const langfuseConfig = {+ public_key: 'public-key',+ secret_key: '[__MASKED__]',+ host: 'https://cloud.langfuse.com',+}++const capabilities: TraceProviderCapabilitiesResponse = {+ provider: 'langfuse',+ agent_spans: true,+ session: true,+ native_usage: true,+ native_cost: true,+ trace_url: true,+ span_url: false,+ api_collection_enabled: true,+ export_ack: 'accepted',+}++let agentTracingEnabled = true++function mockServer(+ configured = true,+ initialStatus = { enabled: configured, tracing_provider: configured ? 'langfuse' : null },+) {+ let status = initialStatus+ let config: Record<string, unknown> | null = configured ? langfuseConfig : null+ const writes: Array<{ method: string; body: unknown }> = []+ request.mockImplementation(async (_url, _init, { request: sent }) => {+ const url = new URL(sent.url)+ if (url.pathname.endsWith('/system-features'))+ return Response.json(+ createSystemFeaturesFixture({ agent_tracing_api_collection_enabled: agentTracingEnabled }),+ )+ if (url.pathname.endsWith('/trace-capabilities')) return Response.json(capabilities)+ if (url.pathname.endsWith('/trace')) {+ if (sent.method === 'POST') {+ status = await sent.json()+ writes.push({ method: sent.method, body: status })+ return Response.json({ result: 'success' })+ }+ return Response.json(status)+ }+ if (sent.method === 'GET') {+ const providerConfig = url.searchParams.get('tracing_provider') === 'langfuse' ? config : null+ return Response.json({ tracing_config: providerConfig, has_not_configured: !providerConfig })+ }+ if (sent.method === 'DELETE') {+ config = null+ status = { ...status, enabled: false, tracing_provider: null }+ writes.push({ method: sent.method, body: null })+ return new Response(null, { status: 204 })+ }+ const body = await sent.json()+ writes.push({ method: sent.method, body })+ config = { ...body.tracing_config, secret_key: '[__MASKED__]' }+ if (body.activate)+ status = { ...status, enabled: true, tracing_provider: body.tracing_provider }+ return Response.json({ result: 'success' })+ })+ return writes+}++const requestedPaths = () =>+ request.mock.calls.map(([, , { request: sent }]) => new URL(sent.url).pathname)+const requested = (suffix: string) => requestedPaths().filter((path) => path.endsWith(suffix))++function renderPanel({+ readOnly = false,+ searchParams = '',+ mode = 'chat',+}: { readOnly?: boolean; searchParams?: string; mode?: AppMode } = {}) {+ const client = createTestQueryClient()+ const QueryWrapper = createQueryClientWrapper(client)+ const { wrapper: NuqsWrapper, onUrlUpdate } = createNuqsTestWrapper({+ searchParams,+ hasMemory: true,+ })+ const view = render(+ <Panel resource={{ kind: 'app', appId: 'app-1', mode }} readOnly={readOnly} />,+ {+ wrapper: ({ children }) => (+ <QueryWrapper>+ <NuqsWrapper>{children}</NuqsWrapper>+ </QueryWrapper>+ ),+ },+ )+ return { ...view, client, onUrlUpdate }+}++async function expandCapture(user: ReturnType<typeof userEvent.setup>) {+ await user.click(await screen.findByRole('button', { name: /app\.tracing\.captureTitle/ }))+}++async function openConfiguredPanel() {+ const user = userEvent.setup()+ await user.click(await screen.findByText('app.tracing.enabled'))+ await screen.findByText('app.tracing.tracing')+ return user+}++describe('Tracing overview panel', () => {+ beforeEach(() => {+ agentTracingEnabled = true+ })++ it.each(['workflow', 'advanced-chat'] as const)(+ 'reads and saves %s capture policy through the owning App',+ async (mode) => {+ const writes = mockServer()+ const { client } = renderPanel({ mode })+ const user = await openConfiguredPanel()+ await expandCapture(user)+ const content = screen.getByRole('switch', { name: 'app.tracing.captureContent' })+ const agent = screen.getByRole('switch', { name: 'app.tracing.captureAgent' })+ expect(content).not.toBeChecked()+ expect(agent).toBeChecked()+ expect(screen.getByRole('group', { name: 'app.tracing.captureTitle' })).toContainElement(+ content,+ )+ expect(content).toHaveAccessibleDescription('app.tracing.captureContentDescription')+ await user.click(content)+ await waitFor(() => expect(client.isMutating()).toBe(0))+ await user.click(agent)+ await waitFor(() => expect(client.isMutating()).toBe(0))+ expect(writes).toEqual([+ {+ method: 'POST',+ body: {+ enabled: true,+ tracing_provider: 'langfuse',+ capture_content: true,+ capture_agent: true,+ },+ },+ {+ method: 'POST',+ body: {+ enabled: true,+ tracing_provider: 'langfuse',+ capture_content: true,+ capture_agent: false,+ },+ },+ ])+ expect(+ client.getQueryData(+ consoleQuery.apps.byAppId.trace.get.queryKey({+ input: { params: { app_id: 'app-1' } },+ }),+ ),+ ).toMatchObject({ capture_content: true, capture_agent: false })+ expect(+ requestedPaths()+ .filter((path) => path.includes('/trace'))+ .every((path) => path.includes('/apps/app-1/')),+ ).toBe(true)+ },+ )++ it.each(['chat', 'completion', 'agent-chat'] as const)(+ 'does not expose Agent capture policy for %s apps',+ async (mode) => {+ mockServer()+ renderPanel({ mode })+ await openConfiguredPanel()+ expect(+ screen.queryByRole('switch', { name: 'app.tracing.captureContent' }),+ ).not.toBeInTheDocument()+ expect(+ screen.queryByRole('switch', { name: 'app.tracing.captureAgent' }),+ ).not.toBeInTheDocument()+ expect(requested('/trace-capabilities')).toEqual([])+ expect(requested('/features')).toEqual([])+ },+ )++ it('keeps the last-known enabled deployment settings after a system-features refresh fails', async () => {+ const writes = mockServer()+ const { client } = renderPanel({ searchParams: 'tracing=configure', mode: 'workflow' })+ const user = userEvent.setup()+ await expandCapture(user)+ expect(screen.getByRole('switch', { name: 'app.tracing.captureAgent' })).toBeChecked()++ const server = request.getMockImplementation()!+ request.mockImplementation(async (...args) => {+ if (new URL(args[2].request.url).pathname.endsWith('/system-features'))+ throw await httpErrorFromResponse(+ Response.json({ message: 'System features unavailable' }, { status: 500 }),+ )+ return server(...args)+ })+ await act(async () => {+ await client.invalidateQueries({ queryKey: consoleQuery.systemFeatures.get.queryKey() })+ })++ expect(requested('/system-features')).toHaveLength(2)+ expect(screen.getByRole('switch', { name: 'app.tracing.captureAgent' })).toBeChecked()+ expect(screen.queryByRole('note')).not.toBeInTheDocument()+ expect(writes).toEqual([])+ expect(requested('/features')).toEqual([])+ })++ it('does not report a disabled deployment when the initial system-features request fails', async () => {+ mockServer()+ const server = request.getMockImplementation()!+ request.mockImplementation(async (...args) => {+ if (new URL(args[2].request.url).pathname.endsWith('/system-features'))+ throw await httpErrorFromResponse(+ Response.json({ message: 'System features unavailable' }, { status: 500 }),+ )+ return server(...args)+ })+ renderPanel({ searchParams: 'tracing=configure', mode: 'workflow' })++ await screen.findByRole('group', { name: 'app.tracing.langfuse.title' })+ expect(screen.queryByRole('note')).not.toBeInTheDocument()+ expect(+ screen.queryByRole('button', { name: 'app.tracing.captureTitle' }),+ ).not.toBeInTheDocument()+ expect(requested('/trace-capabilities')).toEqual([])+ expect(requested('/features')).toEqual([])+ })++ it('keeps Workflow capture policy read-only without fetching provider credentials', async () => {+ const writes = mockServer()+ renderPanel({ readOnly: true, mode: 'workflow' })+ const user = await openConfiguredPanel()+ await expandCapture(user)+ const content = screen.getByRole('switch', { name: 'app.tracing.captureContent' })+ const agent = screen.getByRole('switch', { name: 'app.tracing.captureAgent' })+ await user.click(content)+ await user.click(agent)+ expect(content).not.toBeChecked()+ expect(agent).toBeChecked()+ expect(writes).toEqual([])+ expect(requested('/trace-config')).toEqual([])+ })++ it('serializes Workflow capture changes and restores the last saved policy on failure', async () => {+ const writes = mockServer()+ const server = request.getMockImplementation()!+ const saves: Array<{ complete: (fail?: boolean) => void }> = []+ request.mockImplementation(async (...args) => {+ const sent = args[2].request+ if (sent.method === 'POST' && new URL(sent.url).pathname.endsWith('/trace'))+ await new Promise<void>((resolve, reject) => {+ saves.push({+ complete: (fail) => (fail ? reject(new Error('Policy unavailable')) : resolve()),+ })+ })+ return server(...args)+ })+ const { client } = renderPanel({ mode: 'workflow' })+ const user = await openConfiguredPanel()+ await expandCapture(user)+ const content = screen.getByRole('switch', { name: 'app.tracing.captureContent' })+ const agent = screen.getByRole('switch', { name: 'app.tracing.captureAgent' })+ await user.click(content)+ await user.click(agent)+ expect(content).toBeChecked()+ expect(agent).not.toBeChecked()+ expect(saves).toHaveLength(1)+ await act(() => saves[0]!.complete())+ await waitFor(() => expect(saves).toHaveLength(2))+ expect(content).toBeChecked()+ expect(agent).not.toBeChecked()+ await act(() => saves[1]!.complete(true))+ await waitFor(() => expect(client.isMutating()).toBe(0))+ expect(content).toBeChecked()+ expect(agent).toBeChecked()+ expect(screen.getByRole('alert')).toHaveTextContent('Policy unavailable')+ expect(writes).toHaveLength(1)+ await user.click(agent)+ await waitFor(() => expect(saves).toHaveLength(3))+ await act(() => saves[2]!.complete())+ await waitFor(() => expect(client.isMutating()).toBe(0))+ expect(agent).not.toBeChecked()+ expect(screen.queryByRole('alert')).not.toBeInTheDocument()+ })++ it('retries Workflow capabilities without blocking capture policy changes', async () => {+ const writes = mockServer()+ const server = request.getMockImplementation()!+ let failCapabilities = true+ request.mockImplementation(async (...args) => {+ if (failCapabilities && new URL(args[2].request.url).pathname.endsWith('/trace-capabilities'))+ throw new Error('Capabilities unavailable')+ return server(...args)+ })+ const { client } = renderPanel({ mode: 'workflow' })+ const user = await openConfiguredPanel()+ await expandCapture(user)+ expect(await screen.findByRole('alert')).toHaveTextContent('app.tracing.capabilitiesLoadFailed')+ await user.click(screen.getByRole('switch', { name: 'app.tracing.captureContent' }))+ await waitFor(() => expect(client.isMutating()).toBe(0))+ expect(writes).toHaveLength(1)+ failCapabilities = false+ await user.click(screen.getByRole('button', { name: 'common.operation.retry' }))+ expect(+ await screen.findByRole('button', { name: /app\.tracing\.capabilities/ }),+ ).toBeInTheDocument()+ expect(screen.queryByRole('alert')).not.toBeInTheDocument()+ })++ it('keeps Workflow capture settings collapsed until they are opened', async () => {+ mockServer()+ renderPanel({ mode: 'workflow' })+ await openConfiguredPanel()+ expect(await screen.findByRole('button', { name: 'app.tracing.captureTitle' })).toHaveAttribute(+ 'aria-expanded',+ 'false',+ )+ expect(+ screen.queryByRole('switch', { name: 'app.tracing.captureContent' }),+ ).not.toBeInTheDocument()+ })++ it('requests the selected provider capabilities once the user aims at the trigger', async () => {+ mockServer()+ renderPanel({ mode: 'workflow' })+ const user = userEvent.setup()+ const trigger = await screen.findByRole('button', { name: /app\.tracing\.enabled/ })+ await waitFor(() => expect(trigger).toBeEnabled())+ expect(requested('/trace-capabilities')).toEqual([])++ await user.hover(trigger)+ await waitFor(() => expect(requested('/trace-capabilities')).toHaveLength(1))+ await user.click(trigger)++ expect(+ await within(screen.getByRole('group', { name: 'app.tracing.langfuse.title' })).findByRole(+ 'button',+ { name: /app\.tracing\.capabilities/ },+ ),+ ).toBeInTheDocument()+ expect(requested('/trace-capabilities')).toHaveLength(1)+ })++ it('does not request capabilities on hover for apps outside the Agent trace pipeline', async () => {+ mockServer()+ renderPanel()+ const trigger = await screen.findByRole('button', { name: /app\.tracing\.enabled/ })+ await waitFor(() => expect(trigger).toBeEnabled())+ await userEvent.setup().hover(trigger)+ expect(requested('/trace-capabilities')).toEqual([])+ })++ it('keeps provider capabilities collapsed behind a summary on the selected provider', async () => {+ mockServer()+ renderPanel({ mode: 'workflow' })+ const user = await openConfiguredPanel()+ const card = within(screen.getByRole('group', { name: 'app.tracing.langfuse.title' }))+ const disclosure = await card.findByRole('button', { name: /app\.tracing\.capabilities/ })+ expect(disclosure).toHaveAccessibleName(+ 'app.tracing.capabilities app.tracing.capabilitySummary.unsupported:{"count":1}',+ )+ expect(disclosure).toHaveAttribute('aria-expanded', 'false')+ expect(screen.queryByText('app.tracing.capability.span_url')).not.toBeInTheDocument()++ await user.click(disclosure)++ expect(disclosure).toHaveAttribute('aria-expanded', 'true')+ expect(card.getByText('app.tracing.capability.span_url').nextElementSibling).toHaveTextContent(+ 'app.tracing.unsupported',+ )+ expect(screen.queryByText(/app\.tracing\.agentSpansUnsupported/)).not.toBeInTheDocument()+ })++ it('warns on the selected provider card when it cannot export full Agent traces', async () => {+ mockServer()+ const server = request.getMockImplementation()!+ request.mockImplementation(async (...args) => {+ if (new URL(args[2].request.url).pathname.endsWith('/trace-capabilities'))+ return Response.json({ ...capabilities, agent_spans: false })+ return server(...args)+ })+ renderPanel({ mode: 'workflow' })+ await openConfiguredPanel()++ expect(+ await within(screen.getByRole('group', { name: 'app.tracing.langfuse.title' })).findByText(+ 'app.tracing.agentSpansUnsupported:{"provider":"app.tracing.langfuse.title"}',+ ),+ ).toBeInTheDocument()+ })++ it('replaces Agent capture settings and provider support with one note when Agent tracing is unavailable', async () => {+ agentTracingEnabled = false+ mockServer()+ renderPanel({ mode: 'workflow' })+ await openConfiguredPanel()++ expect(await screen.findByRole('note')).toHaveTextContent('app.tracing.agentTracingUnavailable')+ expect(+ screen.queryByRole('button', { name: 'app.tracing.captureTitle' }),+ ).not.toBeInTheDocument()+ expect(+ screen.queryByRole('button', { name: /app\.tracing\.capabilities/ }),+ ).not.toBeInTheDocument()+ expect(requested('/trace-capabilities')).toEqual([])+ })++ it.each([true, false])(+ 'shows deployment availability before a provider is selected (Agent tracing enabled: %s)',+ async (enabled) => {+ agentTracingEnabled = enabled+ mockServer(false)+ renderPanel({ searchParams: 'tracing=configure', mode: 'workflow' })+ expect(+ await screen.findByRole('group', { name: 'app.tracing.langfuse.title' }),+ ).toBeInTheDocument()+ if (enabled) expect(screen.queryByRole('note')).not.toBeInTheDocument()+ else expect(screen.getByRole('note')).toHaveTextContent('app.tracing.agentTracingUnavailable')+ expect(+ screen.queryByRole('button', { name: 'app.tracing.captureTitle' }),+ ).not.toBeInTheDocument()+ expect(requested('/trace-capabilities')).toEqual([])+ },+ )++ it('shows a loading placeholder instead of an unconfigured trigger before status is known', () => {+ request.mockImplementation(() => new Promise<Response>(() => {}))+ renderPanel()+ expect(screen.getByRole('status', { name: 'app.tracing.title' })).toHaveTextContent(+ 'common.loading',+ )+ expect(screen.queryByRole('button')).not.toBeInTheDocument()+ })++ it('offers retry when tracing cannot load instead of remaining in a loading state', async () => {+ const user = userEvent.setup()+ request.mockRejectedValue(new Error('Tracing unavailable'))+ renderPanel()+ const retry = await screen.findByRole('button', { name: /common.errorBoundary.tryAgain/ })+ expect(screen.queryByRole('status')).not.toBeInTheDocument()+ mockServer(false)+ await user.click(retry)+ expect(await screen.findByText('app.tracing.title')).toBeInTheDocument()+ expect(+ screen.queryByRole('button', { name: /common.errorBoundary.tryAgain/ }),+ ).not.toBeInTheDocument()+ })++ it('keeps the loading placeholder until configs are ready, then shows an enabled trigger', async () => {+ mockServer()+ const server = request.getMockImplementation()!+ const configsReady = createDeferred()+ request.mockImplementation(async (...args) => {+ if (new URL(args[2].request.url).pathname.endsWith('/trace-config'))+ await configsReady.promise+ return server(...args)+ })+ const { client } = renderPanel()+ await waitFor(() =>+ expect(+ client.getQueryData(+ consoleQuery.apps.byAppId.trace.get.queryKey({ input: { params: { app_id: 'app-1' } } }),+ ),+ ).toEqual({ enabled: true, tracing_provider: 'langfuse' }),+ )+ expect(screen.getByRole('status', { name: 'app.tracing.title' })).toBeInTheDocument()+ expect(screen.queryByRole('button')).not.toBeInTheDocument()+ await act(async () => configsReady.resolve())+ expect(await screen.findByRole('button', { name: /app\.tracing\.enabled/ })).toBeEnabled()+ expect(screen.queryByRole('status')).not.toBeInTheDocument()+ })++ it('waits for saved configs when no provider is selected instead of claiming tracing is unconfigured', async () => {+ mockServer()+ const server = request.getMockImplementation()!+ let resolveConfigs!: () => void+ const configsReady = new Promise<void>((resolve) => {+ resolveConfigs = resolve+ })+ request.mockImplementation(async (...args) => {+ if (new URL(args[2].request.url).pathname.endsWith('/trace'))+ return Response.json({ enabled: false, tracing_provider: null })+ await configsReady+ return server(...args)+ })+ const { client } = renderPanel()+ await waitFor(() =>+ expect(+ client.getQueryData(+ consoleQuery.apps.byAppId.trace.get.queryKey({ input: { params: { app_id: 'app-1' } } }),+ ),+ ).toEqual({ enabled: false, tracing_provider: null }),+ )+ expect(screen.getByRole('status', { name: 'app.tracing.title' })).toBeInTheDocument()+ expect(screen.queryByRole('button')).not.toBeInTheDocument()+ resolveConfigs()+ expect(await screen.findByRole('button', { name: /app\.tracing\.disabled/ })).toBeEnabled()+ })++ it('keeps healthy providers usable and retries only the unavailable provider', async () => {+ const writes = mockServer()+ const server = request.getMockImplementation()!+ let unavailable = true+ const retryReady = createDeferred()+ request.mockImplementation(async (...args) => {+ const url = new URL(args[2].request.url)+ if (url.searchParams.get('tracing_provider') === 'langsmith')+ return Response.json({ tracing_config: { api_key: 'key', project: 'project' } })+ if (url.searchParams.get('tracing_provider') === 'phoenix') {+ if (unavailable)+ return Response.json(+ { code: 'tracing_provider_unavailable', message: 'Unavailable' },+ { status: 400 },+ )+ await retryReady.promise+ }+ return server(...args)+ })+ const { client } = renderPanel()+ await waitFor(() => expect(client.isFetching()).toBe(0))+ const user = await openConfiguredPanel()+ const phoenix = within(screen.getByRole('group', { name: 'app.tracing.phoenix.title' }))+ expect(phoenix.queryByRole('button', { name: 'app.tracing.config' })).not.toBeInTheDocument()+ expect(+ phoenix.queryByRole('radio', { name: 'app.tracing.phoenix.title' }),+ ).not.toBeInTheDocument()+ await user.click(screen.getByRole('switch'))+ await waitFor(() => expect(screen.getByRole('switch')).not.toBeChecked())+ expect(writes).toEqual([+ {+ method: 'POST',+ body: {+ capture_agent: true,+ capture_content: false,+ enabled: false,+ tracing_provider: 'langfuse',+ },+ },+ ])+ await user.click(screen.getByRole('radio', { name: 'app.tracing.langsmith.title' }))+ await waitFor(() => expect(screen.getByRole('switch')).toBeChecked())+ expect(writes[1]).toEqual({+ method: 'POST',+ body: {+ capture_agent: true,+ capture_content: false,+ enabled: true,+ tracing_provider: 'langsmith',+ },+ })++ request.mockClear()+ unavailable = false+ await user.click(phoenix.getByRole('button', { name: 'common.errorBoundary.tryAgain' }))+ expect(phoenix.getByRole('button', { name: 'common.errorBoundary.tryAgain' })).toBeDisabled()+ expect(phoenix.queryByRole('button', { name: 'app.tracing.config' })).not.toBeInTheDocument()+ expect(screen.getByRole('switch')).not.toHaveAttribute('aria-disabled', 'true')+ await act(async () => retryReady.resolve())+ expect(await phoenix.findByRole('button', { name: 'app.tracing.config' })).toBeEnabled()+ expect(request).toHaveBeenCalledTimes(1)+ expect(+ new URL(request.mock.calls[0]![2].request.url).searchParams.get('tracing_provider'),+ ).toBe('phoenix')+ })++ it('allows disabling tracing when its active provider configuration is unavailable', async () => {+ const writes = mockServer()+ const server = request.getMockImplementation()!+ request.mockImplementation(async (...args) => {+ if (new URL(args[2].request.url).searchParams.get('tracing_provider') === 'langfuse')+ return Response.json(+ { code: 'tracing_provider_unavailable', message: 'Unavailable' },+ { status: 400 },+ )+ return server(...args)+ })+ const { client } = renderPanel()+ await waitFor(() => expect(client.isFetching()).toBe(0))+ const user = await openConfiguredPanel()+ await user.click(screen.getByRole('switch'))+ await waitFor(() => expect(screen.getByRole('switch')).not.toBeChecked())+ expect(screen.getByRole('switch')).toHaveAttribute('aria-disabled', 'true')+ await user.click(screen.getByRole('switch'))+ expect(writes).toEqual([+ {+ method: 'POST',+ body: {+ capture_agent: true,+ capture_content: false,+ enabled: false,+ tracing_provider: 'langfuse',+ },+ },+ ])+ })++ it('shows one entry and requires a provider selection when saved configs have no active provider', async () => {+ const writes = mockServer(true, { enabled: false, tracing_provider: null })+ const { client } = renderPanel()+ await waitFor(() => expect(client.isFetching()).toBe(0))+ const user = userEvent.setup()+ await user.click(screen.getByRole('button'))+ const tracingSwitch = screen.getByRole('switch', { name: 'app.tracing.tracing' })+ expect(tracingSwitch).toHaveAttribute('aria-disabled', 'true')+ expect(tracingSwitch).toHaveAccessibleDescription('app.tracing.disabledTip')+ await user.click(tracingSwitch)+ expect(writes).toHaveLength(0)+ await user.click(screen.getByRole('radio', { name: 'app.tracing.langfuse.title' }))+ await waitFor(() => expect(screen.getByRole('switch')).toBeChecked())+ expect(writes).toEqual([+ {+ method: 'POST',+ body: {+ capture_agent: true,+ capture_content: false,+ enabled: true,+ tracing_provider: 'langfuse',+ },+ },+ ])+ })++ it('hides configuration for a read-only app with no providers', async () => {+ mockServer(false)+ const { client } = renderPanel({ readOnly: true })+ await waitFor(() => expect(client.isFetching()).toBe(0))+ expect(screen.queryByText('app.tracing.title')).not.toBeInTheDocument()+ })++ it('lets a read-only user inspect configured tracing without editing it', async () => {+ mockServer()+ renderPanel({ readOnly: true })+ await openConfiguredPanel()+ expect(screen.getByRole('dialog', { name: 'app.tracing.tracing' })).toHaveAccessibleDescription(+ 'app.tracing.tracingDescription',+ )+ expect(screen.getByRole('group', { name: 'app.tracing.langfuse.title' })).toBeInTheDocument()+ expect(screen.getByRole('switch')).toHaveAttribute('aria-readonly', 'true')+ expect(screen.getByRole('switch')).toHaveAccessibleDescription('app.tracing.readOnly')+ expect(screen.queryByText('app.tracing.config')).not.toBeInTheDocument()+ })++ it('opens configuration without selecting the provider and supports keyboard selection', async () => {+ const writes = mockServer(true, { enabled: true, tracing_provider: 'langsmith' })+ renderPanel()+ const user = await openConfiguredPanel()+ const provider = within(screen.getByRole('group', { name: 'app.tracing.langfuse.title' }))+ await user.click(provider.getByRole('button', { name: 'app.tracing.config' }))+ await user.click(screen.getByRole('button', { name: 'common.operation.close' }))+ await waitFor(() =>+ expect(provider.getByRole('button', { name: 'app.tracing.config' })).toHaveFocus(),+ )+ expect(writes).toEqual([])++ await user.tab({ shift: true })+ expect(provider.getByRole('radio', { name: 'app.tracing.langfuse.title' })).toHaveFocus()+ await user.keyboard(' ')+ await waitFor(() =>+ expect(writes).toEqual([+ {+ method: 'POST',+ body: {+ capture_agent: true,+ capture_content: false,+ enabled: true,+ tracing_provider: 'langfuse',+ },+ },+ ]),+ )+ })++ it.each([true, false])(+ 'names the configured entry with its purpose, provider, and enabled=%s status',+ async (enabled) => {+ mockServer(true, { enabled, tracing_provider: 'langfuse' })+ renderPanel()+ const trigger = await screen.findByRole('button', {+ name: `app.tracing.config · app.tracing.title · app.tracing.langfuse.title · app.tracing.${enabled ? 'enabled' : 'disabled'}`,+ })+ expect(+ within(trigger).getByText(`app.tracing.${enabled ? 'enabled' : 'disabled'}`),+ ).toBeVisible()+ },+ )++ it('selects configured providers with arrow keys without turning selection off', async () => {+ const writes = mockServer()+ const original = request.getMockImplementation()!+ request.mockImplementation((...args) => {+ const sent = args[2].request+ if (+ sent.method === 'GET' &&+ new URL(sent.url).searchParams.get('tracing_provider') === 'langsmith'+ )+ return Promise.resolve(+ Response.json({+ has_not_configured: false,+ tracing_config: {+ api_key: 'key',+ project: 'project',+ endpoint: 'https://api.smith.langchain.com',+ },+ }),+ )+ return original(...args)+ })+ const { client } = renderPanel()+ const user = await openConfiguredPanel()+ const group = screen.getByRole('radiogroup', {+ name: 'app.tracing.configProviderTitle.configured',+ })+ const langfuse = within(group).getByRole('radio', { name: 'app.tracing.langfuse.title' })+ const langsmith = within(group).getByRole('radio', { name: 'app.tracing.langsmith.title' })+ expect(langfuse).toBeChecked()+ langfuse.focus()+ await user.keyboard('{ArrowRight}')+ await waitFor(() => expect(client.isMutating()).toBe(0))+ expect(langsmith).toBeChecked()+ expect(langsmith).toHaveFocus()+ expect(langfuse).not.toBeChecked()+ await user.keyboard(' ')+ expect(langsmith).toBeChecked()+ expect(writes).toHaveLength(1)+ expect(writes[0]?.body).toMatchObject({ tracing_provider: 'langsmith' })+ await user.tab()+ expect(+ within(screen.getByRole('group', { name: 'app.tracing.langsmith.title' })).getByRole(+ 'button',+ { name: 'app.tracing.config' },+ ),+ ).toHaveFocus()+ })++ it('keeps the provider list open and discards the cancelled form draft', async () => {+ mockServer(false)+ renderPanel()+ const user = userEvent.setup()+ const trigger = await screen.findByRole('button', { name: 'app.tracing.title' })+ await waitFor(() => expect(trigger).toBeEnabled())+ await user.click(trigger)+ const provider = within(screen.getByRole('group', { name: 'app.tracing.langfuse.title' }))+ await user.click(provider.getByRole('button', { name: 'app.tracing.config' }))+ await user.type(screen.getByRole('textbox', { name: 'Host' }), 'https://draft.langfuse.com')+ await user.click(screen.getByRole('button', { name: 'common.operation.close' }))+ await waitFor(() =>+ expect(provider.getByRole('button', { name: 'app.tracing.config' })).toHaveFocus(),+ )+ expect(screen.getByRole('dialog', { name: 'app.tracing.tracing' })).toBeInTheDocument()+ await user.click(provider.getByRole('button', { name: 'app.tracing.config' }))+ expect(screen.getByRole('textbox', { name: 'Host' })).toHaveValue('')+ })++ it('saves and enables a new provider in one request', async () => {+ const writes = mockServer(false)+ renderPanel()+ const user = userEvent.setup()+ const trigger = await screen.findByRole('button', { name: 'app.tracing.title' })+ await waitFor(() => expect(trigger).toBeEnabled())+ await user.click(trigger)+ await user.click(screen.getAllByText('app.tracing.config')[0]!)+ await user.type(+ screen.getByRole('textbox', { name: 'app.tracing.configProvider.publicKey' }),+ 'public-key',+ )+ await user.type(+ screen.getByRole('textbox', { name: 'app.tracing.configProvider.secretKey' }),+ 'secret-key',+ )+ await user.type(screen.getByRole('textbox', { name: 'Host' }), 'https://cloud.langfuse.com')+ await user.click(screen.getByRole('button', { name: 'common.operation.saveAndEnable' }))+ await waitFor(() =>+ expect(writes).toEqual([+ {+ method: 'POST',+ body: {+ tracing_provider: 'langfuse',+ tracing_config: { ...langfuseConfig, secret_key: 'secret-key' },+ activate: true,+ },+ },+ ]),+ )+ await waitFor(() =>+ expect(+ screen.queryByRole('dialog', { name: /app.tracing.configProvider.title/ }),+ ).not.toBeInTheDocument(),+ )+ expect(screen.getByRole('switch')).toBeChecked()+ await waitFor(() =>+ expect(+ within(screen.getByRole('group', { name: 'app.tracing.langfuse.title' })).getByRole(+ 'button',+ { name: 'app.tracing.config' },+ ),+ ).toHaveFocus(),+ )+ })++ it('reopens an edited provider from the refreshed masked config', async () => {+ const writes = mockServer()+ const { client } = renderPanel()+ const user = await openConfiguredPanel()+ await user.click(screen.getAllByText('app.tracing.config')[0]!)+ const secret = screen.getByRole('textbox', { name: 'app.tracing.configProvider.secretKey' })+ await user.clear(secret)+ await user.type(secret, 'new-secret')+ await user.click(screen.getByRole('button', { name: 'common.operation.save' }))+ await waitFor(() =>+ expect(+ screen.queryByRole('button', { name: 'common.operation.save' }),+ ).not.toBeInTheDocument(),+ )+ await waitFor(() => expect(client.isFetching()).toBe(0))+ await user.click(screen.getAllByText('app.tracing.config')[0]!)+ expect(+ screen.getByRole('textbox', { name: 'app.tracing.configProvider.secretKey' }),+ ).toHaveValue('[__MASKED__]')+ expect(writes).toEqual([+ {+ method: 'PATCH',+ body: {+ tracing_provider: 'langfuse',+ tracing_config: { ...langfuseConfig, secret_key: 'new-secret' },+ },+ },+ ])+ })++ it('deletes the selected provider and refreshes disabled tracing in one request', async () => {+ const writes = mockServer()+ renderPanel()+ const user = await openConfiguredPanel()+ await user.click(screen.getAllByText('app.tracing.config')[0]!)+ await user.click(screen.getByRole('button', { name: 'common.operation.remove' }))+ await user.click(+ within(screen.getByRole('alertdialog')).getByRole('button', {+ name: 'common.operation.remove',+ }),+ )+ await waitFor(() => expect(writes).toEqual([{ method: 'DELETE', body: null }]))+ expect(await screen.findByText('app.tracing.title')).toBeInTheDocument()+ await waitFor(() =>+ expect(+ within(screen.getByRole('group', { name: 'app.tracing.langfuse.title' })).getByRole(+ 'button',+ { name: 'app.tracing.config' },+ ),+ ).toHaveFocus(),+ )+ })++ it('keeps the provider form open while a save is in flight, then closes it on success', async () => {+ mockServer(false)+ const server = request.getMockImplementation()!+ let releaseSave!: () => void+ const saveHeld = new Promise<void>((resolve) => {+ releaseSave = resolve+ })+ request.mockImplementation(async (...args) => {+ const sent = args[2].request+ if (sent.method === 'POST' && new URL(sent.url).pathname.endsWith('/trace-config'))+ await saveHeld+ return server(...args)+ })+ renderPanel()+ const user = userEvent.setup()+ const trigger = await screen.findByRole('button', { name: 'app.tracing.title' })+ await waitFor(() => expect(trigger).toBeEnabled())+ await user.click(trigger)+ await user.click(screen.getAllByText('app.tracing.config')[0]!)+ await user.type(+ screen.getByRole('textbox', { name: 'app.tracing.configProvider.publicKey' }),+ 'public-key',+ )+ await user.type(+ screen.getByRole('textbox', { name: 'app.tracing.configProvider.secretKey' }),+ 'secret-key',+ )+ await user.type(screen.getByRole('textbox', { name: 'Host' }), 'https://cloud.langfuse.com')+ await user.click(screen.getByRole('button', { name: 'common.operation.saveAndEnable' }))++ const form = screen.getByRole('dialog', { name: /app.tracing.configProvider.title/ })+ await waitFor(() =>+ expect(within(form).getByRole('button', { name: 'common.operation.close' })).toBeDisabled(),+ )+ expect(within(form).getByRole('button', { name: 'common.operation.cancel' })).toBeDisabled()+ await user.keyboard('{Escape}')+ expect(form).toBeInTheDocument()++ releaseSave()+ await waitFor(() => expect(form).not.toBeInTheDocument())+ })++ it('keeps the removal confirmation open until the deletion settles', async () => {+ mockServer()+ const server = request.getMockImplementation()!+ let releaseDelete!: () => void+ const deleteHeld = new Promise<void>((resolve) => {+ releaseDelete = resolve+ })+ request.mockImplementation(async (...args) => {+ if (args[2].request.method === 'DELETE') await deleteHeld+ return server(...args)+ })+ renderPanel()+ const user = await openConfiguredPanel()+ await user.click(screen.getAllByText('app.tracing.config')[0]!)+ await user.click(screen.getByRole('button', { name: 'common.operation.remove' }))+ const confirmation = screen.getByRole('alertdialog')+ await user.click(within(confirmation).getByRole('button', { name: 'common.operation.remove' }))++ await waitFor(() =>+ expect(+ within(confirmation).getByRole('button', { name: 'common.operation.cancel' }),+ ).toBeDisabled(),+ )+ await user.keyboard('{Escape}')+ expect(confirmation).toBeInTheDocument()++ releaseDelete()+ await waitFor(() => expect(confirmation).not.toBeInTheDocument())+ })++ it('opens from the tracing URL destination once ready and clears it on close', async () => {+ mockServer()+ const { onUrlUpdate } = renderPanel({ searchParams: '?tracing=configure' })+ expect(await screen.findByText('app.tracing.tracing')).toBeInTheDocument()++ await userEvent.setup().keyboard('{Escape}')++ await waitFor(() => expect(screen.queryByText('app.tracing.tracing')).not.toBeInTheDocument())+ expect(onUrlUpdate).toHaveBeenLastCalledWith(expect.objectContaining({ queryString: '' }))+ expect(screen.getByRole('button', { name: /app\.tracing\.enabled/ })).toHaveFocus()+ })++ it('records the open configuration in the URL when opened from its trigger', async () => {+ mockServer()+ const { onUrlUpdate } = renderPanel()+ await openConfiguredPanel()+ expect(onUrlUpdate).toHaveBeenLastCalledWith(+ expect.objectContaining({ queryString: '?tracing=configure' }),+ )+ })++ it('does not carry a pending policy change or its failure into another app', async () => {+ mockServer()+ const server = request.getMockImplementation()!+ const save = createDeferred<Response>()+ request.mockImplementation(async (...args) => {+ if (args[2].request.method === 'POST') return save.promise+ return server(...args)+ })+ const { rerender } = renderPanel()+ const user = await openConfiguredPanel()+ await user.click(screen.getByRole('switch', { name: 'app.tracing.tracing' }))+ expect(screen.getByRole('switch', { name: 'app.tracing.tracing' })).not.toBeChecked()+ await waitFor(() =>+ expect(request.mock.calls.some(([, , { request: sent }]) => sent.method === 'POST')).toBe(+ true,+ ),+ )++ rerender(<Panel resource={{ kind: 'app', appId: 'app-2', mode: 'chat' }} readOnly={false} />)+ expect(await screen.findByRole('switch', { name: 'app.tracing.tracing' })).toBeChecked()+ await act(async () => {+ save.reject(+ await httpErrorFromResponse(+ Response.json({ code: 'save_failed', message: 'App 1 save failed' }, { status: 500 }),+ ),+ )+ })+ expect(screen.queryByRole('alert')).not.toBeInTheDocument()+ expect(screen.getByRole('switch', { name: 'app.tracing.tracing' })).toBeChecked()++ rerender(<Panel resource={{ kind: 'app', appId: 'app-1', mode: 'chat' }} readOnly={false} />)+ expect(await screen.findByRole('alert')).toHaveTextContent('App 1 save failed')+ expect(screen.getByRole('switch', { name: 'app.tracing.tracing' })).toBeChecked()+ expect(+ request.mock.calls+ .filter(([, , { request: sent }]) => sent.method === 'POST')+ .map(([, , { request: sent }]) => new URL(sent.url).pathname),+ ).toEqual([expect.stringMatching(/\/apps\/app-1\/trace$/)])+ })++ it('refreshes a concurrently removed provider after a selection conflict and lets the user retry', async () => {+ const writes = mockServer()+ const server = request.getMockImplementation()!+ let removed = false+ request.mockImplementation(async (...args) => {+ const sent = args[2].request+ const url = new URL(sent.url)+ if (sent.method === 'POST' && url.pathname.endsWith('/trace') && !removed) {+ removed = true+ throw await httpErrorFromResponse(+ Response.json(+ {+ code: 'tracing_config_conflict',+ message: 'Provider was removed. Choose another provider.',+ },+ { status: 409 },+ ),+ )+ }+ if (+ sent.method === 'GET' &&+ url.pathname.endsWith('/trace-config') &&+ url.searchParams.get('tracing_provider') === 'langsmith'+ ) {+ return Response.json({+ has_not_configured: removed,+ tracing_config: removed ? null : { api_key: '[__MASKED__]', project: 'project' },+ })+ }+ return server(...args)+ })+ renderPanel()+ const user = await openConfiguredPanel()+ await user.click(screen.getByRole('radio', { name: 'app.tracing.langsmith.title' }))+ expect(await screen.findByRole('alert')).toHaveTextContent('Provider was removed')+ const provider = within(screen.getByRole('group', { name: 'app.tracing.langsmith.title' }))+ await waitFor(() =>+ expect(+ provider.queryByRole('button', {+ name: 'app.tracing.langsmith.title',+ }),+ ).not.toBeInTheDocument(),+ )+ expect(provider.getByRole('button', { name: 'app.tracing.config' })).toBeEnabled()+ expect(screen.getByRole('switch', { name: 'app.tracing.tracing' })).toBeChecked()++ await user.click(screen.getByRole('switch', { name: 'app.tracing.tracing' }))+ await waitFor(() => expect(screen.queryByRole('alert')).not.toBeInTheDocument())+ expect(screen.getByRole('switch', { name: 'app.tracing.tracing' })).not.toBeChecked()+ expect(writes).toEqual([+ {+ method: 'POST',+ body: {+ enabled: false,+ tracing_provider: 'langfuse',+ capture_content: false,+ capture_agent: true,+ },+ },+ ])+ })++ it('keeps an open draft across config refreshes and starts a new session for another app', async () => {+ mockServer()+ const { client, rerender } = renderPanel()+ const user = await openConfiguredPanel()+ await user.click(screen.getAllByText('app.tracing.config')[0]!)+ const host = screen.getByRole('textbox', { name: 'Host' })+ await user.clear(host)+ await user.type(host, 'https://draft.langfuse.com')+ act(() =>+ client.setQueryData(+ consoleQuery.apps.byAppId.traceConfig.get.queryKey({+ input: { params: { app_id: 'app-1' }, query: { tracing_provider: 'langfuse' } },+ }),+ { tracing_config: { ...langfuseConfig, host: 'https://server.langfuse.com' } },+ ),+ )+ expect(host).toHaveValue('https://draft.langfuse.com')+ rerender(<Panel resource={{ kind: 'app', appId: 'app-2', mode: 'chat' }} readOnly={false} />)+ await waitFor(() =>+ expect(screen.queryByRole('textbox', { name: 'Host' })).not.toBeInTheDocument(),+ )+ // The URL destination still asks for configuration, so the new app's popover reopens once ready.+ await user.click(screen.getAllByText('app.tracing.config')[0]!)+ expect(screen.getByRole('textbox', { name: 'Host' })).toHaveValue(langfuseConfig.host)+ })+})diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/__tests__/provider-config-modal.spec.tsx b/web/app/components/app/tracing/__tests__/provider-config-modal.spec.tsxsimilarity index 62%rename from web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/__tests__/provider-config-modal.spec.tsxrename to web/app/components/app/tracing/__tests__/provider-config-modal.spec.tsxindex 2232e43a1af..41b7de3449b 100644--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/__tests__/provider-config-modal.spec.tsx+++ b/web/app/components/app/tracing/__tests__/provider-config-modal.spec.tsx@@ -1,15 +1,15 @@import type { TraceConfigPayload } from '@dify/contracts/api/console/apps/types.gen'+import type { ConfigurableTracingProvider } from '../providers'+import type { TracingResource } from '../resource'import { Dialog, DialogContent } from '@langgenius/dify-ui/dialog'-import { render, screen, waitFor } from '@testing-library/react'+import { render, screen, waitFor, within } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { createRef } from 'react'-import { toast } from '@/app/notifications'import { httpErrorFromResponse } from '@/service/http-error'import { createQueryClientWrapper } from '@/test/console/query-client'import { createTestQueryClient } from '@/test/query-client'-import ConfigBtn from '../config-button'-import ProviderConfigModal from '../provider-config-modal'-import { TracingProvider } from '../type'+import { ProviderConfigModal } from '../provider-config-modal'+import { configurableProviders } from '../providers'const { request } = vi.hoisted(() => ({request:@@ -17,230 +17,200 @@ const { request } = vi.hoisted(() => ({}))vi.mock('@/service/base', () => ({ request }))-const expectRequest = async (method: string, body?: unknown) => {+const expectRequest = async (+ method: string,+ body?: unknown,+ path = '/apps/app-id/trace-config',+) => {expect(request).toHaveBeenCalledOnce()const sent = request.mock.calls[0]![2].requestexpect(sent.method).toBe(method)- expect(new URL(sent.url).pathname).toMatch(/\/apps\/app-id\/trace-config$/)+ expect(new URL(sent.url).pathname).toBe(`/console/api${path}`)if (body) expect(await sent.clone().json()).toEqual(body)- else expect(new URL(sent.url).searchParams.get('tracing_provider')).toBe(TracingProvider.langfuse)+ else expect(new URL(sent.url).searchParams.get('tracing_provider')).toBe('langfuse')}-vi.mock('@/app/notifications', () => ({- toast: vi.fn(),-}))-const validConfigs = {- [TracingProvider.arize]: {+ arize: {api_key: 'arize-api-key',space_id: 'space-id',project: 'arize-project',endpoint: 'https://otlp.arize.com',},- [TracingProvider.phoenix]: {+ phoenix: {api_key: 'phoenix-api-key',project: 'phoenix-project',endpoint: 'https://app.phoenix.arize.com',},- [TracingProvider.langSmith]: {+ langsmith: {api_key: 'langsmith-api-key',project: 'langsmith-project',endpoint: 'https://api.smith.langchain.com',},- [TracingProvider.langfuse]: {+ langfuse: {public_key: 'public-key',secret_key: 'secret-key',host: 'https://cloud.langfuse.com',},- [TracingProvider.opik]: {+ opik: {api_key: 'opik-api-key',project: 'opik-project',workspace: 'default',url: 'https://www.comet.com/opik/api/',},- [TracingProvider.weave]: {+ weave: {api_key: 'weave-api-key',entity: 'wandb-entity',project: 'weave-project',endpoint: 'https://trace.wandb.ai/',host: 'https://api.wandb.ai',},- [TracingProvider.aliyun]: {+ aliyun: {app_name: 'aliyun-app',license_key: 'license-key',endpoint: 'https://tracing.arms.aliyuncs.com',},- [TracingProvider.mlflow]: {+ mlflow: {tracking_uri: 'http://localhost:5000',experiment_id: '123',username: 'mlflow-user',password: 'mlflow-password',},- [TracingProvider.databricks]: {+ databricks: {experiment_id: '123',host: 'https://workspace.cloud.databricks.com',client_id: 'client-id',client_secret: 'client-secret',personal_access_token: 'personal-access-token',},- [TracingProvider.tencent]: {+ tencent: {token: 'tencent-token',- endpoint: 'https://your-region.cls.tencentcs.com',- service_name: 'dify_app',+ endpoint: 'https://ap-guangzhou.apm.tencentcs.com:4320',+ service_name: 'dify-app',},-} satisfies Record<TracingProvider, TraceConfigPayload['tracing_config']>+} satisfies Record<ConfigurableTracingProvider, TraceConfigPayload['tracing_config']>const invalidConfigCases: Array<{- provider: TracingProvider+ provider: ConfigurableTracingProviderpayload: TraceConfigPayload['tracing_config']missingField: string}> = [{- provider: TracingProvider.arize,- payload: { ...validConfigs[TracingProvider.arize], api_key: '' },+ provider: 'arize',+ payload: { ...validConfigs.arize, api_key: '' },missingField: 'API Key',},{- provider: TracingProvider.arize,- payload: { ...validConfigs[TracingProvider.arize], space_id: '' },+ provider: 'arize',+ payload: { ...validConfigs.arize, space_id: '' },missingField: 'Space ID',},{- provider: TracingProvider.arize,- payload: { ...validConfigs[TracingProvider.arize], project: '' },+ provider: 'arize',+ payload: { ...validConfigs.arize, project: '' },missingField: 'app.tracing.configProvider.project',},{- provider: TracingProvider.phoenix,- payload: { ...validConfigs[TracingProvider.phoenix], api_key: '' },- missingField: 'API Key',- },- {- provider: TracingProvider.phoenix,- payload: { ...validConfigs[TracingProvider.phoenix], project: '' },+ provider: 'phoenix',+ payload: { ...validConfigs.phoenix, project: '' },missingField: 'app.tracing.configProvider.project',},{- provider: TracingProvider.langSmith,- payload: { ...validConfigs[TracingProvider.langSmith], api_key: '' },+ provider: 'langsmith',+ payload: { ...validConfigs.langsmith, api_key: '' },missingField: 'API Key',},{- provider: TracingProvider.langSmith,- payload: { ...validConfigs[TracingProvider.langSmith], project: '' },+ provider: 'langsmith',+ payload: { ...validConfigs.langsmith, project: '' },missingField: 'app.tracing.configProvider.project',},{- provider: TracingProvider.langfuse,- payload: { ...validConfigs[TracingProvider.langfuse], secret_key: '' },+ provider: 'langfuse',+ payload: { ...validConfigs.langfuse, secret_key: '' },missingField: 'app.tracing.configProvider.secretKey',},{- provider: TracingProvider.langfuse,- payload: { ...validConfigs[TracingProvider.langfuse], public_key: '' },+ provider: 'langfuse',+ payload: { ...validConfigs.langfuse, public_key: '' },missingField: 'app.tracing.configProvider.publicKey',},{- provider: TracingProvider.langfuse,- payload: { ...validConfigs[TracingProvider.langfuse], host: '' },+ provider: 'langfuse',+ payload: { ...validConfigs.langfuse, host: '' },missingField: 'Host',},{- provider: TracingProvider.weave,- payload: { ...validConfigs[TracingProvider.weave], api_key: '' },+ provider: 'weave',+ payload: { ...validConfigs.weave, api_key: '' },missingField: 'API Key',},{- provider: TracingProvider.weave,- payload: { ...validConfigs[TracingProvider.weave], project: '' },+ provider: 'weave',+ payload: { ...validConfigs.weave, project: '' },missingField: 'app.tracing.configProvider.project',},{- provider: TracingProvider.aliyun,- payload: { ...validConfigs[TracingProvider.aliyun], app_name: '' },+ provider: 'aliyun',+ payload: { ...validConfigs.aliyun, app_name: '' },missingField: 'App Name',},{- provider: TracingProvider.aliyun,- payload: { ...validConfigs[TracingProvider.aliyun], license_key: '' },+ provider: 'aliyun',+ payload: { ...validConfigs.aliyun, license_key: '' },missingField: 'License Key',},{- provider: TracingProvider.aliyun,- payload: { ...validConfigs[TracingProvider.aliyun], endpoint: '' },+ provider: 'aliyun',+ payload: { ...validConfigs.aliyun, endpoint: '' },missingField: 'Endpoint',},{- provider: TracingProvider.mlflow,- payload: { ...validConfigs[TracingProvider.mlflow], tracking_uri: '' },+ provider: 'mlflow',+ payload: { ...validConfigs.mlflow, tracking_uri: '' },missingField: 'app.tracing.configProvider.trackingUri',},{- provider: TracingProvider.databricks,- payload: { ...validConfigs[TracingProvider.databricks], experiment_id: '' },+ provider: 'databricks',+ payload: { ...validConfigs.databricks, experiment_id: '' },missingField: 'app.tracing.configProvider.experimentId',},{- provider: TracingProvider.databricks,- payload: { ...validConfigs[TracingProvider.databricks], host: '' },+ provider: 'databricks',+ payload: { ...validConfigs.databricks, host: '' },missingField: 'app.tracing.configProvider.databricksHost',},{- provider: TracingProvider.tencent,- payload: { ...validConfigs[TracingProvider.tencent], token: '' },+ provider: 'tencent',+ payload: { ...validConfigs.tencent, token: '' },missingField: 'Token',},{- provider: TracingProvider.tencent,- payload: { ...validConfigs[TracingProvider.tencent], endpoint: '' },+ provider: 'tencent',+ payload: { ...validConfigs.tencent, endpoint: '' },missingField: 'Endpoint',},{- provider: TracingProvider.tencent,- payload: { ...validConfigs[TracingProvider.tencent], service_name: '' },+ provider: 'tencent',+ payload: { ...validConfigs.tencent, service_name: '' },missingField: 'Service Name',},]-const renderConfigButton = () => {- return render(- <ConfigBtn- appId="app-id"- readOnly={false}- hasConfigured={false}- enabled={false}- onStatusChange={vi.fn()}- chosenProvider={null}- onChooseProvider={vi.fn()}- arizeConfig={null}- phoenixConfig={null}- langSmithConfig={null}- langFuseConfig={null}- opikConfig={null}- weaveConfig={null}- aliyunConfig={null}- mlflowConfig={null}- databricksConfig={null}- tencentConfig={null}- onConfigRemoved={vi.fn()}- >- Open tracing- </ConfigBtn>,- { wrapper: createQueryClientWrapper(createTestQueryClient()) },- )-}-const renderProviderConfigModal = ({- type = TracingProvider.langfuse,+ type = 'langfuse',payload,+ inUse = false,+ resource = { kind: 'app', appId: 'app-id', mode: 'chat' },}: {- type?: TracingProvider+ type?: ConfigurableTracingProviderpayload?: TraceConfigPayload['tracing_config'] | null+ inUse?: boolean+ resource?: TracingResource} = {}) => {const callbacks = {onCancel: vi.fn(),onSaved: vi.fn(),- onChosen: vi.fn(),onRemoved: vi.fn(),}@@ -255,12 +225,12 @@ const renderProviderConfigModal = ({><DialogContent initialFocus={firstInputRef}><ProviderConfigModal- appId="app-id"+ resource={resource}type={type}payload={payload}+ inUse={inUse}firstInputRef={firstInputRef}onSaved={callbacks.onSaved}- onChosen={callbacks.onChosen}onRemoved={callbacks.onRemoved}/></DialogContent>@@ -273,7 +243,6 @@ const renderProviderConfigModal = ({describe('ProviderConfigModal', () => {beforeEach(() => {- vi.clearAllMocks()request.mockImplementation(async (_url, _init, { request: sent }) =>sent.method === 'DELETE'? new Response(null, { status: 204 })@@ -281,46 +250,31 @@ describe('ProviderConfigModal', () => {)})- describe('Nested Overlay Behavior', () => {- it('keeps the provider list open and starts a fresh draft after closing the dialog', async () => {+ describe('Saving', () => {+ it('creates an anonymous Phoenix destination without a key', async () => {const user = userEvent.setup()- renderConfigButton()-- await user.click(screen.getByRole('button', { name: 'Open tracing' }))- await waitFor(() => {- expect(screen.getByText('app.tracing.tracing')).toBeInTheDocument()- })-- const configActions = screen.getAllByText('app.tracing.config')- await user.click(configActions[0]!)- await waitFor(() => {- expect(- screen.getByText('app.tracing.configProvider.titleapp.tracing.langfuse.title'),- ).toBeInTheDocument()- })- expect(screen.getByRole('dialog')).toBeInTheDocument()-- const host = screen.getByRole('textbox', { name: 'Host' })- await user.clear(host)- await user.type(host, 'https://draft.langfuse.com')- await user.click(screen.getByRole('button', { name: 'common.operation.close' }))- await waitFor(() =>- expect(- screen.queryByRole('button', { name: 'common.operation.close' }),- ).not.toBeInTheDocument(),+ const callbacks = renderProviderConfigModal({ type: 'phoenix' })+ await user.type(+ screen.getByRole('textbox', { name: 'app.tracing.configProvider.project' }),+ 'local-project',)- expect(screen.getByText('app.tracing.tracing')).toBeInTheDocument()- const configButton = screen.getAllByRole('button', { name: 'app.tracing.config' })[0]!- await waitFor(() => expect(configButton).toHaveFocus())- await user.click(configButton)- expect(screen.getByRole('textbox', { name: 'Host' })).toHaveValue('')+ await user.type(screen.getByRole('textbox', { name: 'Endpoint' }), 'http://localhost:6006')+ await user.click(screen.getByRole('button', { name: 'common.operation.saveAndEnable' }))+ await waitFor(() => expect(callbacks.onSaved).toHaveBeenCalledOnce())+ await expectRequest('POST', {+ tracing_provider: 'phoenix',+ activate: true,+ tracing_config: {+ api_key: '',+ project: 'local-project',+ endpoint: 'http://localhost:6006',+ },+ })})- })- describe('Saving', () => {it('submits a new config with Enter and chooses the provider', async () => {const user = userEvent.setup()- const callbacks = renderProviderConfigModal({ type: TracingProvider.langfuse })+ const callbacks = renderProviderConfigModal({ type: 'langfuse' })await user.type(screen.getByRole('textbox', { name: 'app.tracing.configProvider.secretKey' }),@@ -335,14 +289,13 @@ describe('ProviderConfigModal', () => {await waitFor(() => expect(callbacks.onSaved).toHaveBeenCalledOnce())await expectRequest('POST', {- tracing_provider: TracingProvider.langfuse,- tracing_config: validConfigs[TracingProvider.langfuse],+ tracing_provider: 'langfuse',+ tracing_config: validConfigs.langfuse,+ activate: true,})- expect(callbacks.onChosen).toHaveBeenCalledWith(TracingProvider.langfuse)- expect(toast).not.toHaveBeenCalled()})- it.each(Object.values(TracingProvider))(+ it.each(configurableProviders)('should update valid %s config in edit mode',async (provider) => {const user = userEvent.setup()@@ -351,6 +304,26 @@ describe('ProviderConfigModal', () => {payload: validConfigs[provider],})+ const credentialLabels = {+ arize: ['API Key'],+ phoenix: ['API Key'],+ langsmith: ['API Key'],+ langfuse: ['app.tracing.configProvider.secretKey'],+ opik: ['API Key'],+ weave: ['API Key'],+ aliyun: ['License Key'],+ mlflow: ['app.tracing.configProvider.password'],+ databricks: [+ 'app.tracing.configProvider.clientSecret',+ 'app.tracing.configProvider.personalAccessToken',+ ],+ tencent: ['Token'],+ } satisfies Record<ConfigurableTracingProvider, string[]>+ for (const label of credentialLabels[provider]) {+ const credential = screen.getByRole('textbox', { name: label })+ expect(credential).toHaveAttribute('autocomplete', 'off')+ }+const edits = {arize: ['Space ID', 'space_id', 'new-space'],phoenix: ['app.tracing.configProvider.project', 'project', 'new-project'],@@ -362,7 +335,7 @@ describe('ProviderConfigModal', () => {mlflow: ['app.tracing.configProvider.experimentId', 'experiment_id', '456'],databricks: ['app.tracing.configProvider.experimentId', 'experiment_id', '456'],tencent: ['Service Name', 'service_name', 'new-service'],- } satisfies Record<TracingProvider, [string, string, string]>+ } satisfies Record<ConfigurableTracingProvider, [string, string, string]>const [label, key, value] = edits[provider]const input = screen.getByRole('textbox', { name: label })await user.clear(input)@@ -374,14 +347,14 @@ describe('ProviderConfigModal', () => {tracing_provider: provider,tracing_config: { ...validConfigs[provider], [key]: value },})- expect(callbacks.onChosen).not.toHaveBeenCalled()+ expect(request).toHaveBeenCalledOnce()},)it.each([- [TracingProvider.langfuse, 'host', 'HTTPS://cloud.langfuse.com'],- [TracingProvider.langSmith, 'endpoint', 'HTTPS://api.smith.langchain.com'],- [TracingProvider.opik, 'url', 'HTTPS://www.comet.com/opik/api/'],+ ['langfuse', 'host', 'HTTPS://cloud.langfuse.com'],+ ['langsmith', 'endpoint', 'HTTPS://api.smith.langchain.com'],+ ['opik', 'url', 'HTTPS://www.comet.com/opik/api/'],] as const)('accepts case-insensitive URL schemes for %s', async (provider, key, value) => {const user = userEvent.setup()const payload = { ...validConfigs[provider], [key]: value }@@ -395,8 +368,8 @@ describe('ProviderConfigModal', () => {it('displays nullable provider fields as empty without changing their submitted values', async () => {const user = userEvent.setup()- const payload = { ...validConfigs[TracingProvider.mlflow], username: null }- const callbacks = renderProviderConfigModal({ type: TracingProvider.mlflow, payload })+ const payload = { ...validConfigs.mlflow, username: null }+ const callbacks = renderProviderConfigModal({ type: 'mlflow', payload })expect(screen.getByRole('textbox', { name: 'app.tracing.configProvider.username' }),@@ -405,7 +378,7 @@ describe('ProviderConfigModal', () => {await waitFor(() => expect(callbacks.onSaved).toHaveBeenCalledOnce())await expectRequest('PATCH', {- tracing_provider: TracingProvider.mlflow,+ tracing_provider: 'mlflow',tracing_config: payload,})})@@ -423,7 +396,7 @@ describe('ProviderConfigModal', () => {)const logError = vi.spyOn(console, 'error').mockImplementation(() => {})const callbacks = renderProviderConfigModal({- payload: validConfigs[TracingProvider.langfuse],+ payload: validConfigs.langfuse,})const host = screen.getByRole('textbox', { name: 'Host' })await user.clear(host)@@ -445,9 +418,8 @@ describe('ProviderConfigModal', () => {expect(host).toHaveValue('https://draft.langfuse.com')expect(screen.getByRole('alert')).toHaveTextContent('Config rejected')expect(request.mock.calls[0]![2]).toMatchObject({ silent: true })- expect(toast).not.toHaveBeenCalled()expect(callbacks.onSaved).not.toHaveBeenCalled()- expect(callbacks.onChosen).not.toHaveBeenCalled()+ expect(request).toHaveBeenCalledOnce()await user.click(save)await waitFor(() => expect(callbacks.onSaved).toHaveBeenCalledOnce())@@ -459,19 +431,14 @@ describe('ProviderConfigModal', () => {})it.each([- [TracingProvider.langfuse, 'host', 'Host', 'ftp://cloud.langfuse.com'],- [TracingProvider.langSmith, 'endpoint', 'Endpoint', 'http://api.smith.langchain.com'],- [TracingProvider.weave, 'endpoint', 'Endpoint', 'http://trace.wandb.ai'],- [TracingProvider.opik, 'url', 'Url', 'https://www.comet.com/opik/'],- [TracingProvider.mlflow, 'experiment_id', 'app.tracing.configProvider.experimentId', '1.5'],- [- TracingProvider.databricks,- 'experiment_id',- 'app.tracing.configProvider.experimentId',- '-1',- ],- [TracingProvider.aliyun, 'license_key', 'License Key', ' '],- [TracingProvider.tencent, 'token', 'Token', ' '],+ ['langfuse', 'host', 'Host', 'ftp://cloud.langfuse.com'],+ ['langsmith', 'endpoint', 'Endpoint', 'http://api.smith.langchain.com'],+ ['weave', 'endpoint', 'Endpoint', 'http://trace.wandb.ai'],+ ['opik', 'url', 'Url', 'https://www.comet.com/opik/'],+ ['mlflow', 'experiment_id', 'app.tracing.configProvider.experimentId', '1.5'],+ ['databricks', 'experiment_id', 'app.tracing.configProvider.experimentId', '-1'],+ ['aliyun', 'license_key', 'License Key', ' '],+ ['tencent', 'token', 'Token', ' '],] as const)('validates %s %s inline before sending credentials',async (provider, key, label, value) => {@@ -518,7 +485,6 @@ describe('ProviderConfigModal', () => {expect(field).toBeInvalid()expect(field).toHaveFocus()expect(field).toHaveAccessibleDescription()- expect(toast).not.toHaveBeenCalled()},)})@@ -536,8 +502,8 @@ describe('ProviderConfigModal', () => {it('should remove an existing provider after confirmation', async () => {const user = userEvent.setup()const callbacks = renderProviderConfigModal({- type: TracingProvider.langfuse,- payload: validConfigs[TracingProvider.langfuse],+ type: 'langfuse',+ payload: validConfigs.langfuse,})await user.click(screen.getByRole('button', { name: 'common.operation.remove' }))@@ -547,18 +513,37 @@ describe('ProviderConfigModal', () => {),).toBeInTheDocument()- await user.click(screen.getByRole('button', { name: 'common.operation.confirm' }))+ await user.click(+ within(screen.getByRole('alertdialog')).getByRole('button', {+ name: 'common.operation.remove',+ }),+ )await waitFor(() => expect(callbacks.onRemoved).toHaveBeenCalledOnce())await expectRequest('DELETE')- expect(toast).not.toHaveBeenCalled()+ })++ it.each([+ [true, 'removeConfirmContentInUse'],+ [false, 'removeConfirmContentNotInUse'],+ ])('describes the removal consequence when in use is %s', async (inUse, key) => {+ const user = userEvent.setup()+ renderProviderConfigModal({ type: 'langfuse', payload: validConfigs.langfuse, inUse })++ await user.click(screen.getByRole('button', { name: 'common.operation.remove' }))++ expect(+ within(screen.getByRole('alertdialog')).getByText(+ `app.tracing.configProvider.${key}:{"key":"app.tracing.langfuse.title"}`,+ ),+ ).toBeInTheDocument()})it('keeps the draft and returns focus to Remove when confirmation is canceled', async () => {const user = userEvent.setup()renderProviderConfigModal({- type: TracingProvider.langfuse,- payload: validConfigs[TracingProvider.langfuse],+ type: 'langfuse',+ payload: validConfigs.langfuse,})const host = screen.getByRole('textbox', { name: 'Host' })@@ -579,3 +564,47 @@ describe('ProviderConfigModal', () => {})})})++it.each(['app', 'agent'] as const)(+ 'validates Tencent service names at the shared %s configuration boundary',+ async (kind) => {+ request.mockImplementation(async () => Response.json({ result: 'success' }))+ const user = userEvent.setup()+ renderProviderConfigModal({+ type: 'tencent',+ resource:+ kind === 'agent'+ ? { kind, agentId: 'agent-1' }+ : { kind, appId: 'app-1', mode: 'workflow' },+ })+ const endpoint = screen.getByRole('textbox', { name: 'Endpoint' })+ const service = screen.getByRole('textbox', { name: 'Service Name' })+ expect(endpoint).toHaveAttribute('placeholder', 'https://ap-guangzhou.apm.tencentcs.com:4320')+ expect(endpoint).toHaveValue('')+ expect(endpoint).toHaveAccessibleDescription('app.tracing.tencent.endpointHelp')+ expect(service).toHaveAccessibleDescription('app.tracing.tencent.serviceNameHelp')+ await user.type(screen.getByRole('textbox', { name: 'Token' }), 'synthetic-token')+ await user.type(endpoint, 'https://ap-guangzhou.apm.tencentcs.com:4320')+ await user.type(service, 'dify_app')+ await user.click(screen.getByRole('button', { name: 'common.operation.saveAndEnable' }))+ expect(request).not.toHaveBeenCalled()+ expect(service).toHaveAttribute('aria-invalid', 'true')+ await user.clear(service)+ await user.type(service, 'dify-app')+ await user.click(screen.getByRole('button', { name: 'common.operation.saveAndEnable' }))+ await waitFor(() => expect(request).toHaveBeenCalledOnce())+ await expectRequest(+ 'POST',+ {+ tracing_provider: 'tencent',+ activate: true,+ tracing_config: {+ token: 'synthetic-token',+ endpoint: 'https://ap-guangzhou.apm.tencentcs.com:4320',+ service_name: 'dify-app',+ },+ },+ kind === 'agent' ? '/agent/agent-1/trace-config' : '/apps/app-1/trace-config',+ )+ },+)diff --git a/web/app/components/app/tracing/__tests__/selection.browser.spec.tsx b/web/app/components/app/tracing/__tests__/selection.browser.spec.tsxnew file mode 100644index 00000000000..357b5746267--- /dev/null+++ b/web/app/components/app/tracing/__tests__/selection.browser.spec.tsx@@ -0,0 +1,85 @@+import { userEvent } from 'vite-plus/test/browser'+import { render } from 'vitest-browser-react'+import { createQueryClientWrapper } from '@/test/console/query-client'+import { createSystemFeaturesFixture } from '@/test/console/system-features'+import { createDeferred } from '@/test/deferred'+import { createNuqsTestWrapper } from '@/test/nuqs-testing'+import { createTestQueryClient } from '@/test/query-client'+import { TracingConfiguration } from '../configuration'++const { request } = vi.hoisted(() => ({+ request:+ vi.fn<(url: string, init: RequestInit, options: { request: Request }) => Promise<Response>>(),+}))+vi.mock('@/service/base', () => ({ request }))++// Chromium drops native-button focus when pending saves disable the selected radio;+// the unit DOM environment does not reproduce that loss.+it('preserves provider focus during an async save and allows keyboard selection after saving', async () => {+ const save = createDeferred<void>()+ let status = { enabled: true, tracing_provider: 'langfuse' }+ const writes: unknown[] = []+ request.mockImplementation(async (_url, _init, { request: sent }) => {+ const url = new URL(sent.url)+ if (url.pathname.endsWith('/system-features'))+ return Response.json(createSystemFeaturesFixture())+ if (url.pathname.endsWith('/trace')) {+ if (sent.method === 'POST') {+ const body = await sent.json()+ writes.push(body)+ if (writes.length === 1) await save.promise+ status = body+ return Response.json({ result: 'success' })+ }+ return Response.json(status)+ }+ const provider = url.searchParams.get('tracing_provider')+ const config =+ provider === 'langfuse'+ ? { public_key: 'public', secret_key: 'secret', host: 'https://cloud.langfuse.com' }+ : provider === 'langsmith'+ ? { api_key: 'key', project: 'project', endpoint: 'https://api.smith.langchain.com' }+ : null+ return Response.json({ has_not_configured: !config, tracing_config: config })+ })+ const QueryProvider = createQueryClientWrapper(createTestQueryClient())+ const { wrapper: NuqsProvider } = createNuqsTestWrapper({ hasMemory: true })+ const screen = await render(+ <QueryProvider>+ <NuqsProvider>+ <TracingConfiguration+ resource={{ kind: 'app', appId: 'app-1', mode: 'chat' }}+ readOnly={false}+ />+ </NuqsProvider>+ </QueryProvider>,+ )+ await screen.getByRole('button', { name: /app.tracing.enabled/ }).click()+ const group = screen.getByRole('radiogroup')+ const langfuse = group.getByRole('radio', { name: 'app.tracing.langfuse.title' })+ const langsmith = group.getByRole('radio', { name: 'app.tracing.langsmith.title' })+ await langfuse.click()+ await expect.element(langfuse).toHaveFocus()+ await userEvent.keyboard('{ArrowRight}')+ await expect.poll(() => writes.length).toBe(1)+ await expect.element(langsmith).toBeChecked()+ await expect.element(langsmith).toHaveFocus()+ await userEvent.keyboard('{ArrowLeft}')+ await expect.element(langfuse).toHaveFocus()+ await expect.element(langsmith).toBeChecked()+ await userEvent.keyboard(' ')+ expect(writes).toHaveLength(1)+ await userEvent.keyboard('{ArrowRight}')+ await expect.element(langsmith).toHaveFocus()+ save.resolve()+ await expect.element(group).not.toHaveAttribute('aria-readonly', 'true')+ await expect.element(langsmith).toHaveFocus()+ await userEvent.keyboard('{ArrowLeft}')+ await expect.poll(() => writes.length).toBe(2)+ await expect.element(langfuse).toBeChecked()+ await expect.element(langfuse).toHaveFocus()+ expect(writes).toEqual([+ expect.objectContaining({ tracing_provider: 'langsmith' }),+ expect.objectContaining({ tracing_provider: 'langfuse' }),+ ])+})diff --git a/web/app/components/app/tracing/capabilities.ts b/web/app/components/app/tracing/capabilities.tsnew file mode 100644index 00000000000..139abd1ec6e--- /dev/null+++ b/web/app/components/app/tracing/capabilities.ts@@ -0,0 +1,18 @@+import type { TracingResource } from './resource'+import { skipToken } from '@tanstack/react-query'+import { consoleQuery } from '@/service/console'++/** Provider support is the same for every resource; only the authorizing endpoint differs. */+export function traceCapabilitiesQueryOptions(resource: TracingResource, provider: string | null) {+ if (resource.kind === 'agent')+ return consoleQuery.agent.byAgentId.traceCapabilities.get.queryOptions({+ input: provider+ ? { params: { agent_id: resource.agentId }, query: { tracing_provider: provider } }+ : skipToken,+ })+ return consoleQuery.apps.byAppId.traceCapabilities.get.queryOptions({+ input: provider+ ? { params: { app_id: resource.appId }, query: { tracing_provider: provider } }+ : skipToken,+ })+}diff --git a/web/app/components/app/tracing/config-popup.tsx b/web/app/components/app/tracing/config-popup.tsxnew file mode 100644index 00000000000..25390c369e9--- /dev/null+++ b/web/app/components/app/tracing/config-popup.tsx@@ -0,0 +1,256 @@+'use client'+import type {+ AppTracePayload,+ AppTraceResponse,+ TraceAppConfigResponse,+} from '@dify/contracts/api/console/apps/types.gen'+import type { DialogActions } from '@langgenius/dify-ui/dialog'+import type { ProviderConfigError } from './provider-panel'+import type { ConfigurableTracingProvider } from './providers'+import type { TracingResource } from './resource'+import { cn } from '@langgenius/dify-ui/cn'+import { Dialog, DialogContent } from '@langgenius/dify-ui/dialog'+import { Field, FieldDescription } from '@langgenius/dify-ui/field'+import { PopoverDescription, PopoverTitle } from '@langgenius/dify-ui/popover'+import { RadioGroup } from '@langgenius/dify-ui/radio-group'+import { Separator } from '@langgenius/dify-ui/separator'+import { StatusDot } from '@langgenius/dify-ui/status-dot'+import { Switch } from '@langgenius/dify-ui/switch'+import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip'+import { useIsMutating, useQuery } from '@tanstack/react-query'+import { useId, useRef } from 'react'+import { useTranslation } from 'react-i18next'+import { systemFeaturesQueryOptions } from '@/features/system-features/client'+import { consoleQuery } from '@/service/console'+import { ProviderConfigModal } from './provider-config-modal'+import { ProviderPanel } from './provider-panel'+import { configurableProviders, hasProviderForm } from './providers'+import { usesAgentTracePipeline } from './resource'+import { TracePolicy } from './trace-policy'+import { TracingIcon } from './tracing-icon'++type ConfigPopupProps = {+ resource: TracingResource+ configErrors?: Partial<Record<ConfigurableTracingProvider, ProviderConfigError>>+ readOnly: boolean+ pending: boolean+ policyError?: string+ policy?: AppTraceResponse+ onPolicyChange: (changes: Partial<AppTracePayload>) => Promise<void>+ configs: Partial<Record<ConfigurableTracingProvider, TraceAppConfigResponse['tracing_config']>>+}++export function ConfigPopup({+ resource,+ configErrors,+ readOnly,+ pending,+ policyError,+ policy,+ onPolicyChange,+ configs,+}: ConfigPopupProps) {+ const { t } = useTranslation(['app'])+ const dialogActionsRef = useRef<DialogActions>(null)+ const firstInputRef = useRef<HTMLInputElement>(null)+ const titleId = useId()+ const enabled = policy?.enabled ?? false+ const chosenProvider = hasProviderForm(policy?.tracing_provider) ? policy.tracing_provider : null+ const cannotEnable = !readOnly && !enabled && (!chosenProvider || !configs[chosenProvider])+ const switchDescription = readOnly+ ? t(($) => $['tracing.readOnly'])+ : cannotEnable+ ? t(($) => $['tracing.disabledTip'])+ : undefined+ const chooseProvider = (provider: ConfigurableTracingProvider) =>+ onPolicyChange({ tracing_provider: provider, enabled: true })+ const closeConfig = () => dialogActionsRef.current?.close()+ const isConfigMutating =+ useIsMutating({+ mutationKey:+ resource.kind === 'agent'+ ? consoleQuery.agent.byAgentId.traceConfig.key({ type: 'mutation' })+ : consoleQuery.apps.byAppId.traceConfig.key({ type: 'mutation' }),+ }) > 0+ const { data: agentTracingEnabled } = useQuery({+ ...systemFeaturesQueryOptions(),+ select: (features) => features.agent_tracing_api_collection_enabled,+ })+ // Deployment availability is independent of the application destination.+ const agentTracingSection =+ usesAgentTracePipeline(resource) && agentTracingEnabled !== undefined+ ? agentTracingEnabled+ ? chosenProvider+ ? 'settings'+ : null+ : 'unavailable'+ : null+ const groups = [+ configurableProviders.filter((provider) => !!configs[provider]),+ configurableProviders.filter((provider) => !configs[provider]),+ ] as const+ return (+ <Dialog<ConfigurableTracingProvider>+ actionsRef={dialogActionsRef}+ disablePointerDismissal+ onOpenChange={(open, details) => {+ // A closed dialog could not show a failed save or removal; success closes it imperatively.+ if (!open && isConfigMutating && details.reason !== 'imperative-action') details.cancel()+ }}+ >+ {({ payload: provider }) => (+ <>+ <div className="max-h-[min(32rem,calc(100dvh-8rem))] w-105 max-w-[calc(100vw-2rem)] overflow-y-auto rounded-2xl border-[0.5px] border-components-panel-border bg-components-panel-bg p-4 shadow-xl">+ <Field>+ <div className="flex items-center justify-between gap-3">+ <div className="flex min-w-0 flex-1 items-center gap-2">+ <TracingIcon+ size="md"+ className="shrink-0 bg-util-colors-blue-brand-blue-brand-500"+ />+ <PopoverTitle id={titleId} className="title-2xl-semi-bold text-text-primary">+ {t(($) => $['tracing.tracing'])}+ </PopoverTitle>+ </div>+ <div className="flex shrink-0 items-center gap-3">+ <span className="flex items-center gap-1">+ <span className="flex size-3 items-center justify-center">+ <StatusDot status={enabled ? 'success' : 'disabled'} />+ </span>+ <span+ className={cn(+ 'system-xs-semibold-uppercase',+ enabled ? 'text-util-colors-green-green-600' : 'text-text-tertiary',+ )}+ >+ {t(($) => $[enabled ? 'tracing.enabled' : 'tracing.disabled'])}+ </span>+ </span>+ <Tooltip disabled={!switchDescription}>+ <TooltipTrigger+ render={+ <Switch+ size="lg"+ aria-labelledby={titleId}+ checked={enabled}+ readOnly={readOnly}+ disabled={cannotEnable}+ onCheckedChange={(enabled) => {+ void onPolicyChange({ enabled }).catch(() => {})+ }}+ />+ }+ />+ <TooltipContent>{switchDescription}</TooltipContent>+ </Tooltip>+ </div>+ </div>+ {switchDescription && (+ <FieldDescription className="sr-only">{switchDescription}</FieldDescription>+ )}+ </Field>+ <PopoverDescription className="mt-2 system-xs-regular text-text-tertiary">+ {t(($) => $['tracing.tracingDescription'])}+ </PopoverDescription>+ {policyError && (+ <p role="alert" className="mt-2 system-sm-regular text-text-destructive">+ {policyError}+ </p>+ )}+ {agentTracingSection === 'unavailable' ? (+ // Capture settings and provider support have no effect without Agent tracing.+ <p+ role="note"+ className="my-3 flex gap-1.5 rounded-lg bg-background-section px-2.5 py-2 system-xs-regular text-text-tertiary"+ >+ <span aria-hidden className="mt-px i-ri-information-2-line size-3.5 shrink-0" />+ {t(($) => $['tracing.agentTracingUnavailable'])}+ </p>+ ) : (+ <>+ {agentTracingSection === 'settings' && (+ <>+ <Separator className="my-3 bg-divider-subtle" />+ <TracePolicy policy={policy} readOnly={readOnly} onChange={onPolicyChange} />+ </>+ )}+ <Separator className="my-3 bg-divider-subtle" />+ </>+ )}+ {readOnly ? (+ chosenProvider ? (+ <ProviderPanel+ resource={resource}+ type={chosenProvider}+ readOnly+ pending={pending}+ config={configs[chosenProvider]}+ isChosen+ />+ ) : (+ <p className="system-sm-regular text-text-secondary">+ {t(($) => $['tracing.configProviderTitle.notConfigured'])}+ </p>+ )+ ) : (+ <RadioGroup<ConfigurableTracingProvider | null>+ value={chosenProvider}+ readOnly={pending}+ aria-label={t(($) => $['tracing.configProviderTitle.configured'])}+ className="block space-y-2"+ onValueChange={(provider) => {+ if (provider) void chooseProvider(provider).catch(() => {})+ }}+ >+ {groups.flatMap((group, index) =>+ group.length > 0+ ? [+ <h4+ key={index === 0 ? 'configured' : 'available'}+ className="mt-3 system-xs-medium-uppercase text-text-tertiary"+ >+ {t(+ ($) =>+ $[+ `tracing.configProviderTitle.${index === 0 ? 'configured' : groups[0].length > 0 ? 'moreProviders' : 'notConfigured'}`+ ],+ )}+ </h4>,+ ...group.map((item) => (+ <ProviderPanel+ key={item}+ resource={resource}+ type={item}+ readOnly={readOnly}+ pending={pending}+ config={configs[item]}+ configError={configErrors?.[item]}+ isChosen={chosenProvider === item}+ />+ )),+ ]+ : [],+ )}+ </RadioGroup>+ )}+ </div>+ {!readOnly && (+ <DialogContent initialFocus={firstInputRef} className="max-h-[calc(100dvh-2rem)] w-160">+ {provider && (+ <ProviderConfigModal+ resource={resource}+ type={provider}+ payload={configs[provider]}+ inUse={enabled && chosenProvider === provider}+ firstInputRef={firstInputRef}+ onSaved={closeConfig}+ onRemoved={closeConfig}+ />+ )}+ </DialogContent>+ )}+ </>+ )}+ </Dialog>+ )+}diff --git a/web/app/components/app/tracing/configuration.tsx b/web/app/components/app/tracing/configuration.tsxnew file mode 100644index 00000000000..b33e543085f--- /dev/null+++ b/web/app/components/app/tracing/configuration.tsx@@ -0,0 +1,246 @@+'use client'+import type { AppTracePayload } from '@dify/contracts/api/console/apps/types.gen'+import type { ProviderConfigError } from './provider-panel'+import type { ConfigurableTracingProvider } from './providers'+import type { TracingResource } from './resource'+import { Button } from '@langgenius/dify-ui/button'+import { cn } from '@langgenius/dify-ui/cn'+import { Popover, PopoverContent, PopoverTrigger } from '@langgenius/dify-ui/popover'+import { Separator } from '@langgenius/dify-ui/separator'+import { StatusDot } from '@langgenius/dify-ui/status-dot'+import { noop, useMutation, useQueries, useQuery, useQueryClient } from '@tanstack/react-query'+import { useQueryState } from 'nuqs'+import { useTranslation } from 'react-i18next'+import { SkeletonRectangle } from '@/app/components/base/skeleton'+import { systemFeaturesQueryOptions } from '@/features/system-features/client'+import { consoleQuery } from '@/service/console'+import { traceCapabilitiesQueryOptions } from './capabilities'+import { ConfigPopup } from './config-popup'+import { configurableProviders, tracingProviders } from './providers'+import { tracingQueryParamName, tracingQueryParser } from './query-params'+import { usesAgentTracePipeline } from './resource'+import { TracingIcon } from './tracing-icon'++const I18N_PREFIX = 'tracing'++type TracingConfigurationProps = {+ resource: TracingResource+ readOnly: boolean+}++export function TracingConfiguration({ resource, readOnly }: TracingConfigurationProps) {+ const { t } = useTranslation(['app', 'common'])+ const [destination, setDestination] = useQueryState(tracingQueryParamName, tracingQueryParser)+ const statusQuery = useQuery(+ resource.kind === 'agent'+ ? consoleQuery.agent.byAgentId.trace.get.queryOptions({+ input: { params: { agent_id: resource.agentId } },+ })+ : consoleQuery.apps.byAppId.trace.get.queryOptions({+ input: { params: { app_id: resource.appId } },+ }),+ )+ const providers = configurableProviders+ const configQueries = useQueries({+ queries: readOnly+ ? []+ : providers.map((provider) =>+ resource.kind === 'agent'+ ? consoleQuery.agent.byAgentId.traceConfig.get.queryOptions({+ input: {+ params: { agent_id: resource.agentId },+ query: { tracing_provider: provider },+ },+ })+ : consoleQuery.apps.byAppId.traceConfig.get.queryOptions({+ input: {+ params: { app_id: resource.appId },+ query: { tracing_provider: provider },+ },+ }),+ ),+ })+ const configs = new Map(+ providers.map((provider, index) => {+ const response = configQueries[index]?.data+ return [+ provider,+ response?.has_not_configured ? null : (response?.tracing_config ?? null),+ ] as const+ }),+ )+ const resourceId = resource.kind === 'agent' ? resource.agentId : resource.appId+ const scope = { id: `tracing:${resource.kind}:${resourceId}` }+ const updateAppTrace = useMutation(+ consoleQuery.apps.byAppId.trace.post.mutationOptions({ context: { silent: true }, scope }),+ )+ const updateAgentTrace = useMutation(+ consoleQuery.agent.byAgentId.trace.post.mutationOptions({ context: { silent: true }, scope }),+ )+ const updateTracingStatus = resource.kind === 'agent' ? updateAgentTrace : updateAppTrace+ const isCurrentMutation =+ (resource.kind === 'agent'+ ? updateAgentTrace.variables?.params.agent_id+ : updateAppTrace.variables?.params.app_id) === resourceId+ const pending = isCurrentMutation && updateTracingStatus.isPending+ const tracingStatus = pending ? updateTracingStatus.variables.body : statusQuery.data+ const enabled = tracingStatus?.enabled ?? false+ const inUseTracingProvider =+ providers.find((provider) => provider === tracingStatus?.tracing_provider) ?? null+ const queryClient = useQueryClient()+ // The popup's selected provider card shows these; start the request once the user aims at the trigger.+ const { data: agentTracingEnabled } = useQuery({+ ...systemFeaturesQueryOptions(),+ select: (features) => features.agent_tracing_api_collection_enabled,+ })+ const prefetchCapabilities = () => {+ if (!inUseTracingProvider || !usesAgentTracePipeline(resource) || !agentTracingEnabled) return+ void queryClient+ .query(traceCapabilitiesQueryOptions(resource, inUseTracingProvider))+ .catch(noop)+ }+ const updatePolicy = async (changes: Partial<AppTracePayload>) => {+ if (!tracingStatus || readOnly) return+ const body: AppTracePayload = {+ enabled,+ tracing_provider: tracingStatus.tracing_provider ?? null,+ capture_content: tracingStatus.capture_content ?? false,+ capture_agent: tracingStatus.capture_agent ?? true,+ ...changes,+ }+ if (resource.kind === 'agent')+ await updateAgentTrace.mutateAsync({ params: { agent_id: resource.agentId }, body })+ else await updateAppTrace.mutateAsync({ params: { app_id: resource.appId }, body })+ }+ const inUseProviderIconClassName = inUseTracingProvider+ ? tracingProviders[inUseTracingProvider].icon+ : undefined++ const hasConfiguredTracing =+ !!inUseTracingProvider || [...configs.values()].some((config) => config !== null)+ const configErrors: Partial<Record<ConfigurableTracingProvider, ProviderConfigError>> = {}+ configQueries.forEach((query, index) => {+ const provider = providers[index]+ if (!readOnly && provider && query.isFetched && !query.data) {+ configErrors[provider] = {+ onRetry: () => {+ void query.refetch()+ },+ isRetrying: query.isFetching,+ }+ }+ })+ const statusFailed = statusQuery.isError && !tracingStatus+ if (statusFailed) {+ return (+ <Button+ variant="secondary"+ disabled={statusQuery.isFetching}+ onClick={() => {+ void statusQuery.refetch()+ }}+ >+ {t(($) => $['tracing.title'], { ns: 'app' })}+ {' · '}+ {t(($) => $['errorBoundary.tryAgain'], { ns: 'common' })}+ </Button>+ )+ }+ const isLoading =+ statusQuery.isPending || configQueries.some((query) => query.isPending && !query.isFetched)++ if (isLoading) {+ return (+ <div role="status" aria-label={t(($) => $['tracing.title'], { ns: 'app' })}>+ <span className="sr-only">{t(($) => $.loading, { ns: 'common' })}</span>+ <SkeletonRectangle aria-hidden="true" className="my-0 h-10 w-56 rounded-xl" />+ </div>+ )+ }++ if (resource.kind === 'app' && readOnly && !hasConfiguredTracing) return null++ return (+ <Popover+ key={resource.kind === 'agent' ? resource.agentId : resource.appId}+ open={destination === 'configure'}+ onOpenChange={(open) => {+ void setDestination(open ? 'configure' : null)+ }}+ >+ <PopoverTrigger+ onPointerEnter={prefetchCapabilities}+ onFocus={prefetchCapabilities}+ render={+ <Button className="h-auto gap-0 rounded-xl bg-background-default-lighter p-2 inset-ring-components-panel-border hover:bg-background-default-dodge" />+ }+ >+ {hasConfiguredTracing ? (+ <span className="flex items-center gap-2">+ <span className="sr-only">+ {t(($) => $['tracing.config'], { ns: 'app' })}+ {' · '}+ {t(($) => $['tracing.title'], { ns: 'app' })}+ {' · '}+ {inUseTracingProvider &&+ t(($) => $[`tracing.${inUseTracingProvider}.title`], { ns: 'app' })}+ {' · '}+ </span>+ {inUseProviderIconClassName && (+ <span aria-hidden className="flex items-center pr-2 pl-1">+ <span className={cn(inUseProviderIconClassName, 'h-5')} />+ </span>+ )}+ <span className="flex items-center gap-1">+ <span className="flex size-3 items-center justify-center">+ <StatusDot status={enabled ? 'success' : 'disabled'} />+ </span>+ <span+ className={cn(+ 'system-xs-semibold-uppercase',+ enabled ? 'text-util-colors-green-green-600' : 'text-text-tertiary',+ )}+ >+ {t(($) => $[`${I18N_PREFIX}.${enabled ? 'enabled' : 'disabled'}`], { ns: 'app' })}+ </span>+ </span>+ <Separator decorative orientation="vertical" className="ml-1 h-3.5" />+ <span aria-hidden className="flex size-6 items-center justify-center rounded-md">+ <span className="i-ri-equalizer-2-line size-4 text-text-tertiary" />+ </span>+ </span>+ ) : (+ <>+ <TracingIcon size="md" />+ <span className="mx-2 system-sm-semibold text-text-secondary">+ {t(($) => $[`${I18N_PREFIX}.title`], { ns: 'app' })}+ </span>+ <span className="rounded-md p-1">+ <span className="i-ri-equalizer-2-line size-4 text-text-tertiary" />+ </span>+ <Separator decorative orientation="vertical" className="mx-2 h-3.5" />+ <span className="rounded-md p-1">+ <span className="i-ri-arrow-down-double-line size-4 text-text-tertiary" />+ </span>+ </>+ )}+ </PopoverTrigger>+ <PopoverContent+ placement="bottom-end"+ sideOffset={12}+ className="border-none bg-transparent shadow-none"+ >+ <ConfigPopup+ resource={resource}+ readOnly={readOnly}+ pending={pending}+ policyError={isCurrentMutation ? updateTracingStatus.error?.message : undefined}+ policy={tracingStatus}+ onPolicyChange={updatePolicy}+ configs={Object.fromEntries(configs)}+ configErrors={configErrors}+ />+ </PopoverContent>+ </Popover>+ )+}diff --git a/web/app/components/app/tracing/inherited-tracing-summary.tsx b/web/app/components/app/tracing/inherited-tracing-summary.tsxnew file mode 100644index 00000000000..18e676e7460--- /dev/null+++ b/web/app/components/app/tracing/inherited-tracing-summary.tsx@@ -0,0 +1,172 @@+import type { TracingResource } from './resource'+import { Button, buttonVariants } from '@langgenius/dify-ui/button'+import { cn } from '@langgenius/dify-ui/cn'+import { Infotip, InfotipContent, InfotipTrigger } from '@langgenius/dify-ui/infotip'+import { StatusDot } from '@langgenius/dify-ui/status-dot'+import { useQuery } from '@tanstack/react-query'+import { useAtomValue } from 'jotai'+import { useId } from 'react'+import { useTranslation } from 'react-i18next'+import { workspacePermissionKeysAtom } from '@/context/permission-state'+import { userProfileQueryOptions } from '@/features/account-profile/client'+import { systemFeaturesQueryOptions } from '@/features/system-features/client'+import Link from '@/next/link'+import { consoleQuery } from '@/service/console'+import { getAppACLCapabilities } from '@/utils/permission'+import { traceCapabilitiesQueryOptions } from './capabilities'+import { hasProviderForm } from './providers'+import { tracingQueryParamName } from './query-params'++function useAppTracingAccess(appId: string) {+ const { data: appDetail } = useQuery(+ consoleQuery.apps.byAppId.get.queryOptions({ input: { params: { app_id: appId } } }),+ )+ const { data: currentUserId } = useQuery({+ ...userProfileQueryOptions(),+ select: (data) => data.profile.id,+ })+ const workspacePermissionKeys = useAtomValue(workspacePermissionKeysAtom)+ if (!appDetail) return { canMonitor: false, canConfigureTracing: false }+ return getAppACLCapabilities(appDetail.permission_keys, {+ currentUserId,+ resourceMaintainer: appDetail.maintainer,+ workspacePermissionKeys,+ })+}++/** Read-only summary for Agents that run under the tracing settings of the calling Workflow. */+export function InheritedTracingSummary({+ resource,+}: {+ resource: Extract<TracingResource, { kind: 'app' }>+}) {+ const { appId } = resource+ const { t } = useTranslation(['app', 'common'])+ const titleId = useId()+ const settingsHintId = useId()+ const { canMonitor, canConfigureTracing } = useAppTracingAccess(appId)+ // Settings are edited on the monitoring page in another tab, so refresh when the editor regains focus.+ const statusQuery = useQuery(+ consoleQuery.apps.byAppId.trace.get.queryOptions({+ input: { params: { app_id: appId } },+ refetchOnWindowFocus: 'always',+ }),+ )+ const policy = statusQuery.data+ const provider = hasProviderForm(policy?.tracing_provider) ? policy.tracing_provider : null+ const enabled = !!policy?.enabled && !!provider+ const { data: agentTracingEnabled } = useQuery({+ ...systemFeaturesQueryOptions(),+ select: (features) => features.agent_tracing_api_collection_enabled,+ })+ const capabilitiesQuery = useQuery(+ traceCapabilitiesQueryOptions(+ resource,+ enabled && canMonitor && agentTracingEnabled ? provider : null,+ ),+ )+ const capabilities = capabilitiesQuery.data+ const providerName = provider ? t(($) => $[`tracing.${provider}.title`], { ns: 'app' }) : ''+ const onOff = (value: boolean) =>+ t(($) => $[value ? 'tracing.inherited.on' : 'tracing.inherited.off'], { ns: 'app' })++ const status = provider ? (+ <>+ <StatusDot size="small" status={enabled ? 'success' : 'disabled'} />+ <span data-enabled={enabled || undefined} className="data-enabled:text-text-secondary">+ {t(+ ($) =>+ $[enabled ? 'tracing.inherited.providerEnabled' : 'tracing.inherited.providerDisabled'],+ { ns: 'app', provider: providerName },+ )}+ </span>+ </>+ ) : (+ t(($) => $['tracing.inherited.notConfigured'], { ns: 'app' })+ )++ return (+ <div role="group" aria-labelledby={titleId} className="flex flex-col gap-1 px-4 py-2">+ <div className="flex min-h-6 items-center gap-2">+ <div className="flex min-w-0 flex-1 items-center gap-0.5">+ <span id={titleId} className="system-sm-semibold-uppercase text-text-secondary">+ {t(($) => $['tracing.inherited.title'], { ns: 'app' })}+ </span>+ <Infotip>+ <InfotipTrigger aria-labelledby={titleId} />+ <InfotipContent className="max-w-72">+ <p>{t(($) => $['tracing.inherited.description'], { ns: 'app' })}</p>+ {/* The capture policy has no effect where Agent tracing is unavailable. */}+ {enabled && agentTracingEnabled !== false && (+ <dl className="mt-2 space-y-0.5">+ <div className="flex justify-between gap-3">+ <dt>{t(($) => $['tracing.captureContent'], { ns: 'app' })}</dt>+ <dd>{onOff(policy.capture_content ?? false)}</dd>+ </div>+ <div className="flex justify-between gap-3">+ <dt>{t(($) => $['tracing.captureAgent'], { ns: 'app' })}</dt>+ <dd>{onOff(policy.capture_agent ?? true)}</dd>+ </div>+ </dl>+ )}+ </InfotipContent>+ </Infotip>+ </div>+ {!policy && statusQuery.isError ? (+ <>+ <span className="system-xs-regular text-text-destructive">+ {t(($) => $['tracing.inherited.loadFailed'], { ns: 'app' })}+ </span>+ <Button+ variant="secondary"+ size="small"+ loading={statusQuery.isFetching}+ onClick={() => {+ void statusQuery.refetch()+ }}+ >+ {t(($) => $['operation.retry'], { ns: 'common' })}+ </Button>+ </>+ ) : !policy ? (+ <span aria-hidden className="h-2.5 w-24 rounded-xs bg-text-quaternary/20" />+ ) : canMonitor && canConfigureTracing ? (+ <Link+ href={`/app/${appId}/overview?${tracingQueryParamName}=configure`}+ target="_blank"+ rel="noopener noreferrer"+ aria-describedby={settingsHintId}+ className={cn(+ buttonVariants({ variant: 'ghost', size: 'small' }),+ 'shrink-0 gap-1.5 text-text-tertiary hover:text-text-secondary',+ )}+ >+ {status}+ <span aria-hidden className="i-ri-external-link-line size-3.5 shrink-0" />+ <span id={settingsHintId} hidden>+ {`${t(($) => $['tracing.inherited.settings'], { ns: 'app' })} (${t(($) => $['operation.openInNewTab'], { ns: 'common' })})`}+ </span>+ </Link>+ ) : (+ <span className="flex shrink-0 items-center gap-1.5 system-xs-medium text-text-tertiary">+ {status}+ </span>+ )}+ </div>+ {agentTracingEnabled === false ? (+ <p className="flex gap-1 system-xs-regular text-text-warning">+ <span aria-hidden className="mt-px i-ri-error-warning-line size-3.5 shrink-0" />+ {t(($) => $['tracing.agentTracingUnavailable'], { ns: 'app' })}+ </p>+ ) : capabilities && !capabilities.agent_spans ? (+ <p className="flex gap-1 system-xs-regular text-text-warning">+ <span aria-hidden className="mt-px i-ri-error-warning-line size-3.5 shrink-0" />+ {t(($) => $['tracing.agentSpansUnsupported'], {+ ns: 'app',+ provider: providerName,+ })}+ </p>+ ) : null}+ </div>+ )+}diff --git a/web/app/components/app/tracing/provider-capabilities.tsx b/web/app/components/app/tracing/provider-capabilities.tsxnew file mode 100644index 00000000000..8ceff6d087b--- /dev/null+++ b/web/app/components/app/tracing/provider-capabilities.tsx@@ -0,0 +1,114 @@+import type { TraceProviderSupportResponse } from '@dify/contracts/api/console/apps/types.gen'+import type { ConfigurableTracingProvider } from './providers'+import type { TracingResource } from './resource'+import { Button } from '@langgenius/dify-ui/button'+import { Collapsible, CollapsiblePanel } from '@langgenius/dify-ui/collapsible'+import { useQuery } from '@tanstack/react-query'+import { useTranslation } from 'react-i18next'+import { SkeletonRectangle } from '@/app/components/base/skeleton'+import { traceCapabilitiesQueryOptions } from './capabilities'+import { SummaryDisclosureTrigger } from './summary-disclosure'++type SupportFlag = {+ [K in keyof TraceProviderSupportResponse]: TraceProviderSupportResponse[K] extends boolean+ ? K+ : never+}[keyof TraceProviderSupportResponse]++// Display order; `satisfies` fails the build when the contract adds or drops a support flag.+const displayOrder = {+ agent_spans: true,+ session: true,+ native_usage: true,+ native_cost: true,+ trace_url: true,+ span_url: true,+} satisfies Record<SupportFlag, true>+const capabilityKeys = Object.keys(displayOrder) as SupportFlag[]++/** What the selected provider supports for Agent traces, disclosed on demand. */+export function ProviderCapabilities({+ resource,+ provider,+}: {+ resource: TracingResource+ provider: ConfigurableTracingProvider+}) {+ const { t } = useTranslation(['app', 'common'])+ const capabilities = useQuery(traceCapabilitiesQueryOptions(resource, provider))++ if (!capabilities.data) {+ // Holds the summary row's height so the card does not shift when support arrives.+ if (!capabilities.isError)+ return (+ <div aria-hidden className="mt-2 flex h-5 items-center">+ <SkeletonRectangle className="my-0 h-2.5 w-24" />+ </div>+ )+ return (+ <div role="alert" className="mt-2 flex items-center gap-2">+ <span className="system-xs-regular text-text-destructive">+ {t(($) => $['tracing.capabilitiesLoadFailed'], { ns: 'app' })}+ </span>+ <Button+ size="small"+ loading={capabilities.isFetching}+ onClick={() => {+ void capabilities.refetch()+ }}+ >+ {t(($) => $['operation.retry'], { ns: 'common' })}+ </Button>+ </div>+ )+ }++ const support = capabilities.data+ const unsupportedCount = capabilityKeys.filter((key) => !support[key]).length++ return (+ <div className="mt-2 space-y-1">+ {!support.agent_spans && (+ <p className="flex gap-1 system-xs-regular text-text-warning">+ <span aria-hidden className="mt-px i-ri-error-warning-line size-3.5 shrink-0" />+ {t(($) => $['tracing.agentSpansUnsupported'], {+ ns: 'app',+ provider: t(($) => $[`tracing.${provider}.title`], { ns: 'app' }),+ })}+ </p>+ )}+ <Collapsible>+ <SummaryDisclosureTrigger+ label={t(($) => $['tracing.capabilities'], { ns: 'app' })}+ summary={+ unsupportedCount+ ? t(($) => $['tracing.capabilitySummary.unsupported'], {+ ns: 'app',+ count: unsupportedCount,+ })+ : t(($) => $['tracing.capabilitySummary.allSupported'], { ns: 'app' })+ }+ />+ <CollapsiblePanel>+ <dl className="grid grid-cols-2 gap-x-4 gap-y-1 pt-1.5 pb-0.5 system-xs-regular">+ {capabilityKeys.map((key) => (+ <div key={key} className="flex justify-between gap-2">+ <dt className="text-text-tertiary">+ {t(($) => $[`tracing.capability.${key}`], { ns: 'app' })}+ </dt>+ <dd+ data-supported={support[key] || undefined}+ className="text-text-tertiary data-supported:text-text-secondary"+ >+ {t(($) => $[support[key] ? 'tracing.supported' : 'tracing.unsupported'], {+ ns: 'app',+ })}+ </dd>+ </div>+ ))}+ </dl>+ </CollapsiblePanel>+ </Collapsible>+ </div>+ )+}diff --git a/web/app/components/app/tracing/provider-config-modal.tsx b/web/app/components/app/tracing/provider-config-modal.tsxnew file mode 100644index 00000000000..cf5130d8595--- /dev/null+++ b/web/app/components/app/tracing/provider-config-modal.tsx@@ -0,0 +1,812 @@+'use client'+import type {+ TraceAppConfigResponse,+ TraceConfigPayload,+} from '@dify/contracts/api/console/apps/types.gen'+import type { RefObject } from 'react'+import type { ConfigurableTracingProvider } from './providers'+import type { TracingResource } from './resource'+import {+ AlertDialog,+ AlertDialogCancelButton,+ AlertDialogConfirmButton,+ AlertDialogContent,+ AlertDialogDescription,+ AlertDialogFooter,+ AlertDialogHeader,+ AlertDialogTitle,+ AlertDialogTrigger,+} from '@langgenius/dify-ui/alert-dialog'+import { Button } from '@langgenius/dify-ui/button'+import {+ DialogBody,+ DialogClose,+ DialogFooter,+ DialogHeader,+ DialogHeaderCloseButton,+ DialogTitle,+} from '@langgenius/dify-ui/dialog'+import { Field, FieldDescription, FieldError, FieldLabel } from '@langgenius/dify-ui/field'+import { Form } from '@langgenius/dify-ui/form'+import { Input } from '@langgenius/dify-ui/input'+import { Separator } from '@langgenius/dify-ui/separator'+import { useMutation } from '@tanstack/react-query'+import { useTranslation } from 'react-i18next'+import { EncryptedBottom } from '@/app/components/base/encrypted-bottom'+import { consoleQuery } from '@/service/console'+import { tracingProviders } from './providers'++type ProviderConfigModalProps = {+ resource: TracingResource+ type: ConfigurableTracingProvider+ payload?: TraceAppConfigResponse['tracing_config']+ /** Whether traces currently go to this provider, so removing it turns tracing off. */+ inUse: boolean+ onRemoved: () => void+ firstInputRef: RefObject<HTMLInputElement | null>+ onSaved: () => void+}++const I18N_PREFIX = 'tracing.configProvider'++export function ProviderConfigModal({+ resource,+ type,+ payload,+ inUse,+ onRemoved,+ firstInputRef,+ onSaved,+}: ProviderConfigModalProps) {+ const { t } = useTranslation(['app', 'common', 'modelProvider'])+ const createAppConfig = useMutation(+ consoleQuery.apps.byAppId.traceConfig.post.mutationOptions({ context: { silent: true } }),+ )+ const createAgentConfig = useMutation(+ consoleQuery.agent.byAgentId.traceConfig.post.mutationOptions({ context: { silent: true } }),+ )+ const updateAppConfig = useMutation(+ consoleQuery.apps.byAppId.traceConfig.patch.mutationOptions({ context: { silent: true } }),+ )+ const updateAgentConfig = useMutation(+ consoleQuery.agent.byAgentId.traceConfig.patch.mutationOptions({ context: { silent: true } }),+ )+ const removeAppConfig = useMutation(+ consoleQuery.apps.byAppId.traceConfig.delete.mutationOptions({ context: { silent: true } }),+ )+ const removeAgentConfig = useMutation(+ consoleQuery.agent.byAgentId.traceConfig.delete.mutationOptions({ context: { silent: true } }),+ )+ const createConfig = resource.kind === 'agent' ? createAgentConfig : createAppConfig+ const updateConfig = resource.kind === 'agent' ? updateAgentConfig : updateAppConfig+ const removeConfig = resource.kind === 'agent' ? removeAgentConfig : removeAppConfig+ const isEdit = !!payload+ const saveError = createConfig.error ?? updateConfig.error+ const pending = createConfig.isPending || updateConfig.isPending || removeConfig.isPending+ const handleRemove = () => {+ if (pending) return+ const query = { tracing_provider: type }+ if (resource.kind === 'agent')+ removeAgentConfig.mutate(+ { params: { agent_id: resource.agentId }, query },+ { onSuccess: onRemoved },+ )+ else+ removeAppConfig.mutate(+ { params: { app_id: resource.appId }, query },+ { onSuccess: onRemoved },+ )+ }+ const handleSave = (values: TraceConfigPayload['tracing_config']) => {+ if (pending) return+ if (isEdit) createConfig.reset()+ else updateConfig.reset()+ const config: TraceConfigPayload['tracing_config'] = {}+ for (const [key, value] of Object.entries(values))+ config[key] = value === '' && payload?.[key] === null ? null : value+ const body: TraceConfigPayload = { tracing_provider: type, tracing_config: config }+ if (!isEdit) body.activate = true+ if (resource.kind === 'agent')+ (isEdit ? updateAgentConfig : createAgentConfig).mutate(+ { params: { agent_id: resource.agentId }, body },+ { onSuccess: onSaved },+ )+ else+ (isEdit ? updateAppConfig : createAppConfig).mutate(+ { params: { app_id: resource.appId }, body },+ { onSuccess: onSaved },+ )+ }++ return (+ <>+ <DialogHeader>+ <DialogTitle>+ {t(($) => $[`${I18N_PREFIX}.title`], { ns: 'app' })}+ {t(($) => $[`tracing.${type}.title`], { ns: 'app' })}+ </DialogTitle>+ <DialogHeaderCloseButton+ aria-label={t(($) => $['operation.close'], { ns: 'common' })}+ disabled={pending}+ />+ </DialogHeader>++ <Form<TraceConfigPayload['tracing_config']>+ autoComplete="off"+ className="contents"+ onFormSubmit={handleSave}+ >+ <DialogBody>+ <div className="space-y-4">+ {type === 'arize' && (+ <>+ <Field disabled={pending} name="api_key">+ <FieldLabel>+ API Key+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input+ autoComplete="off"+ ref={firstInputRef}+ required+ defaultValue={payload?.api_key ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: 'API Key',+ })}+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="space_id">+ <FieldLabel>+ Space ID+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input+ required+ defaultValue={payload?.space_id ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: 'Space ID',+ })}+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="project">+ <FieldLabel>+ {t(($) => $[`${I18N_PREFIX}.project`], { ns: 'app' })}+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input+ required+ defaultValue={payload?.project ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: t(($) => $[`${I18N_PREFIX}.project`], { ns: 'app' }),+ })}+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="endpoint">+ <FieldLabel>Endpoint</FieldLabel>+ <Input+ type="url"+ pattern="[Hh][Tt][Tt][Pp][Ss]?://.+"+ defaultValue={payload?.endpoint ?? ''}+ placeholder="https://otlp.arize.com"+ />+ <FieldError />+ </Field>+ </>+ )}+ {type === 'phoenix' && (+ <>+ <Field disabled={pending} name="api_key">+ <FieldLabel>API Key</FieldLabel>+ <Input+ autoComplete="off"+ ref={firstInputRef}+ defaultValue={payload?.api_key ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: 'API Key',+ })}+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="project">+ <FieldLabel>+ {t(($) => $[`${I18N_PREFIX}.project`], { ns: 'app' })}+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input+ required+ defaultValue={payload?.project ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: t(($) => $[`${I18N_PREFIX}.project`], { ns: 'app' }),+ })}+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="endpoint">+ <FieldLabel>Endpoint</FieldLabel>+ <Input+ type="url"+ pattern="[Hh][Tt][Tt][Pp][Ss]?://.+"+ defaultValue={payload?.endpoint ?? ''}+ placeholder="https://app.phoenix.arize.com"+ />+ <FieldError />+ </Field>+ </>+ )}+ {type === 'aliyun' && (+ <>+ <Field disabled={pending} name="license_key">+ <FieldLabel>+ License Key+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input+ autoComplete="off"+ pattern=".*\S.*"+ ref={firstInputRef}+ required+ defaultValue={payload?.license_key ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: 'License Key',+ })}+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="endpoint">+ <FieldLabel>+ Endpoint+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input+ type="url"+ pattern="[Hh][Tt][Tt][Pp][Ss]?://.+"+ required+ defaultValue={payload?.endpoint ?? ''}+ placeholder="https://tracing.arms.aliyuncs.com"+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="app_name">+ <FieldLabel>+ App Name+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input required defaultValue={payload?.app_name ?? ''} />+ <FieldError />+ </Field>+ </>+ )}+ {type === 'tencent' && (+ <>+ <Field disabled={pending} name="token">+ <FieldLabel>+ Token+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input+ autoComplete="off"+ pattern=".*\S.*"+ ref={firstInputRef}+ required+ defaultValue={payload?.token ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: 'Token',+ })}+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="endpoint">+ <FieldLabel>+ Endpoint+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input+ type="url"+ pattern="[Hh][Tt][Tt][Pp][Ss]?://.+"+ required+ defaultValue={payload?.endpoint ?? ''}+ placeholder="https://ap-guangzhou.apm.tencentcs.com:4320"+ />+ <FieldDescription>+ {t(($) => $['tracing.tencent.endpointHelp'], { ns: 'app' })}+ </FieldDescription>+ <FieldError />+ </Field>+ <Field disabled={pending} name="service_name">+ <FieldLabel>+ Service Name+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input+ required+ maxLength={63}+ pattern="[a-z]([a-z0-9\-]*[a-z0-9])?"+ defaultValue={payload?.service_name ?? ''}+ placeholder="dify-app"+ />+ <FieldDescription>+ {t(($) => $['tracing.tencent.serviceNameHelp'], { ns: 'app' })}+ </FieldDescription>+ <FieldError />+ </Field>+ </>+ )}+ {type === 'weave' && (+ <>+ <Field disabled={pending} name="api_key">+ <FieldLabel>+ API Key+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input+ autoComplete="off"+ ref={firstInputRef}+ required+ defaultValue={payload?.api_key ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: 'API Key',+ })}+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="project">+ <FieldLabel>+ {t(($) => $[`${I18N_PREFIX}.project`], { ns: 'app' })}+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input+ required+ defaultValue={payload?.project ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: t(($) => $[`${I18N_PREFIX}.project`], { ns: 'app' }),+ })}+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="entity">+ <FieldLabel>Entity</FieldLabel>+ <Input+ defaultValue={payload?.entity ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: 'Entity',+ })}+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="endpoint">+ <FieldLabel>Endpoint</FieldLabel>+ <Input+ type="url"+ pattern="[Hh][Tt][Tt][Pp][Ss]://.+"+ defaultValue={payload?.endpoint ?? ''}+ placeholder="https://trace.wandb.ai/"+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="host">+ <FieldLabel>Host</FieldLabel>+ <Input+ type="url"+ pattern="[Hh][Tt][Tt][Pp][Ss]?://.+"+ defaultValue={payload?.host ?? ''}+ placeholder="https://api.wandb.ai"+ />+ <FieldError />+ </Field>+ </>+ )}+ {type === 'langsmith' && (+ <>+ <Field disabled={pending} name="api_key">+ <FieldLabel>+ API Key+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input+ autoComplete="off"+ ref={firstInputRef}+ required+ defaultValue={payload?.api_key ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: 'API Key',+ })}+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="project">+ <FieldLabel>+ {t(($) => $[`${I18N_PREFIX}.project`], { ns: 'app' })}+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input+ required+ defaultValue={payload?.project ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: t(($) => $[`${I18N_PREFIX}.project`], { ns: 'app' }),+ })}+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="endpoint">+ <FieldLabel>Endpoint</FieldLabel>+ <Input+ type="url"+ pattern="[Hh][Tt][Tt][Pp][Ss]://.+"+ defaultValue={payload?.endpoint ?? ''}+ placeholder="https://api.smith.langchain.com"+ />+ <FieldError />+ </Field>+ </>+ )}+ {type === 'langfuse' && (+ <>+ <Field disabled={pending} name="secret_key">+ <FieldLabel>+ {t(($) => $[`${I18N_PREFIX}.secretKey`], { ns: 'app' })}+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input+ autoComplete="off"+ ref={firstInputRef}+ defaultValue={payload?.secret_key ?? ''}+ required+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: t(($) => $[`${I18N_PREFIX}.secretKey`], { ns: 'app' }),+ })}+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="public_key">+ <FieldLabel>+ {t(($) => $[`${I18N_PREFIX}.publicKey`], { ns: 'app' })}+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input+ required+ defaultValue={payload?.public_key ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: t(($) => $[`${I18N_PREFIX}.publicKey`], { ns: 'app' }),+ })}+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="host">+ <FieldLabel>+ Host+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input+ type="url"+ pattern="[Hh][Tt][Tt][Pp][Ss]?://.+"+ required+ defaultValue={payload?.host ?? ''}+ placeholder="https://cloud.langfuse.com"+ />+ <FieldError />+ </Field>+ </>+ )}+ {type === 'opik' && (+ <>+ <Field disabled={pending} name="api_key">+ <FieldLabel>API Key</FieldLabel>+ <Input+ autoComplete="off"+ ref={firstInputRef}+ defaultValue={payload?.api_key ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: 'API Key',+ })}+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="project">+ <FieldLabel>{t(($) => $[`${I18N_PREFIX}.project`], { ns: 'app' })}</FieldLabel>+ <Input+ defaultValue={payload?.project ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: t(($) => $[`${I18N_PREFIX}.project`], { ns: 'app' }),+ })}+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="workspace">+ <FieldLabel>Workspace</FieldLabel>+ <Input defaultValue={payload?.workspace ?? ''} placeholder="default" />+ <FieldError />+ </Field>+ <Field disabled={pending} name="url">+ <FieldLabel>Url</FieldLabel>+ <Input+ type="url"+ pattern="[Hh][Tt][Tt][Pp][Ss]?://.*/api/"+ defaultValue={payload?.url ?? ''}+ placeholder="https://www.comet.com/opik/api/"+ />+ <FieldError />+ </Field>+ </>+ )}+ {type === 'mlflow' && (+ <>+ <Field disabled={pending} name="tracking_uri">+ <FieldLabel>+ {t(($) => $[`${I18N_PREFIX}.trackingUri`], { ns: 'app' })}+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input+ type="url"+ pattern="[Hh][Tt][Tt][Pp][Ss]?://.+"+ ref={firstInputRef}+ defaultValue={payload?.tracking_uri ?? ''}+ required+ placeholder="http://localhost:5000"+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="experiment_id">+ <FieldLabel>+ {t(($) => $[`${I18N_PREFIX}.experimentId`], { ns: 'app' })}+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input+ inputMode="numeric"+ pattern="\s*[0-9]+\s*"+ required+ defaultValue={payload?.experiment_id ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: t(($) => $[`${I18N_PREFIX}.experimentId`], { ns: 'app' }),+ })}+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="username">+ <FieldLabel>{t(($) => $[`${I18N_PREFIX}.username`], { ns: 'app' })}</FieldLabel>+ <Input+ defaultValue={payload?.username ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: t(($) => $[`${I18N_PREFIX}.username`], { ns: 'app' }),+ })}+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="password">+ <FieldLabel>{t(($) => $[`${I18N_PREFIX}.password`], { ns: 'app' })}</FieldLabel>+ <Input+ autoComplete="off"+ defaultValue={payload?.password ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: t(($) => $[`${I18N_PREFIX}.password`], { ns: 'app' }),+ })}+ />+ <FieldError />+ </Field>+ </>+ )}+ {type === 'databricks' && (+ <>+ <Field disabled={pending} name="experiment_id">+ <FieldLabel>+ {t(($) => $[`${I18N_PREFIX}.experimentId`], { ns: 'app' })}+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input+ inputMode="numeric"+ pattern="\s*[0-9]+\s*"+ ref={firstInputRef}+ defaultValue={payload?.experiment_id ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: t(($) => $[`${I18N_PREFIX}.experimentId`], { ns: 'app' }),+ })}+ required+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="host">+ <FieldLabel>+ {t(($) => $[`${I18N_PREFIX}.databricksHost`], { ns: 'app' })}+ <span aria-hidden className="text-text-destructive">+ *+ </span>+ </FieldLabel>+ <Input+ type="url"+ pattern="[Hh][Tt][Tt][Pp][Ss]?://.+"+ defaultValue={payload?.host ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: t(($) => $[`${I18N_PREFIX}.databricksHost`], { ns: 'app' }),+ })}+ required+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="client_id">+ <FieldLabel>{t(($) => $[`${I18N_PREFIX}.clientId`], { ns: 'app' })}</FieldLabel>+ <Input+ defaultValue={payload?.client_id ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: t(($) => $[`${I18N_PREFIX}.clientId`], { ns: 'app' }),+ })}+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="client_secret">+ <FieldLabel>+ {t(($) => $[`${I18N_PREFIX}.clientSecret`], { ns: 'app' })}+ </FieldLabel>+ <Input+ autoComplete="off"+ defaultValue={payload?.client_secret ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: t(($) => $[`${I18N_PREFIX}.clientSecret`], { ns: 'app' }),+ })}+ />+ <FieldError />+ </Field>+ <Field disabled={pending} name="personal_access_token">+ <FieldLabel>+ {t(($) => $[`${I18N_PREFIX}.personalAccessToken`], { ns: 'app' })}+ </FieldLabel>+ <Input+ autoComplete="off"+ defaultValue={payload?.personal_access_token ?? ''}+ placeholder={t(($) => $[`${I18N_PREFIX}.placeholder`], {+ ns: 'app',+ key: t(($) => $[`${I18N_PREFIX}.personalAccessToken`], { ns: 'app' }),+ })}+ />+ <FieldError />+ </Field>+ </>+ )}+ </div>+ {saveError && (+ <p role="alert" className="mt-4 system-sm-regular text-text-destructive">+ {saveError.message}+ </p>+ )}+ </DialogBody>+ <DialogFooter>+ <a+ className="me-auto flex items-center space-x-1 text-xs leading-4.5 font-normal text-primary-600"+ target="_blank"+ href={tracingProviders[type].docUrl}+ >+ <span>+ {t(($) => $[`${I18N_PREFIX}.viewDocsLink`], {+ ns: 'app',+ key: t(($) => $[`tracing.${type}.title`], { ns: 'app' }),+ })}+ </span>+ <span aria-hidden className="i-custom-vender-line-general-link-external-02 size-3" />+ </a>+ {isEdit && (+ <>+ <AlertDialog+ onOpenChange={(open, details) => {+ if (!open && removeConfig.isPending) details.cancel()+ }}+ >+ <AlertDialogTrigger render={<Button tone="destructive" disabled={pending} />}>+ {t(($) => $['operation.remove'], { ns: 'common' })}+ </AlertDialogTrigger>+ <AlertDialogContent backdropProps={{ forceRender: true }}>+ <AlertDialogHeader>+ <AlertDialogTitle>+ {t(($) => $[`${I18N_PREFIX}.removeConfirmTitle`], {+ ns: 'app',+ key: t(($) => $[`tracing.${type}.title`], { ns: 'app' }),+ })}+ </AlertDialogTitle>+ <AlertDialogDescription>+ {t(+ ($) =>+ $[+ `${I18N_PREFIX}.${inUse ? 'removeConfirmContentInUse' : 'removeConfirmContentNotInUse'}`+ ],+ { ns: 'app', key: t(($) => $[`tracing.${type}.title`], { ns: 'app' }) },+ )}+ </AlertDialogDescription>+ </AlertDialogHeader>+ {removeConfig.error && (+ <p role="alert" className="px-6 system-sm-regular text-text-destructive">+ {removeConfig.error.message}+ </p>+ )}+ <AlertDialogFooter>+ <AlertDialogCancelButton disabled={removeConfig.isPending}>+ {t(($) => $['operation.cancel'], { ns: 'common' })}+ </AlertDialogCancelButton>+ <AlertDialogConfirmButton onClick={handleRemove} loading={pending}>+ {t(($) => $['operation.remove'], { ns: 'common' })}+ </AlertDialogConfirmButton>+ </AlertDialogFooter>+ </AlertDialogContent>+ </AlertDialog>+ <Separator orientation="vertical" className="mx-1 h-4.5" />+ </>+ )}+ <DialogClose disabled={pending} render={<Button />}>+ {t(($) => $['operation.cancel'], { ns: 'common' })}+ </DialogClose>+ <Button variant="primary" type="submit" loading={pending}>+ {t(($) => $[`operation.${isEdit ? 'save' : 'saveAndEnable'}`], {+ ns: 'common',+ })}+ </Button>+ </DialogFooter>+ <EncryptedBottom+ front={t(($) => $['modelProvider.encrypted.front'], { ns: 'modelProvider' })}+ back={t(($) => $['modelProvider.encrypted.back'], { ns: 'modelProvider' })}+ />+ </Form>+ </>+ )+}diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/provider-panel.tsx b/web/app/components/app/tracing/provider-panel.tsxsimilarity index 62%rename from web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/provider-panel.tsxrename to web/app/components/app/tracing/provider-panel.tsxindex 8825e15db35..2c8df2a8ffd 100644--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/provider-panel.tsx+++ b/web/app/components/app/tracing/provider-panel.tsx@@ -1,12 +1,17 @@'use client'import type { TraceAppConfigResponse } from '@dify/contracts/api/console/apps/types.gen'-import type { FC } from 'react'+import type { ConfigurableTracingProvider } from './providers'+import type { TracingResource } from './resource'import { Button, buttonVariants } from '@langgenius/dify-ui/button'import { cn } from '@langgenius/dify-ui/cn'import { DialogTrigger } from '@langgenius/dify-ui/dialog'-import * as React from 'react'+import { RadioItem } from '@langgenius/dify-ui/radio-group'+import { useQuery } from '@tanstack/react-query'import { useTranslation } from 'react-i18next'-import { TracingProvider } from './type'+import { systemFeaturesQueryOptions } from '@/features/system-features/client'+import { ProviderCapabilities } from './provider-capabilities'+import { tracingProviders } from './providers'+import { usesAgentTracePipeline } from './resource'const I18N_PREFIX = 'tracing'@@ -15,33 +20,31 @@ export type ProviderConfigError = {isRetrying: boolean}-type Props = Readonly<{- type: TracingProvider+type ProviderPanelProps = {+ resource: TracingResource+ type: ConfigurableTracingProviderreadOnly: boolean+ pending: booleanisChosen: booleanconfig: TraceAppConfigResponse['tracing_config']configError?: ProviderConfigError- onChoose: () => void-}>--const getIconClassName = (type: TracingProvider) => {- return {- [TracingProvider.arize]: 'i-custom-public-tracing-arize-icon-big w-27.75',- [TracingProvider.phoenix]: 'i-custom-public-tracing-phoenix-icon-big w-27.75',- [TracingProvider.langSmith]: 'i-custom-public-tracing-langsmith-icon-big w-31',- [TracingProvider.langfuse]: 'i-custom-public-tracing-langfuse-icon-big w-27.75',- [TracingProvider.opik]: 'i-custom-public-tracing-opik-icon-big w-[70.700851px]',- [TracingProvider.weave]: 'i-custom-public-tracing-weave-icon-big w-31',- [TracingProvider.aliyun]: 'i-custom-public-tracing-aliyun-icon-big w-24',- [TracingProvider.mlflow]: 'i-custom-public-tracing-mlflow-icon-big w-16.25',- [TracingProvider.databricks]: 'i-custom-public-tracing-databricks-icon-big w-37.5',- [TracingProvider.tencent]: 'i-custom-public-tracing-tencent-icon-big w-30',- }[type]}-const ProviderPanel: FC<Props> = ({ type, readOnly, isChosen, config, configError, onChoose }) => {+export function ProviderPanel({+ resource,+ type,+ readOnly,+ pending,+ isChosen,+ config,+ configError,+}: ProviderPanelProps) {const { t } = useTranslation(['app', 'common'])- const iconClassName = getIconClassName(type)+ const { data: agentTracingEnabled } = useQuery({+ ...systemFeaturesQueryOptions(),+ select: (features) => features.agent_tracing_api_collection_enabled,+ })+ const iconClassName = tracingProviders[type].panelIconconst hasConfigured = !!configreturn (@@ -56,21 +59,19 @@ const ProviderPanel: FC<Props> = ({ type, readOnly, isChosen, config, configErroaria-label={t(($) => $[`${I18N_PREFIX}.${type}.title`], { ns: 'app' })}>{hasConfigured && !configError && !readOnly && (- <button- type="button"+ <RadioItem<ConfigurableTracingProvider>+ nativeButton+ value={type}aria-label={t(($) => $[`${I18N_PREFIX}.${type}.title`], { ns: 'app' })}- aria-pressed={isChosen}- className="absolute inset-0 cursor-pointer rounded-xl focus-visible:ring-2 focus-visible:ring-state-accent-solid focus-visible:outline-hidden"- onClick={() => {- if (!isChosen) onChoose()- }}+ render={<Button variant="ghost" />}+ className="absolute inset-0 h-auto w-full cursor-pointer rounded-xl p-0 hover:bg-transparent"/>)}<div className="flex items-center justify-between space-x-1"><div className="flex items-center"><span aria-hidden className={cn(iconClassName, 'h-6')} />{isChosen && (- <div className="ml-1 flex h-4 items-center rounded-sm border border-text-accent-secondary px-1 system-2xs-medium-uppercase text-text-accent-secondary">+ <div className="ml-1 flex min-w-4.5 items-center justify-center rounded-[5px] bg-components-badge-bg-dimm px-1.25 py-0.75 system-2xs-medium-uppercase text-text-accent inset-ring-1 inset-ring-text-accent">{t(($) => $[`${I18N_PREFIX}.inUse`], { ns: 'app' })}</div>)}@@ -95,8 +96,8 @@ const ProviderPanel: FC<Props> = ({ type, readOnly, isChosen, config, configErro{t(($) => $[`${I18N_PREFIX}.view`], { ns: 'app' })}</a>)}- <DialogTrigger payload={type} render={<Button size="small" />}>- <span aria-hidden className="i-ri-equalizer-2-line size-3" />+ <DialogTrigger payload={type} render={<Button size="small" disabled={pending} />}>+ <span aria-hidden className="i-ri-equalizer-2-line size-3.5" />{t(($) => $[`${I18N_PREFIX}.config`], { ns: 'app' })}</DialogTrigger></div>@@ -106,7 +107,12 @@ const ProviderPanel: FC<Props> = ({ type, readOnly, isChosen, config, configErro<div className="mt-2 system-xs-regular text-text-tertiary">{t(($) => $[`${I18N_PREFIX}.${type}.description`], { ns: 'app' })}</div>+ {isChosen && usesAgentTracePipeline(resource) && agentTracingEnabled && (+ // Sits above the card-wide selection button, like the card actions.+ <div className="relative">+ <ProviderCapabilities resource={resource} provider={type} />+ </div>+ )}</div>)}-export default React.memo(ProviderPanel)diff --git a/web/app/components/app/tracing/providers.ts b/web/app/components/app/tracing/providers.tsnew file mode 100644index 00000000000..747f22cd4c2--- /dev/null+++ b/web/app/components/app/tracing/providers.ts@@ -0,0 +1,69 @@+import type { TraceConfigPayload } from '@dify/contracts/api/console/apps/types.gen'++export const tracingProviders = {+ langfuse: {+ docUrl: 'https://docs.langfuse.com',+ icon: 'i-custom-public-tracing-langfuse-icon w-18.5',+ panelIcon: 'i-custom-public-tracing-langfuse-icon-big w-27.75',+ },+ langsmith: {+ docUrl: 'https://docs.smith.langchain.com/',+ icon: 'i-custom-public-tracing-langsmith-icon w-21',+ panelIcon: 'i-custom-public-tracing-langsmith-icon-big w-31',+ },+ opik: {+ docUrl: 'https://www.comet.com/docs/opik/integrations/dify',+ icon: 'i-custom-public-tracing-opik-icon w-[47.133904px]',+ panelIcon: 'i-custom-public-tracing-opik-icon-big w-[70.700851px]',+ },+ mlflow: {+ docUrl: 'https://mlflow.org/docs/latest/genai/',+ icon: 'i-custom-public-tracing-mlflow-icon w-11',+ panelIcon: 'i-custom-public-tracing-mlflow-icon-big w-16.25',+ },+ databricks: {+ docUrl: 'https://docs.databricks.com/aws/en/mlflow3/genai/tracing/',+ icon: 'i-custom-public-tracing-databricks-icon w-25',+ panelIcon: 'i-custom-public-tracing-databricks-icon-big w-37.5',+ },+ weave: {+ docUrl: 'https://weave-docs.wandb.ai/',+ icon: 'i-custom-public-tracing-weave-icon w-30',+ panelIcon: 'i-custom-public-tracing-weave-icon-big w-31',+ },+ arize: {+ docUrl: 'https://docs.arize.com/arize',+ icon: 'i-custom-public-tracing-arize-icon w-18.5',+ panelIcon: 'i-custom-public-tracing-arize-icon-big w-27.75',+ },+ phoenix: {+ docUrl: 'https://docs.arize.com/phoenix',+ icon: 'i-custom-public-tracing-phoenix-icon w-18.5',+ panelIcon: 'i-custom-public-tracing-phoenix-icon-big w-27.75',+ },+ aliyun: {+ docUrl: 'https://help.aliyun.com/zh/arms/tracing-analysis/untitled-document-1750672984680',+ icon: 'i-custom-public-tracing-aliyun-icon w-16.25',+ panelIcon: 'i-custom-public-tracing-aliyun-icon-big w-24',+ },+ tencent: {+ docUrl: 'https://cloud.tencent.com/document/product/248/116531',+ icon: 'i-custom-public-tracing-tencent-icon w-20',+ panelIcon: 'i-custom-public-tracing-tencent-icon-big w-30',+ },+} as const satisfies Partial<+ Record<+ TraceConfigPayload['tracing_provider'],+ { docUrl: string; icon: string; panelIcon: string }+ >+>++export type ConfigurableTracingProvider = keyof typeof tracingProviders++export function hasProviderForm(+ provider: TraceConfigPayload['tracing_provider'] | null | undefined,+): provider is ConfigurableTracingProvider {+ return provider != null && Object.hasOwn(tracingProviders, provider)+}++export const configurableProviders = Object.keys(tracingProviders).filter(hasProviderForm)diff --git a/web/app/components/app/tracing/query-params.ts b/web/app/components/app/tracing/query-params.tsnew file mode 100644index 00000000000..addadfbe579--- /dev/null+++ b/web/app/components/app/tracing/query-params.ts@@ -0,0 +1,5 @@+import { parseAsStringLiteral } from 'nuqs'++export const tracingQueryParamName = 'tracing'++export const tracingQueryParser = parseAsStringLiteral(['configure'])diff --git a/web/app/components/app/tracing/resource.ts b/web/app/components/app/tracing/resource.tsnew file mode 100644index 00000000000..e9ea20dc860--- /dev/null+++ b/web/app/components/app/tracing/resource.ts@@ -0,0 +1,12 @@+import type { AppMode } from '@dify/contracts/api/console/apps/types.gen'++export type TracingResource =+ | { kind: 'app'; appId: string; mode: AppMode }+ | { kind: 'agent'; agentId: string }++/** Resources on the Agent trace pipeline, where capture policy and provider capabilities apply. */+export function usesAgentTracePipeline(resource: TracingResource) {+ return (+ resource.kind === 'agent' || resource.mode === 'workflow' || resource.mode === 'advanced-chat'+ )+}diff --git a/web/app/components/app/tracing/summary-disclosure.tsx b/web/app/components/app/tracing/summary-disclosure.tsxnew file mode 100644index 00000000000..07cb6b64183--- /dev/null+++ b/web/app/components/app/tracing/summary-disclosure.tsx@@ -0,0 +1,22 @@+import type { ReactNode } from 'react'+import { CollapsibleTrigger } from '@langgenius/dify-ui/collapsible'++/** One-line disclosure for secondary tracing details, optionally with its state on the right. */+export function SummaryDisclosureTrigger({+ label,+ summary,+}: {+ label: ReactNode+ summary?: string+}) {+ return (+ <CollapsibleTrigger className="group flex w-full items-center gap-2 rounded-md py-0.5 text-left system-xs-medium text-text-tertiary hover:text-text-secondary">+ <span className="min-w-0 flex-1">{label}</span>+ {summary ? <span className="shrink-0 system-xs-regular">{summary}</span> : null}+ <span+ aria-hidden+ className="i-ri-arrow-down-s-line size-4 shrink-0 transition-transform group-data-panel-open:rotate-180 motion-reduce:transition-none"+ />+ </CollapsibleTrigger>+ )+}diff --git a/web/app/components/app/tracing/trace-policy.tsx b/web/app/components/app/tracing/trace-policy.tsxnew file mode 100644index 00000000000..1c4bd2935e5--- /dev/null+++ b/web/app/components/app/tracing/trace-policy.tsx@@ -0,0 +1,69 @@+import type { AppTracePayload, AppTraceResponse } from '@dify/contracts/api/console/apps/types.gen'+import { Collapsible, CollapsiblePanel } from '@langgenius/dify-ui/collapsible'+import { Field, FieldDescription, FieldLabel } from '@langgenius/dify-ui/field'+import { Fieldset, FieldsetLegend } from '@langgenius/dify-ui/fieldset'+import { Switch } from '@langgenius/dify-ui/switch'+import { useTranslation } from 'react-i18next'+import { SummaryDisclosureTrigger } from './summary-disclosure'++const policyFields = [+ {+ name: 'capture_content',+ label: 'tracing.captureContent',+ description: 'tracing.captureContentDescription',+ },+ {+ name: 'capture_agent',+ label: 'tracing.captureAgent',+ description: 'tracing.captureAgentDescription',+ },+] as const++/** Capture settings of the resource that owns the Agent trace pipeline, collapsed until opened. */+export function TracePolicy({+ policy,+ readOnly,+ onChange,+}: {+ policy?: AppTraceResponse+ readOnly: boolean+ onChange: (changes: Partial<AppTracePayload>) => Promise<void>+}) {+ const { t } = useTranslation(['app'])+ const title = t(($) => $['tracing.captureTitle'], { ns: 'app' })+ // Backend defaults until the policy is known.+ const values = {+ capture_content: policy?.capture_content ?? false,+ capture_agent: policy?.capture_agent ?? true,+ }++ return (+ <Collapsible>+ <SummaryDisclosureTrigger label={title} />+ <CollapsiblePanel>+ <Fieldset className="pt-1">+ <FieldsetLegend className="sr-only">{title}</FieldsetLegend>+ {policyFields.map(({ name, label, description }) => (+ <Field key={name} className="flex flex-row items-center justify-between gap-4 py-1.5">+ <div className="min-w-0">+ <FieldLabel className="system-sm-regular text-text-secondary">+ {t(($) => $[label], { ns: 'app' })}+ </FieldLabel>+ <FieldDescription className="system-xs-regular text-text-tertiary">+ {t(($) => $[description], { ns: 'app' })}+ </FieldDescription>+ </div>+ <Switch+ readOnly={readOnly}+ checked={values[name]}+ onCheckedChange={(checked) => {+ void onChange({ [name]: checked }).catch(() => {})+ }}+ />+ </Field>+ ))}+ </Fieldset>+ </CollapsiblePanel>+ </Collapsible>+ )+}diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/tracing-icon.tsx b/web/app/components/app/tracing/tracing-icon.tsxsimilarity index 56%rename from web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/tracing-icon.tsxrename to web/app/components/app/tracing/tracing-icon.tsxindex 129e1e67fd7..122edd1a0dc 100644--- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/tracing-icon.tsx+++ b/web/app/components/app/tracing/tracing-icon.tsx@@ -1,24 +1,21 @@'use client'-import type { FC } from 'react'import { cn } from '@langgenius/dify-ui/cn'-import * as React from 'react'-type Props = Readonly<{+type TracingIconProps = {className?: stringsize: 'lg' | 'md'-}>+}const sizeClassMap = {lg: 'w-9 h-9 p-2 rounded-[10px]',md: 'w-6 h-6 p-1 rounded-lg',}-const TracingIcon: FC<Props> = ({ className, size }) => {+export function TracingIcon({ className, size }: TracingIconProps) {const sizeClass = sizeClassMap[size]return (- <div className={cn(className, sizeClass, 'bg-primary-500 shadow-md')}>+ <div className={cn(sizeClass, 'bg-primary-500 shadow-md', className)}><span aria-hidden className="i-custom-public-tracing-tracing-icon size-full" /></div>)}-export default React.memo(TracingIcon)diff --git a/web/app/components/base/chat/chat-with-history/__tests__/chat-wrapper.spec.tsx b/web/app/components/base/chat/chat-with-history/__tests__/chat-wrapper.spec.tsxindex d6ebfe9a97b..6e753ffcfc7 100644--- a/web/app/components/base/chat/chat-with-history/__tests__/chat-wrapper.spec.tsx+++ b/web/app/components/base/chat/chat-with-history/__tests__/chat-wrapper.spec.tsx@@ -290,7 +290,7 @@ it.each(['button', 'chat instance'] as const)(})if (action === 'button')await user.click(screen.getByRole('button', { name: /appDebug.operation.stopResponding/i }))- else act(() => context.currentChatInstanceRef.current.handleStop())+ else await act(async () => context.currentChatInstanceRef.current.handleStop())expect(stopChatMessageResponding).toHaveBeenCalledExactlyOnceWith('','task-123',diff --git a/web/app/components/base/chat/chat/answer/index.tsx b/web/app/components/base/chat/chat/answer/index.tsxindex 0a73362a2e5..04c6f2f79a2 100644--- a/web/app/components/base/chat/chat/answer/index.tsx+++ b/web/app/components/base/chat/chat/answer/index.tsx@@ -24,6 +24,7 @@ import SuggestedQuestions from './suggested-questions'import WorkflowProcessItem from './workflow-process'type AnswerProps = {+ footer?: ReactNodeanswerActionPosition?: AnswerActionPositionitem: ChatItemquestion: string@@ -45,6 +46,7 @@ type AnswerProps = {onHumanInputFormSubmit?: (formToken: string, formData: HumanInputFormSubmitData) => Promise<void>}const Answer: FC<AnswerProps> = ({+ footer,answerActionPosition,item,question,@@ -61,7 +63,7 @@ const Answer: FC<AnswerProps> = ({renderAgentContent,onHumanInputFormSubmit,}) => {- const { t } = useTranslation(['appAnnotation'])+ const { t } = useTranslation(['appAnnotation', 'common'])const {content,citation,@@ -394,6 +396,12 @@ const Answer: FC<AnswerProps> = ({</div>)}<More more={more} />+ {item.isError && (+ <p role="alert" className="system-sm-regular text-text-destructive">+ {t(($) => $['api.actionFailed'], { ns: 'common' })}+ </p>+ )}+ {footer}</div></div>)diff --git a/web/app/components/base/chat/chat/chat-input-area/__tests__/index.spec.tsx b/web/app/components/base/chat/chat/chat-input-area/__tests__/index.spec.tsxindex 9ceb050a100..419789bc2e5 100644--- a/web/app/components/base/chat/chat/chat-input-area/__tests__/index.spec.tsx+++ b/web/app/components/base/chat/chat/chat-input-area/__tests__/index.spec.tsx@@ -183,7 +183,7 @@ describe('ChatInputArea', () => {expect(getTextarea()!).toHaveAttribute('placeholder', expect.stringContaining('TestBot'))})- it('keeps a visible label for the input after typing', async () => {+ it('keeps the accessible name for the input after typing', async () => {const user = userEvent.setup()render(<ChatInputArea@@ -197,7 +197,7 @@ describe('ChatInputArea', () => {await user.type(input, 'A research assistant')expect(input).toHaveValue('A research assistant')- expect(screen.getByText('Describe your agent')).toBeVisible()+ expect(input).toHaveAccessibleName('Describe your agent')})it('should fall back to the readonly placeholder when readonly has a custom placeholder', () => {diff --git a/web/app/components/base/chat/chat/chat-input-area/index.tsx b/web/app/components/base/chat/chat/chat-input-area/index.tsxindex 95badfa8311..f0a66ba6fd4 100644--- a/web/app/components/base/chat/chat/chat-input-area/index.tsx+++ b/web/app/components/base/chat/chat/chat-input-area/index.tsx@@ -322,19 +322,8 @@ const ChatInputArea = ({<FileListInChatInput fileConfig={visionConfig!} /></div><div className="relative max-h-39.5 overflow-x-hidden overflow-y-auto px-2.25">- <div- ref={wrapperRef}- className={cn(- 'flex items-center justify-between',- inputLabel && 'max-sm:flex-col max-sm:items-stretch',- )}- >- <div- className={cn(- 'relative flex w-full grow items-center',- inputLabel && 'flex-col items-stretch',- )}- >+ <div ref={wrapperRef} className="flex items-center justify-between">+ <div className="relative flex w-full grow items-center"><divref={textValueRef}className="pointer-events-none invisible absolute size-auto p-1 body-lg-regular leading-6 whitespace-pre"@@ -342,10 +331,7 @@ const ChatInputArea = ({{query}</div>{inputLabel && (- <label- htmlFor={textareaId}- className="px-1 py-1 system-xs-medium text-text-secondary"- >+ <label htmlFor={textareaId} className="sr-only">{inputLabel}</label>)}@@ -385,12 +371,7 @@ const ChatInputArea = ({disabled={disabled}/></div>- {!isMultipleLine &&- (inputLabel ? (- <div className="max-sm:flex max-sm:justify-end">{operation}</div>- ) : (- operation- ))}+ {!isMultipleLine && operation}</div></div>{showVoiceInput && speechToTextTarget && (diff --git a/web/app/components/base/chat/chat/hooks.ts b/web/app/components/base/chat/chat/hooks.tsindex 8bee70634d5..e6d7a439973 100644--- a/web/app/components/base/chat/chat/hooks.ts+++ b/web/app/components/base/chat/chat/hooks.ts@@ -46,6 +46,7 @@ type HistoryMessageFile = Partial<FileResponse> & {type HistoryConversationMessage = {id: stringanswer?: string+ status?: stringmessage?: { role: string; text: string; files?: FileEntity[] }[]message_files?: HistoryMessageFile[]agent_thoughts?: ThoughtItem[] | null@@ -219,7 +220,7 @@ export const useChat = (initialConversationId?: string,options: UseChatOptions = {},) => {- const { t } = useTranslation(['appDebug'])+ const { t } = useTranslation(['appDebug', 'common'])const { formatTime } = useTimestamp({ timezone: options.timezone })const conversationIdRef = useRef(initialConversationId ?? '')const initialConversationIdRef = useRef(initialConversationId ?? '')@@ -227,6 +228,7 @@ export const useChat = (const [isResponding, setIsResponding] = useState(false)const isRespondingRef = useRef(false)const taskIdRef = useRef('')+ const stopPendingRef = useRef<number | null>(null)const pausedStateRef = useRef(false)const [suggestedQuestions, setSuggestedQuestions] = useState<string[]>([])const conversationMessagesAbortControllerRef = useRef<AbortController | null>(null)@@ -545,10 +547,42 @@ export const useChat = (useEffect(() => resetWorkflowEventsSubscription, [resetWorkflowEventsSubscription])- const handleStop = useCallback(() => {+ const stopLocalResponse = useCallback(() => {hasStopRespondedRef.current = truehandleResponding(false)- if (stopChat && taskIdRef.current && !pausedStateRef.current) {+ if (conversationMessagesAbortControllerRef.current)+ conversationMessagesAbortControllerRef.current.abort()+ if (suggestedQuestionsAbortControllerRef.current)+ suggestedQuestionsAbortControllerRef.current.abort()+ if (workflowEventsAbortControllerRef.current) workflowEventsAbortControllerRef.current.abort()+ resetWorkflowEventsSubscription()+ }, [handleResponding, resetWorkflowEventsSubscription])++ const handleStop = useCallback(async () => {+ if (options.isNewAgent && isRespondingRef.current) {+ const generation = workflowRequestGenerationRef.current+ if (stopPendingRef.current === generation) return+ const taskId = taskIdRef.current+ if (!stopChat || !taskId) {+ toast.error(+ `${t(($) => $['operation.stopResponding'], { ns: 'appDebug' })}: ${t(($) => $['api.actionFailed'], { ns: 'common' })}`,+ )+ return+ }+ stopPendingRef.current = generation+ try {+ await stopChat(taskId)+ } catch {+ toast.error(+ `${t(($) => $['operation.stopResponding'], { ns: 'appDebug' })}: ${t(($) => $['api.actionFailed'], { ns: 'common' })}`,+ )+ return+ } finally {+ if (stopPendingRef.current === generation) stopPendingRef.current = null+ }+ if (generation !== workflowRequestGenerationRef.current) return+ }+ if (!options.isNewAgent && stopChat && taskIdRef.current && !pausedStateRef.current) {void (async () => {try {await stopChat(taskIdRef.current)@@ -557,24 +591,20 @@ export const useChat = (}})()}- if (conversationMessagesAbortControllerRef.current)- conversationMessagesAbortControllerRef.current.abort()- if (suggestedQuestionsAbortControllerRef.current)- suggestedQuestionsAbortControllerRef.current.abort()- if (workflowEventsAbortControllerRef.current) workflowEventsAbortControllerRef.current.abort()- resetWorkflowEventsSubscription()- }, [stopChat, handleResponding, resetWorkflowEventsSubscription])+ stopLocalResponse()+ return true+ }, [stopChat, stopLocalResponse, options.isNewAgent, t])const handleRestart = useCallback((cb?: () => void) => {conversationIdRef.current = initialConversationIdRef.currenttaskIdRef.current = ''- handleStop()+ stopLocalResponse()setChatTree([])setSuggestedQuestions([])cb?.()},- [handleStop],+ [stopLocalResponse],)const createAudioPlayerManager = useCallback(() => {@@ -1087,6 +1117,7 @@ export const useChat = (return false}+ taskIdRef.current = ''pausedStateRef.current = falseresetWorkflowEventsSubscription()const requestGeneration = ++workflowRequestGenerationRef.current@@ -1214,7 +1245,7 @@ export const useChat = (if (isFirstMessage && newConversationId) conversationIdRef.current = newConversationId- taskIdRef.current = taskId+ if (taskId) taskIdRef.current = taskIdif (messageId) responseItem.id = messageIdupdateCurrentQAOnTree({@@ -1245,7 +1276,7 @@ export const useChat = (handleResponding(false)try {- if (hasError) return+ if (hasError && !options.isNewAgent) returnlet completedWorkflowRunId = responseItem.workflow_run_id@@ -1289,6 +1320,9 @@ export const useChat = (const historyAnswerFiles = getHistoryAnswerFiles(newResponseItem)updateChatTreeNode(responseItem.id, {content: isUseAgentThought ? '' : historyAnswer,+ isError:+ options.isNewAgent &&+ (newResponseItem.status === 'error' || (!!hasError && !newResponseItem.status)),agent_thoughts: historyAgentThoughts,agent_response_parts: undefined,citation: newResponseItem.retriever_resources,@@ -1333,6 +1367,7 @@ export const useChat = (if (isCurrentRequest() &&+ !hasError &&config?.suggested_questions_after_answer?.enabled &&!hasStopRespondedRef.current &&onGetSuggestedQuestions@@ -1423,6 +1458,8 @@ export const useChat = (},onThought(thought) {isAgentMode = true+ if (thought.task_id) taskIdRef.current = thought.task_id+ if (thought.conversation_id) conversationIdRef.current = thought.conversation_idconst response = responseItem as anyif (thought.message_id && !hasSetResponseId) response.id = thought.message_idif (thought.conversation_id) response.conversationId = thought.conversation_id@@ -1475,9 +1512,17 @@ export const useChat = (onMessageReplace: (messageReplace) => {responseItem.content = messageReplace.answer},- onError() {+ onError(_message, _code, identity) {if (requestGeneration !== workflowRequestGenerationRef.current) return+ if (identity?.conversationId) conversationIdRef.current = identity.conversationId+ if (identity?.messageId) {+ responseItem.id = identity.messageId+ questionItem.id = `question-${identity.messageId}`+ responseItem.parentMessageId = questionItem.id+ }+ if (options.isNewAgent && hasStopRespondedRef.current) return+ if (options.isNewAgent) responseItem.isError = truehandleResponding(false)settleSend(true)updateCurrentQAOnTree({diff --git a/web/app/components/base/chat/chat/index.tsx b/web/app/components/base/chat/chat/index.tsxindex 9996d21a6a0..1c6049fe932 100644--- a/web/app/components/base/chat/chat/index.tsx+++ b/web/app/components/base/chat/chat/index.tsx@@ -79,6 +79,7 @@ export type ChatProps = {sendOnEnter?: booleanspeechToTextTarget?: SpeechToTextTargetonBeforeSpeechToText?: () => Promise<unknown>+ renderMessageFooter?: (item: ChatItem) => ReactNoderenderAgentContent?: (props: {item: ChatItemresponding?: boolean@@ -142,6 +143,7 @@ const Chat: FC<ChatProps> = ({speechToTextTarget,onBeforeSpeechToText,renderAgentContent,+ renderMessageFooter,onHumanInputFormSubmit,getHumanInputNodeData,}) => {@@ -241,6 +243,7 @@ const Chat: FC<ChatProps> = ({switchSibling={switchSibling}hideAvatar={hideAvatar}renderAgentContent={renderAgentContent}+ footer={renderMessageFooter?.(item)}onHumanInputFormSubmit={onHumanInputFormSubmit}/>)diff --git a/web/app/components/base/chat/chat/type.ts b/web/app/components/base/chat/chat/type.tsindex 862b1432e0f..da383186f75 100644--- a/web/app/components/base/chat/chat/type.ts+++ b/web/app/components/base/chat/chat/type.ts@@ -27,6 +27,7 @@ export type ToolInfoInThought = {}export type ThoughtItem = {+ task_id?: stringid: stringtool: string // plugin or dataset. May has multi.thought: string@@ -84,6 +85,7 @@ type SubmittedHumanInputExtraContent = {export type ExtraContent = PendingHumanInputExtraContent | SubmittedHumanInputExtraContentexport type IChatItem = {+ isError?: booleanid: stringcontent: stringcitation?: CitationItem[]diff --git a/web/app/components/base/chip/index.tsx b/web/app/components/base/chip/index.tsxindex dfc63f41157..ff1a450b152 100644--- a/web/app/components/base/chip/index.tsx+++ b/web/app/components/base/chip/index.tsx@@ -24,6 +24,7 @@ export type Item<T extends ItemValue = ItemValue> = {type Props<T extends ItemValue> = {id?: stringdisabled?: boolean+ label?: string'aria-labelledby'?: stringclassName?: stringpanelClassName?: string@@ -39,6 +40,7 @@ type Props<T extends ItemValue> = {function Chip<T extends ItemValue>({id,disabled = false,+ label,'aria-labelledby': ariaLabelledBy,className,panelClassName,@@ -53,9 +55,10 @@ function Chip<T extends ItemValue>({const { t } = useTranslation(['common'])const selectedItem = items.find((item) => Object.is(item.value, value))const triggerContent = selectedItem?.triggerName || selectedItem?.name || ''+ const triggerLabel = [label, triggerContent].filter(Boolean).join(' ')const hasValue = selectedItem !== undefined && value !== ''- const clearLabel = triggerContent- ? `${t(($) => $['operation.clear'], { ns: 'common' })} ${triggerContent}`+ const clearLabel = triggerLabel+ ? `${t(($) => $['operation.clear'], { ns: 'common' })} ${triggerLabel}`: t(($) => $['operation.clear'], { ns: 'common' })return (@@ -79,7 +82,7 @@ function Chip<T extends ItemValue>({aria-label={ariaLabelledBy? undefined- : triggerContent || t(($) => $['placeholder.select'], { ns: 'common' })+ : triggerLabel || t(($) => $['placeholder.select'], { ns: 'common' })}className={cn('h-auto min-h-8 w-fit max-w-full cursor-pointer items-center rounded-lg border-[0.5px] border-transparent bg-components-input-bg-normal px-2 py-1 hover:bg-state-base-hover-alt data-popup-open:bg-state-base-hover-alt! data-popup-open:hover:bg-state-base-hover-alt [&>*:last-child]:hidden',@@ -102,11 +105,20 @@ function Chip<T extends ItemValue>({)}</span>)}- <span className="flex grow items-center gap-0.5 first-line:p-1">+ <span+ className={cn(+ 'flex min-w-0 grow items-center gap-0.5 first-line:p-1',+ label && 'gap-1 px-1',+ )}+ >+ {label && (+ <span className="shrink-0 system-sm-regular text-text-tertiary">{label}</span>+ )}<spanclassName={cn('system-sm-regular text-text-tertiary',hasValue && 'text-text-secondary',+ label && 'truncate system-sm-medium',)}>{triggerContent}diff --git a/web/app/components/workflow-app/components/__tests__/workflow-panel.spec.tsx b/web/app/components/workflow-app/components/__tests__/workflow-panel.spec.tsxindex 644a13e4dca..73504d3bcd9 100644--- a/web/app/components/workflow-app/components/__tests__/workflow-panel.spec.tsx+++ b/web/app/components/workflow-app/components/__tests__/workflow-panel.spec.tsx@@ -1,4 +1,5 @@import type { Shape } from '@/app/components/workflow/store/workflow'+import type { consoleClient } from '@/service/console'import type { fetchRunDetail, fetchTracingList } from '@/service/log'import type { FetchWorkflowDraftPageResponse, FetchWorkflowDraftResponse } from '@/types/workflow'import { act, screen, waitFor, within } from '@testing-library/react'@@ -20,6 +21,7 @@ import { renderWorkflowEditor } from '@/test/workflow-editor'import WorkflowPanel from '../workflow-panel'const api = vi.hoisted(() => ({+ externalTrace: vi.fn<typeof consoleClient.apps.byAppId.traceRuns.bySourceKind.bySourceId.get>(),run: vi.fn<typeof fetchRunDetail>(),tracing: vi.fn<typeof fetchTracingList>(),history: vi.fn<(url: string, options?: unknown) => Promise<FetchWorkflowDraftPageResponse>>(),@@ -54,6 +56,7 @@ vi.mock('@/service/console', async (importOriginal) => {consoleQuery: withConsoleResponses(actual.consoleQuery, {'apps.byAppId.workflows.byWorkflowId.patch': api.update,'apps.byAppId.workflows.byWorkflowId.delete': api.remove,+ 'apps.byAppId.traceRuns.bySourceKind.bySourceId.get': (input) => api.externalTrace(input),'workspaces.current.agentProviders.get': async () => [],'apps.byAppId.workflows.draft.environmentVariables.get': async () => ({ items: [] }),}),@@ -143,6 +146,13 @@ function setup(}let originalUrl: stringbeforeEach(() => {+ api.externalTrace.mockReset().mockResolvedValue({+ status: 'accepted',+ source_kind: 'workflow',+ source_id: 'run-1',+ provider: 'langfuse',+ trace_url: 'https://cloud.langfuse.com/trace/run-1',+ })originalUrl = window.location.hrefwindow.history.replaceState({}, '', '/app/app-123/workflow')versions = [version()]@@ -264,6 +274,13 @@ it('reopens a closed message log on its default detail tab', async () => {'true',)expect(api.run).toHaveBeenCalledWith('/apps/app-123/workflow-runs/run-1')+ expect(await screen.findByRole('link', { name: 'app.tracing.run.viewTrace' })).toHaveAttribute(+ 'href',+ 'https://cloud.langfuse.com/trace/run-1',+ )+ expect(api.externalTrace).toHaveBeenCalledWith({+ params: { app_id: 'app-123', source_kind: 'workflow', source_id: 'run-1' },+ })await user.click(screen.getByRole('tab', { name: 'runLog.tracing' }))expect(screen.getByRole('tab', { name: 'runLog.tracing' })).toHaveAttribute('aria-selected',diff --git a/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/__tests__/tracing.spec.tsx b/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/__tests__/tracing.spec.tsxnew file mode 100644index 00000000000..e7dbaacf2a8--- /dev/null+++ b/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/__tests__/tracing.spec.tsx@@ -0,0 +1,86 @@+import type { WorkflowRunNodeExecutionResponse } from '@dify/contracts/api/console/apps/types.gen'+import { screen } from '@testing-library/react'+import { renderEditor as render } from '@/app/components/workflow/editor-resource/__tests__/render'+import LastRun from '../index'++const { request } = vi.hoisted(() => ({+ request:+ vi.fn<(url: string, init: RequestInit, options: { request: Request }) => Promise<Response>>(),+}))++vi.mock('@/service/base', async (importOriginal) => ({+ ...(await importOriginal<typeof import('@/service/base')>()),+ request,+}))++function renderLastRun(execution: WorkflowRunNodeExecutionResponse) {+ const urls: URL[] = []+ request.mockImplementation(async (_url, _init, { request: sent }) => {+ const url = new URL(sent.url)+ urls.push(url)+ if (url.pathname.endsWith('/last-run')) return Response.json(execution)+ if (url.pathname.endsWith(`/trace-runs/node/${execution.id}`)) {+ return Response.json({+ source_kind: 'node',+ source_id: execution.id,+ status: 'accepted',+ provider: 'langfuse',+ span_url: 'https://cloud.langfuse.com/trace/frozen?observation=agent',+ })+ }+ throw new Error(`Unexpected request: ${url}`)+ })++ render(+ <LastRun+ nodeId="node-1"+ canSingleRun+ isRunAfterSingleRun={false}+ updateNodeRunningStatus={vi.fn()}+ onSingleRunClicked={vi.fn()}+ />,+ )+ return urls+}++describe('LastRun external tracing', () => {+ it.each(['succeeded', 'failed'])(+ 'opens the frozen trace for a %s Agent V2 execution returned by the API',+ async (status) => {+ const urls = renderLastRun({+ id: 'execution-1',+ node_id: 'node-1',+ node_type: 'agent',+ status,+ error: status === 'failed' ? 'Agent execution failed' : null,+ process_data: { workflow_agent_binding_id: 'binding-1' },+ extras: {},+ })++ expect(await screen.findByRole('link', { name: 'app.tracing.run.viewSpan' })).toHaveAttribute(+ 'href',+ 'https://cloud.langfuse.com/trace/frozen?observation=agent',+ )+ expect(urls.map((url) => url.pathname)).toEqual([+ expect.stringMatching(/\/apps\/app-1\/workflows\/draft\/nodes\/node-1\/last-run$/),+ expect.stringMatching(/\/apps\/app-1\/trace-runs\/node\/execution-1$/),+ ])+ },+ )++ it('does not query Agent V2 tracing for a legacy Agent execution', async () => {+ const urls = renderLastRun({+ id: 'legacy-execution',+ node_id: 'node-1',+ node_type: 'agent',+ status: 'failed',+ error: 'Legacy Agent failed',+ process_data: {},+ extras: {},+ })++ expect(await screen.findByText('Legacy Agent failed')).toBeVisible()+ expect(screen.queryByRole('link', { name: /app.tracing.run.view/ })).not.toBeInTheDocument()+ expect(urls).toHaveLength(1)+ })+})diff --git a/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/index.tsx b/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/index.tsxindex c9280db598d..8b77d07dc5f 100644--- a/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/index.tsx+++ b/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/index.tsx@@ -8,6 +8,7 @@ import { useAtomValue } from 'jotai'import * as React from 'react'import { useCallback, useEffect, useState } from 'react'import { editorResourceAtom } from '@/app/components/workflow/editor-resource/state'+import { isBoundAgentV2Execution } from '@/app/components/workflow/nodes/agent-v2/execution'import ResultPanel from '@/app/components/workflow/run/result-panel'import { NodeRunningStatus } from '@/app/components/workflow/types'import { isNotFoundError } from '@/service/http-error'@@ -73,6 +74,11 @@ const LastRun: FC<Props> = ({const noLastRun = isNotFoundError(error)const runResult = (canRunLastRun ? lastRunResult : singleRunResult) || lastRunResult || {}+ const lastRunNode = runResult as Partial<NodeTracing>+ const externalTrace =+ resource.kind === 'app' && isBoundAgentV2Execution(lastRunNode) && lastRunNode.id+ ? { appId: resource.appId, kind: 'node' as const, nodeExecutionId: lastRunNode.id }+ : undefinedlet resolvedStatus = (runResult as any).status || otherResultPanelProps.statusif (isPaused || oneStepRunRunningStatus === NodeRunningStatus.Stopped)@@ -156,6 +162,7 @@ const LastRun: FC<Props> = ({}nodeInfo={runResult as NodeTracing}showSteps={false}+ externalTrace={externalTrace}/></div>)diff --git a/web/app/components/workflow/nodes/agent-v2/__tests__/panel-bindings.spec.tsx b/web/app/components/workflow/nodes/agent-v2/__tests__/panel-bindings.spec.tsxindex 1d96bc84387..d813d87f015 100644--- a/web/app/components/workflow/nodes/agent-v2/__tests__/panel-bindings.spec.tsx+++ b/web/app/components/workflow/nodes/agent-v2/__tests__/panel-bindings.spec.tsx@@ -27,6 +27,7 @@ vi.mock('@/service/console', async (importOriginal) => {return {...actual,consoleQuery: withConsoleResponses(actual.consoleQuery, {+ 'apps.byAppId.trace.get': async () => ({ enabled: false, tracing_provider: null }),'apps.byAppId.workflows.draft.nodes.byNodeId.agentComposer.get': api.loadComposer,'snippets.bySnippetId.workflows.draft.nodes.byNodeId.agentComposer.get': api.loadComposer,'apps.byAppId.workflows.draft.nodes.byNodeId.agentComposer.copyFromRoster.post': api.copyApp,diff --git a/web/app/components/workflow/nodes/agent-v2/__tests__/panel.spec.tsx b/web/app/components/workflow/nodes/agent-v2/__tests__/panel.spec.tsxindex e2356241ad0..202c8a34782 100644--- a/web/app/components/workflow/nodes/agent-v2/__tests__/panel.spec.tsx+++ b/web/app/components/workflow/nodes/agent-v2/__tests__/panel.spec.tsx@@ -3,6 +3,12 @@ import userEvent from '@testing-library/user-event'import { replacePromptEditorText } from '@/app/components/base/prompt-editor/plugins/__tests__/test-helpers'import { createData, createPanelEnvironment } from './panel-test-env'+vi.mock('@/app/components/app/tracing/inherited-tracing-summary', () => ({+ InheritedTracingSummary: ({ resource }: { resource: { appId: string } }) => (+ <div data-testid="inherited-tracing">{resource.appId}</div>+ ),+}))+const outputPrefix = 'workflowAgent.nodes.agent.outputVars'const task = () => screen.getByRole('textbox', { name: 'workflowAgent.nodes.agent.task.label' })const outputForm = () => within(screen.getByRole('form', { name: `${outputPrefix}.editorLabel` }))@@ -24,6 +30,17 @@ const openOutputs = async (user: ReturnType<typeof userEvent.setup>) => {}describe('Agent task and declared outputs', () => {+ it('shows the calling workflow tracing summary only inside a workflow app', () => {+ const workflow = createPanelEnvironment({+ resource: { kind: 'app', appId: 'workflow-1', mode: 'workflow' },+ })+ const { unmount } = workflow.render()+ expect(screen.getByTestId('inherited-tracing')).toHaveTextContent('workflow-1')+ unmount()+ createPanelEnvironment({ resource: { kind: 'snippet', snippetId: 'snippet-1' } }).render()+ expect(screen.queryByTestId('inherited-tracing')).not.toBeInTheDocument()+ })+it('loads graph outputs alongside the built-in text output', async () => {const user = userEvent.setup()renderPanel(diff --git a/web/app/components/workflow/nodes/agent-v2/components/__tests__/agent-orchestrate-panel-content.spec.tsx b/web/app/components/workflow/nodes/agent-v2/components/__tests__/agent-orchestrate-panel-content.spec.tsxindex a1d05794a71..d0ca58bf8b9 100644--- a/web/app/components/workflow/nodes/agent-v2/components/__tests__/agent-orchestrate-panel-content.spec.tsx+++ b/web/app/components/workflow/nodes/agent-v2/components/__tests__/agent-orchestrate-panel-content.spec.tsx@@ -402,9 +402,10 @@ describe('Inline Agent configure workspace', () => {expect(api.deleteBuildDraft).not.toHaveBeenCalled()await confirm(user)await waitFor(() => expect(api.deleteBuildDraft).toHaveBeenCalledOnce())- expect(api.stopMessage).toHaveBeenCalledWith({- params: { agent_id: 'agent-1', task_id: 'task-0' },- })+ expect(api.stopMessage).toHaveBeenCalledWith(+ { params: { agent_id: 'agent-1', task_id: 'task-0' } },+ { context: { silent: true } },+ )expect(api.stopMessage.mock.invocationCallOrder[0]).toBeLessThan(api.deleteBuildDraft.mock.invocationCallOrder[0]!,)diff --git a/web/app/components/workflow/nodes/agent-v2/components/agent-output-routes.tsx b/web/app/components/workflow/nodes/agent-v2/components/agent-output-routes.tsxindex ae1b07b9bb8..c69388220fa 100644--- a/web/app/components/workflow/nodes/agent-v2/components/agent-output-routes.tsx+++ b/web/app/components/workflow/nodes/agent-v2/components/agent-output-routes.tsx@@ -72,7 +72,7 @@ export function AgentOutputRoutes({ id, data }: NodeProps<AgentV2NodeType>) {}return (- <div className="border-b border-divider-subtle px-4 py-3">+ <div className="px-4 py-3"><BranchListnodeId={id}list={list}diff --git a/web/app/components/workflow/nodes/agent-v2/execution.ts b/web/app/components/workflow/nodes/agent-v2/execution.tsnew file mode 100644index 00000000000..c01ebd44b60--- /dev/null+++ b/web/app/components/workflow/nodes/agent-v2/execution.ts@@ -0,0 +1,15 @@+import type { WorkflowRunNodeExecutionResponse } from '@dify/contracts/api/console/apps/types.gen'++export function isBoundAgentV2Execution(+ execution: Pick<WorkflowRunNodeExecutionResponse, 'node_type' | 'process_data'>,+): boolean {+ const processData = execution.process_data+ return (+ execution.node_type === 'agent' &&+ typeof processData === 'object' &&+ processData !== null &&+ 'workflow_agent_binding_id' in processData &&+ typeof processData.workflow_agent_binding_id === 'string' &&+ processData.workflow_agent_binding_id.length > 0+ )+}diff --git a/web/app/components/workflow/nodes/agent-v2/panel.tsx b/web/app/components/workflow/nodes/agent-v2/panel.tsxindex 9d4547f35c4..92da97a8236 100644--- a/web/app/components/workflow/nodes/agent-v2/panel.tsx+++ b/web/app/components/workflow/nodes/agent-v2/panel.tsx@@ -7,6 +7,7 @@ import type { AgentRosterNodeData } from '../../block-selector/types'import type { NodePanelProps } from '../../types'import type { AgentV2NodeType } from './types'import type { AgentOutputTypeOptionValue } from '@/app/components/base/prompt-editor/plugins/agent-output-block/utils'+import { cn } from '@langgenius/dify-ui/cn'import { useRefWithInit } from '@langgenius/dify-ui/use-ref-with-init'import { useMutation } from '@tanstack/react-query'import { produce } from 'immer'@@ -14,6 +15,7 @@ import { useAtomValue } from 'jotai'import { useCallback, useEffect, useMemo, useRef, useState } from 'react'import { createPortal } from 'react-dom'import { useTranslation } from 'react-i18next'+import { InheritedTracingSummary } from '@/app/components/app/tracing/inherited-tracing-summary'import {createAgentOutputConfig,extractAgentOutputNames,@@ -646,7 +648,17 @@ export function AgentV2Panel({ id, data }: NodePanelProps<AgentV2NodeType>) {onCancel={() => setEditingOutputFromTask(null)}onChange={handleDeclaredOutputsChange}/>- <div className="border-b border-divider-subtle">+ {inlineAgentResource && inlineAgent && (+ <SaveInlineAgentToRosterDialog+ resource={inlineAgentResource}+ initialAgent={inlineAgent}+ nodeId={id}+ open={isSaveToRosterDialogOpen}+ onOpenChange={setIsSaveToRosterDialogOpen}+ onSaved={handleInlineSavedToRoster}+ />+ )}+ <div className="divide-y divide-divider-subtle"><AgentRosterFieldagent={isInlineAgentWaitingForCreation || isInlineAgentLoadError ? undefined : displayedAgent@@ -702,23 +714,14 @@ export function AgentV2Panel({ id, data }: NodePanelProps<AgentV2NodeType>) {onSaveInlineToRoster={canSaveInlineToRoster ? handleSaveInlineToRosterOpen : undefined}onStartFromScratch={canStartFromScratch ? handleStartFromScratch : undefined}/>- {inlineAgentResource && inlineAgent && (- <SaveInlineAgentToRosterDialog- resource={inlineAgentResource}- initialAgent={inlineAgent}- nodeId={id}- open={isSaveToRosterDialogOpen}- onOpenChange={setIsSaveToRosterDialogOpen}- onSaved={handleInlineSavedToRoster}- />- )}- </div>- <div- aria-disabled={isInlineAgentPending}- inert={isInlineAgentPending ? true : undefined}- className={isInlineAgentPending ? 'pointer-events-none' : undefined}- >- <div className="border-b border-divider-subtle">+ <div+ aria-disabled={isInlineAgentPending}+ inert={isInlineAgentPending ? true : undefined}+ className={cn(+ 'divide-y divide-divider-subtle',+ isInlineAgentPending && 'pointer-events-none',+ )}+ ><AgentTaskFieldid={id}data={inputs}@@ -727,9 +730,7 @@ export function AgentV2Panel({ id, data }: NodePanelProps<AgentV2NodeType>) {onEditOutput={handleEditTaskOutput}onOutputsChange={handleDeclaredOutputsChange}/>- </div>- <AgentOutputRoutes id={id} data={inputs} />- <div>+ <AgentOutputRoutes id={id} data={inputs} /><AgentOutputVariablescollapsed={isOutputVariablesCollapsed}outputs={declaredOutputs}@@ -737,6 +738,11 @@ export function AgentV2Panel({ id, data }: NodePanelProps<AgentV2NodeType>) {onChange={handleDeclaredOutputsChange}/></div>+ {resource.kind === 'app' && (+ <InheritedTracingSummary+ resource={{ kind: 'app', appId: resource.appId, mode: resource.mode }}+ />+ )}</div></div>)diff --git a/web/app/components/workflow/panel/__tests__/workflow-preview.spec.tsx b/web/app/components/workflow/panel/__tests__/workflow-preview.spec.tsxindex 78850dc9a5e..2d7b09fbecd 100644--- a/web/app/components/workflow/panel/__tests__/workflow-preview.spec.tsx+++ b/web/app/components/workflow/panel/__tests__/workflow-preview.spec.tsx@@ -12,7 +12,9 @@ import {import { UserActionButtonType } from '@/app/components/workflow/nodes/human-input/types'import { BlockEnum, InputVarType, WorkflowRunningStatus } from '@/app/components/workflow/types'import { toast } from '@/app/notifications'+import { consoleQuery } from '@/service/console'import { submitHumanInputForm } from '@/service/workflow'+import { createConsoleQueryWrapper } from '@/test/console/query-data'import { renderWorkflowEditor } from '@/test/workflow-editor'import WorkflowPreview from '../workflow-preview'@@ -333,3 +335,34 @@ it('loads nested tool traces using the editor app identity and preview run ID',},})})++it('shows the test run destination from its execution identity', async () => {+ const { queryClient } = createConsoleQueryWrapper()+ queryClient.setQueryData(+ consoleQuery.apps.byAppId.traceRuns.bySourceKind.bySourceId.get.queryKey({+ input: { params: { app_id: 'app-1', source_kind: 'workflow', source_id: 'preview-run' } },+ }),+ {+ status: 'accepted',+ source_kind: 'workflow',+ source_id: 'preview-run',+ provider: 'langfuse',+ trace_url: 'https://traces.example.com/preview-run',+ },+ )+ renderPreview({+ queryClient,+ initialStoreState: {+ workflowRunningData: createPreviewRunningData({+ result: createWorkflowResult({+ id: 'preview-run',+ status: WorkflowRunningStatus.Succeeded,+ }),+ }),+ },+ })+ expect(await screen.findByRole('link', { name: 'app.tracing.run.viewTrace' })).toHaveAttribute(+ 'href',+ 'https://traces.example.com/preview-run',+ )+})diff --git a/web/app/components/workflow/panel/workflow-preview.tsx b/web/app/components/workflow/panel/workflow-preview.tsxindex 1a915954c09..b3d06a22d2d 100644--- a/web/app/components/workflow/panel/workflow-preview.tsx+++ b/web/app/components/workflow/panel/workflow-preview.tsx@@ -27,9 +27,9 @@ import { getPreviewPanelMaxWidth } from './panel-width'const WorkflowPreview = () => {const { t } = useTranslation(['common', 'runLog', 'workflow'])const panelId = useId()+ const appId = useAtomValue(editorAppIdAtom)const { handleCancelDebugAndPreviewPanel } = useWorkflowInteractions()const workflowRunningData = useStore((s) => s.workflowRunningData)- const appId = useAtomValue(editorAppIdAtom)const isListening = useStore((s) => s.isListening)const showInputsPanel = useStore((s) => s.showInputsPanel)const workflowCanvasWidth = useStore((s) => s.workflowCanvasWidth)@@ -271,6 +271,11 @@ const WorkflowPreview = () => {created_by={(workflowRunningData?.result?.created_by as any)?.name}steps={workflowRunningData?.result?.total_steps}exceptionCounts={workflowRunningData?.result?.exceptions_count}+ externalTrace={+ appId && workflowRunningData?.result?.id+ ? { appId, kind: 'workflow', workflowRunId: workflowRunningData.result.id }+ : undefined+ }onOpenTracingTab={handleOpenTracingTab}/>)}@@ -282,6 +287,11 @@ const WorkflowPreview = () => {{currentTab === 'TRACING' && (<TracingPanelkey={workflowRunningData?.result.id}+ externalTraceRun={+ appId && workflowRunningData?.result?.id+ ? { appId, workflowRunId: workflowRunningData.result.id }+ : undefined+ }className="bg-background-section-burn"list={workflowRunningData?.tracing || []}workflowRun={diff --git a/web/app/components/workflow/run/__tests__/external-trace-row.spec.tsx b/web/app/components/workflow/run/__tests__/external-trace-row.spec.tsxnew file mode 100644index 00000000000..8d38e66bd6f--- /dev/null+++ b/web/app/components/workflow/run/__tests__/external-trace-row.spec.tsx@@ -0,0 +1,170 @@+import type { GetAppsByAppIdTraceRunsBySourceKindBySourceIdResponse } from '@dify/contracts/api/console/apps/types.gen'+import type { ExternalTraceSource } from '../external-trace-row'+import { act, render, screen } from '@testing-library/react'+import { httpErrorFromResponse } from '@/service/http-error'+import { createConsoleQueryWrapper } from '@/test/console/query-data'+import { ExternalTraceRow } from '../external-trace-row'++type TraceRun = GetAppsByAppIdTraceRunsBySourceKindBySourceIdResponse++const { request } = vi.hoisted(() => ({+ request:+ vi.fn<(url: string, init: RequestInit, options: { request: Request }) => Promise<Response>>(),+}))+vi.mock('@/service/base', async (importOriginal) => ({+ ...(await importOriginal<typeof import('@/service/base')>()),+ request,+}))++const workflowRun: ExternalTraceSource = {+ appId: 'app-1',+ kind: 'workflow',+ workflowRunId: 'run-1',+}++const accepted: TraceRun = {+ status: 'accepted',+ source_kind: 'workflow',+ source_id: 'run-1',+ provider: 'langfuse',+ trace_url: 'https://cloud.langfuse.com/trace/abc',+ project_url: 'https://cloud.langfuse.com/project/p',+}++function setup(source: ExternalTraceSource, responses: Array<TraceRun | number>, subject?: string) {+ const urls: URL[] = []+ request.mockImplementation(async (_url, _init, { request: sent }) => {+ urls.push(new URL(sent.url))+ const next = responses.length > 1 ? responses.shift()! : responses[0]!+ if (typeof next === 'number')+ throw await httpErrorFromResponse(+ Response.json({ code: 'forbidden', message: 'Forbidden' }, { status: next }),+ )+ return Response.json(next)+ })+ const { wrapper } = createConsoleQueryWrapper()+ const view = render(+ <dl>+ <ExternalTraceRow source={source} subject={subject} />+ </dl>,+ { wrapper },+ )+ return { ...view, urls }+}++const PROVIDER = '{"provider":"app.tracing.langfuse.title"}'++describe('ExternalTraceRow', () => {+ it('links an accepted workflow run to its frozen third-party trace', async () => {+ setup(workflowRun, [accepted])++ expect(await screen.findByText(`app.tracing.run.accepted:${PROVIDER}`)).toBeInTheDocument()+ expect(screen.getByRole('term')).toHaveTextContent('app.tracing.run.title')+ const link = screen.getByRole('link', { name: 'app.tracing.run.viewTrace' })+ expect(link).toHaveAttribute('href', accepted.trace_url)+ expect(link).toHaveAttribute('target', '_blank')+ expect(link).toHaveAccessibleDescription('common.operation.openInNewTab')+ })++ it('locates an Agent node span within the workflow run', async () => {+ const { urls } = setup(+ { ...workflowRun, nodeExecutionId: 'node-exec-1' },+ [{ ...accepted, span_url: 'https://cloud.langfuse.com/trace/abc?observation=span' }],+ 'Agent 1',+ )++ // The node title keeps links to different spans distinguishable by name.+ expect(+ await screen.findByRole('link', { name: 'app.tracing.run.viewSpan Agent 1' }),+ ).toHaveAttribute('href', 'https://cloud.langfuse.com/trace/abc?observation=span')+ expect(urls[0]!.pathname).toMatch(/\/apps\/app-1\/trace-runs\/workflow\/run-1$/)+ expect(urls[0]!.searchParams.get('node_execution_id')).toBe('node-exec-1')+ })++ it('labels a project-only destination as the project, not this run', async () => {+ setup(workflowRun, [{ ...accepted, trace_url: null }])++ expect(+ await screen.findByRole('link', { name: 'app.tracing.run.viewProject' }),+ ).toHaveAttribute('href', accepted.project_url)+ })++ it('reports a failed delivery without offering a link', async () => {+ setup(workflowRun, [{ ...accepted, status: 'failed' }])++ expect(await screen.findByText(`app.tracing.run.failed:${PROVIDER}`)).toBeInTheDocument()+ expect(screen.queryByRole('link')).not.toBeInTheDocument()+ })++ it('stays hidden for runs that were not collected or cannot be read', async () => {+ const notCollected = setup(workflowRun, [+ { status: 'not_collected', source_kind: 'workflow', source_id: 'run-1' },+ ])+ await vi.waitFor(() => expect(request).toHaveBeenCalled())+ expect(screen.queryByText('app.tracing.run.title')).not.toBeInTheDocument()+ notCollected.unmount()++ request.mockClear()+ const forbidden = setup(workflowRun, [403])+ await vi.waitFor(() => expect(request).toHaveBeenCalled())+ expect(screen.queryByText('app.tracing.run.title')).not.toBeInTheDocument()+ forbidden.unmount()+ })++ it('stops retrying an uncertain delivery and keeps its project available for inspection', async () => {+ vi.useFakeTimers({ shouldAdvanceTime: true })+ try {+ setup(workflowRun, [+ { ...accepted, status: 'retrying', trace_url: null },+ { ...accepted, status: 'uncertain', trace_url: null },+ ])+ expect(await screen.findByText(`app.tracing.run.pending:${PROVIDER}`)).toBeInTheDocument()+ await act(() => vi.advanceTimersByTimeAsync(3000))+ expect(await screen.findByText(`app.tracing.run.uncertain:${PROVIDER}`)).toBeInTheDocument()+ expect(screen.queryByText(`app.tracing.run.accepted:${PROVIDER}`)).not.toBeInTheDocument()+ expect(screen.getByRole('link', { name: 'app.tracing.run.viewProject' })).toHaveAttribute(+ 'href',+ accepted.project_url,+ )+ await act(() => vi.advanceTimersByTimeAsync(9000))+ expect(request).toHaveBeenCalledTimes(2)+ } finally {+ vi.useRealTimers()+ }+ })++ it('keeps polling while the export is pending and stops once it is accepted', async () => {+ vi.useFakeTimers({ shouldAdvanceTime: true })+ try {+ setup(workflowRun, [{ ...accepted, status: 'exporting', trace_url: null }, accepted])++ expect(await screen.findByText(`app.tracing.run.pending:${PROVIDER}`)).toBeInTheDocument()+ await act(() => vi.advanceTimersByTimeAsync(3000))+ expect(await screen.findByText(`app.tracing.run.accepted:${PROVIDER}`)).toBeInTheDocument()++ await act(() => vi.advanceTimersByTimeAsync(9000))+ expect(request).toHaveBeenCalledTimes(2)+ } finally {+ vi.useRealTimers()+ }+ })+})++it('uses the Agent message identity and changes destination when the message changes', async () => {+ const { rerender, urls } = setup({ kind: 'agent', agentId: 'agent-1', messageId: 'message-1' }, [+ accepted,+ ])+ expect(await screen.findByRole('link', { name: 'app.tracing.run.viewTrace' })).toHaveAttribute(+ 'href',+ accepted.trace_url,+ )+ expect(urls[0]!.pathname).toMatch(/\/agent\/agent-1\/trace-runs\/message-1$/)+ rerender(+ <dl>+ <ExternalTraceRow source={{ kind: 'agent', agentId: 'agent-2', messageId: 'message-2' }} />+ </dl>,+ )+ await vi.waitFor(() =>+ expect(urls.at(-1)!.pathname).toMatch(/\/agent\/agent-2\/trace-runs\/message-2$/),+ )+})diff --git a/web/app/components/workflow/run/__tests__/node.spec.tsx b/web/app/components/workflow/run/__tests__/node.spec.tsxindex a7ed2dcd016..c4cd915219b 100644--- a/web/app/components/workflow/run/__tests__/node.spec.tsx+++ b/web/app/components/workflow/run/__tests__/node.spec.tsx@@ -6,6 +6,16 @@ import { createNodeTracing } from '../../__tests__/fixtures'import { BlockEnum, NodeRunningStatus } from '../../types'import NodePanel from '../node'+const { request } = vi.hoisted(() => ({+ request:+ vi.fn<(url: string, init: RequestInit, options: { request: Request }) => Promise<Response>>(),+}))++vi.mock('@/service/base', async (importOriginal) => ({+ ...(await importOriginal<typeof import('@/service/base')>()),+ request,+}))+const createNodeInfo = (overrides: Partial<NodeTracing> = {}) =>createNodeTracing({id: 'trace-node-1',@@ -22,6 +32,66 @@ const createNodeInfo = (overrides: Partial<NodeTracing> = {}) =>})describe('Run NodePanel', () => {+ it('opens the historical Agent V2 span even when process data was truncated', async () => {+ const user = userEvent.setup()+ const urls: URL[] = []+ request.mockImplementation(async (_url, _init, { request: sent }) => {+ urls.push(new URL(sent.url))+ return Response.json({+ status: 'accepted',+ source_kind: 'workflow',+ source_id: 'run-1',+ provider: 'langfuse',+ span_url: 'https://cloud.langfuse.com/trace/frozen?observation=agent',+ })+ })+ render(+ <NodePanel+ nodeInfo={createNodeInfo({+ node_type: BlockEnum.Agent,+ title: 'Agent V2',+ process_data: { workflow_agent_binding_id: 'binding-1' },+ process_data_truncated: true,+ extras: {},+ })}+ externalTraceRun={{ appId: 'app-1', workflowRunId: 'run-1' }}+ />,+ )++ await user.click(screen.getByRole('button', { name: /Agent V2/ }))++ expect(+ await screen.findByRole('link', { name: 'app.tracing.run.viewSpan Agent V2' }),+ ).toHaveAttribute('href', 'https://cloud.langfuse.com/trace/frozen?observation=agent')+ expect(urls).toHaveLength(1)+ expect(urls[0]!.pathname).toMatch(/\/apps\/app-1\/trace-runs\/workflow\/run-1$/)+ expect(urls[0]!.searchParams.get('node_execution_id')).toBe('trace-node-1')+ })++ it('does not query Agent V2 spans for a legacy Agent in the same workflow', async () => {+ const user = userEvent.setup()+ render(+ <NodePanel+ nodeInfo={createNodeInfo({+ node_type: BlockEnum.Agent,+ title: 'Legacy Agent',+ process_data: {},+ extras: {},+ })}+ externalTraceRun={{ appId: 'app-1', workflowRunId: 'run-1' }}+ />,+ )++ await user.click(screen.getByRole('button', { name: /Legacy Agent/ }))++ expect(screen.getByRole('button', { name: /Legacy Agent/ })).toHaveAttribute(+ 'aria-expanded',+ 'true',+ )+ expect(screen.queryByRole('link', { name: /app.tracing.run.view/ })).not.toBeInTheDocument()+ expect(request).not.toHaveBeenCalled()+ })+it('expands and collapses trace details from the keyboard', async () => {const user = userEvent.setup()render(<NodePanel nodeInfo={createNodeInfo({ status: NodeRunningStatus.Stopped })} />)diff --git a/web/app/components/workflow/run/external-trace-row.tsx b/web/app/components/workflow/run/external-trace-row.tsxnew file mode 100644index 00000000000..838986e6cfb--- /dev/null+++ b/web/app/components/workflow/run/external-trace-row.tsx@@ -0,0 +1,130 @@+import type { GetAppsByAppIdTraceRunsBySourceKindBySourceIdResponse } from '@dify/contracts/api/console/apps/types.gen'+import { StatusDot } from '@langgenius/dify-ui/status-dot'+import { useQuery } from '@tanstack/react-query'+import { useId } from 'react'+import { useTranslation } from 'react-i18next'+import { hasProviderForm } from '@/app/components/app/tracing/providers'+import { consoleQuery } from '@/service/console'+import { MetaDataRow } from './meta'++export type ExternalTraceSource =+ | { appId: string; kind: 'workflow'; workflowRunId: string; nodeExecutionId?: string }+ | { appId: string; kind: 'node'; nodeExecutionId: string }+ | { agentId: string; kind: 'agent'; messageId: string }++type TraceRunStatus = GetAppsByAppIdTraceRunsBySourceKindBySourceIdResponse['status']++/** The workflow run whose Agent node executions can locate their own external spans. */+export type ExternalTraceRun = { appId: string; workflowRunId: string }++const pendingStatuses = [+ 'collecting',+ 'ready',+ 'exporting',+ 'retrying',+] as const satisfies readonly TraceRunStatus[]++const isPending = (status: TraceRunStatus): status is (typeof pendingStatuses)[number] =>+ pendingStatuses.some((pending) => pending === status)++const statusDots = {+ pending: 'normal',+ accepted: 'success',+ failed: 'error',+ uncertain: 'warning',+} as const++export function ExternalTraceRow({+ source,+ subject,+}: {+ source: ExternalTraceSource+ /** Names what the link opens when several rows can be on screen, e.g. the node title. */+ subject?: string+}) {+ const { t } = useTranslation(['app', 'common'])+ const hintId = useId()+ const { data: run } = useQuery(+ source.kind === 'agent'+ ? consoleQuery.agent.byAgentId.traceRuns.byMessageId.get.queryOptions({+ input: { params: { agent_id: source.agentId, message_id: source.messageId } },+ refetchInterval: (query) => {+ const status = query.state.data?.status+ return status && isPending(status) ? 3000 : false+ },+ })+ : consoleQuery.apps.byAppId.traceRuns.bySourceKind.bySourceId.get.queryOptions({+ input:+ source.kind === 'workflow'+ ? {+ params: {+ app_id: source.appId,+ source_kind: 'workflow',+ source_id: source.workflowRunId,+ },+ ...(source.nodeExecutionId+ ? { query: { node_execution_id: source.nodeExecutionId } }+ : {}),+ }+ : {+ params: {+ app_id: source.appId,+ source_kind: 'node',+ source_id: source.nodeExecutionId,+ },+ },+ refetchInterval: (query) => {+ const status = query.state.data?.status+ return status && isPending(status) ? 3000 : false+ },+ }),+ )++ if (!run || run.status === 'not_collected') return null++ const state = isPending(run.status) ? 'pending' : run.status+ const providerId = run.provider+ const provider = hasProviderForm(providerId)+ ? t(($) => $[`tracing.${providerId}.title`], { ns: 'app' })+ : (providerId ?? '')+ const link =+ state === 'failed'+ ? null+ : run.span_url+ ? { href: run.span_url, label: t(($) => $['tracing.run.viewSpan'], { ns: 'app' }) }+ : run.trace_url+ ? { href: run.trace_url, label: t(($) => $['tracing.run.viewTrace'], { ns: 'app' }) }+ : run.project_url+ ? {+ href: run.project_url,+ label: t(($) => $['tracing.run.viewProject'], { ns: 'app' }),+ }+ : null++ return (+ <MetaDataRow label={t(($) => $['tracing.run.title'], { ns: 'app' })}>+ <span className="flex flex-wrap items-center gap-x-2 gap-y-1">+ <span className="flex items-center gap-1.5">+ <StatusDot size="small" status={statusDots[state]} />+ {t(($) => $[`tracing.run.${state}`], { ns: 'app', provider })}+ </span>+ {link && (+ <a+ href={link.href}+ target="_blank"+ rel="noopener noreferrer"+ aria-describedby={hintId}+ className="inline-flex items-center gap-0.5 rounded-sm text-text-accent hover:underline focus-visible:ring-2 focus-visible:ring-state-accent-solid focus-visible:outline-hidden"+ >+ {link.label}+ {subject && <span className="sr-only">{` ${subject}`}</span>}+ <span aria-hidden className="i-ri-external-link-line size-3" />+ <span id={hintId} hidden>+ {t(($) => $['operation.openInNewTab'], { ns: 'common' })}+ </span>+ </a>+ )}+ </span>+ </MetaDataRow>+ )+}diff --git a/web/app/components/workflow/run/index.tsx b/web/app/components/workflow/run/index.tsxindex d7bc66dc00e..9e5095053e1 100644--- a/web/app/components/workflow/run/index.tsx+++ b/web/app/components/workflow/run/index.tsx@@ -244,6 +244,9 @@ function RunSession({exceptionCounts={runDetail.exceptions_count}isListening={isListening}workflowRunId={runDetail.id}+ externalTrace={+ appId ? { appId, kind: 'workflow', workflowRunId: runDetail.id } : undefined+ }onOpenTracingTab={() => switchTab('TRACING')}/>)}@@ -254,6 +257,9 @@ function RunSession({<TabsPanel value="TRACING">{!loading && (<TracingPanel+ externalTraceRun={+ appId && runDetail ? { appId, workflowRunId: runDetail.id } : undefined+ }key={runDetail?.id}className="bg-background-section-burn"list={list}diff --git a/web/app/components/workflow/run/iteration-log/iteration-result-panel.tsx b/web/app/components/workflow/run/iteration-log/iteration-result-panel.tsxindex 121ac1511b9..59fc8d7f0fd 100644--- a/web/app/components/workflow/run/iteration-log/iteration-result-panel.tsx+++ b/web/app/components/workflow/run/iteration-log/iteration-result-panel.tsx@@ -1,5 +1,6 @@'use client'import type { FC } from 'react'+import type { ExternalTraceRun } from '../external-trace-row'import type { IterationDurationMap, NodeTracing } from '@/types/workflow'import { cn } from '@langgenius/dify-ui/cn'import {@@ -20,9 +21,10 @@ type Props = {readonly list: NodeTracing[][]readonly onBack: () => voidreadonly iterDurationMap?: IterationDurationMap+ readonly externalTraceRun?: ExternalTraceRun}-const IterationResultPanel: FC<Props> = ({ list, onBack, iterDurationMap }) => {+const IterationResultPanel: FC<Props> = ({ list, onBack, iterDurationMap, externalTraceRun }) => {const { t } = useTranslation(['workflow'])const [expandedIterations, setExpandedIterations] = useState<Record<number, boolean>>({})@@ -126,7 +128,11 @@ const IterationResultPanel: FC<Props> = ({ list, onBack, iterDurationMap }) => {expandedIterations[index] ? 'opacity-100' : 'max-h-0 overflow-hidden opacity-0',)}>- <TracingPanel list={iteration} className="bg-background-section-burn" />+ <TracingPanel+ list={iteration}+ className="bg-background-section-burn"+ externalTraceRun={externalTraceRun}+ /></div></div>))}diff --git a/web/app/components/workflow/run/loop-log/loop-result-panel.tsx b/web/app/components/workflow/run/loop-log/loop-result-panel.tsxindex 1f3b9b4a2cc..64fd44f5b4c 100644--- a/web/app/components/workflow/run/loop-log/loop-result-panel.tsx+++ b/web/app/components/workflow/run/loop-log/loop-result-panel.tsx@@ -1,5 +1,6 @@'use client'import type { FC } from 'react'+import type { ExternalTraceRun } from '../external-trace-row'import type { LoopDurationMap, LoopVariableMap, NodeTracing } from '@/types/workflow'import { cn } from '@langgenius/dify-ui/cn'import {@@ -34,9 +35,16 @@ type Props = {readonly onBack: () => voidreadonly loopDurationMap?: LoopDurationMapreadonly loopVariableMap?: LoopVariableMap+ readonly externalTraceRun?: ExternalTraceRun}-const LoopResultPanel: FC<Props> = ({ list, onBack, loopDurationMap, loopVariableMap }) => {+const LoopResultPanel: FC<Props> = ({+ list,+ onBack,+ loopDurationMap,+ loopVariableMap,+ externalTraceRun,+}) => {const { t } = useTranslation(['workflow', 'workflowLogic'])const [expandedLoops, setExpandedLoops] = useState<Record<number, boolean>>({})@@ -160,7 +168,11 @@ const LoopResultPanel: FC<Props> = ({ list, onBack, loopDurationMap, loopVariabl/></div>)}- <TracingPanel list={loop} className="bg-background-section-burn" />+ <TracingPanel+ list={loop}+ className="bg-background-section-burn"+ externalTraceRun={externalTraceRun}+ /></div></div>))}diff --git a/web/app/components/workflow/run/meta.tsx b/web/app/components/workflow/run/meta.tsxindex 34de06fc0a9..c76fac7ad73 100644--- a/web/app/components/workflow/run/meta.tsx+++ b/web/app/components/workflow/run/meta.tsx@@ -1,5 +1,5 @@'use client'-import type { FC } from 'react'+import type { FC, ReactNode } from 'react'import { useTranslation } from 'react-i18next'import useTimestamp from '@/hooks/use-timestamp'@@ -11,6 +11,19 @@ type Props = {readonly tokens?: numberreadonly steps?: numberreadonly showSteps?: boolean+ readonly children?: ReactNode+}++/** One label/value pair; render it inside a `<dl>`. */+export function MetaDataRow({ label, children }: { label: ReactNode; children: ReactNode }) {+ return (+ <div className="flex">+ <dt className="w-26 shrink-0 px-2 py-1.5 system-xs-regular wrap-break-word text-text-tertiary">+ {label}+ </dt>+ <dd className="grow px-2 py-1.5 system-xs-regular text-text-secondary">{children}</dd>+ </div>+ )}const MetaData: FC<Props> = ({@@ -21,6 +34,7 @@ const MetaData: FC<Props> = ({tokens,steps = 1,showSteps = true,+ children,}) => {const { t } = useTranslation(['appLog', 'runLog', 'workflow'])const { formatTime } = useTimestamp()@@ -30,96 +44,57 @@ const MetaData: FC<Props> = ({<div className="h-6 py-1 system-xs-medium-uppercase text-text-tertiary">{t(($) => $['meta.title'], { ns: 'runLog' })}</div>- <div className="py-1">- <div className="flex">- <div className="w-26 shrink-0 truncate px-2 py-1.5 system-xs-regular text-text-tertiary">- {t(($) => $['meta.status'], { ns: 'runLog' })}- </div>- <div className="grow px-2 py-1.5 system-xs-regular text-text-secondary">- {status === 'running' && (- <div className="my-1 h-2 w-16 rounded-xs bg-text-quaternary" />- )}- {status === 'scheduled' && (- <span>{t(($) => $['status.scheduled'], { ns: 'appLog' })}</span>- )}- {status === 'succeeded' && (- <span>{t(($) => $['status.succeeded'], { ns: 'appLog' })}</span>- )}- {status === 'partial-succeeded' && (- <span>{t(($) => $['status.partial-succeeded'], { ns: 'appLog' })}</span>- )}- {status === 'exception' && (- <span>{t(($) => $['tracing.status.exception'], { ns: 'workflow' })}</span>- )}- {status === 'failed' && <span>{t(($) => $['status.failed'], { ns: 'appLog' })}</span>}- {status === 'stopped' && <span>{t(($) => $['status.stopped'], { ns: 'appLog' })}</span>}- {status === 'paused' && <span>{t(($) => $['status.paused'], { ns: 'appLog' })}</span>}- </div>- </div>- <div className="flex">- <div className="w-26 shrink-0 truncate px-2 py-1.5 system-xs-regular text-text-tertiary">- {t(($) => $['meta.executor'], { ns: 'runLog' })}- </div>- <div className="grow px-2 py-1.5 system-xs-regular text-text-secondary">- {status === 'running' && (- <div className="my-1 h-2 w-22 rounded-xs bg-text-quaternary" />- )}- {status !== 'running' && <span>{executor || 'N/A'}</span>}- </div>- </div>- <div className="flex">- <div className="w-26 shrink-0 truncate px-2 py-1.5 system-xs-regular text-text-tertiary">- {t(($) => $['meta.startTime'], { ns: 'runLog' })}- </div>- <div className="grow px-2 py-1.5 system-xs-regular text-text-secondary">- {status === 'running' && (- <div className="my-1 h-2 w-18 rounded-xs bg-text-quaternary" />- )}- {status !== 'running' && (- <span>- {startTime- ? formatTime(startTime, t(($) => $.dateTimeFormat, { ns: 'appLog' }) as string)- : '-'}- </span>- )}- </div>- </div>- <div className="flex">- <div className="w-26 shrink-0 truncate px-2 py-1.5 system-xs-regular text-text-tertiary">- {t(($) => $['meta.time'], { ns: 'runLog' })}- </div>- <div className="grow px-2 py-1.5 system-xs-regular text-text-secondary">- {status === 'running' && (- <div className="my-1 h-2 w-18 rounded-xs bg-text-quaternary" />- )}- {status !== 'running' && <span>{time ? `${time.toFixed(3)}s` : '-'}</span>}- </div>- </div>- <div className="flex">- <div className="w-26 shrink-0 truncate px-2 py-1.5 system-xs-regular text-text-tertiary">- {t(($) => $['meta.tokens'], { ns: 'runLog' })}- </div>- <div className="grow px-2 py-1.5 system-xs-regular text-text-secondary">- {['running', 'paused'].includes(status) && (- <div className="my-1 h-2 w-12 animate-pulse rounded-xs bg-text-quaternary" />- )}- {!['running', 'paused'].includes(status) && <span>{`${tokens || 0} Tokens`}</span>}- </div>- </div>+ <dl className="py-1">+ <MetaDataRow label={t(($) => $['meta.status'], { ns: 'runLog' })}>+ {status === 'running' && <div className="my-1 h-2 w-16 rounded-xs bg-text-quaternary" />}+ {status === 'scheduled' && (+ <span>{t(($) => $['status.scheduled'], { ns: 'appLog' })}</span>+ )}+ {status === 'succeeded' && (+ <span>{t(($) => $['status.succeeded'], { ns: 'appLog' })}</span>+ )}+ {status === 'partial-succeeded' && (+ <span>{t(($) => $['status.partial-succeeded'], { ns: 'appLog' })}</span>+ )}+ {status === 'exception' && (+ <span>{t(($) => $['tracing.status.exception'], { ns: 'workflow' })}</span>+ )}+ {status === 'failed' && <span>{t(($) => $['status.failed'], { ns: 'appLog' })}</span>}+ {status === 'stopped' && <span>{t(($) => $['status.stopped'], { ns: 'appLog' })}</span>}+ {status === 'paused' && <span>{t(($) => $['status.paused'], { ns: 'appLog' })}</span>}+ </MetaDataRow>+ <MetaDataRow label={t(($) => $['meta.executor'], { ns: 'runLog' })}>+ {status === 'running' && <div className="my-1 h-2 w-22 rounded-xs bg-text-quaternary" />}+ {status !== 'running' && <span>{executor || 'N/A'}</span>}+ </MetaDataRow>+ <MetaDataRow label={t(($) => $['meta.startTime'], { ns: 'runLog' })}>+ {status === 'running' && <div className="my-1 h-2 w-18 rounded-xs bg-text-quaternary" />}+ {status !== 'running' && (+ <span>+ {startTime+ ? formatTime(startTime, t(($) => $.dateTimeFormat, { ns: 'appLog' }) as string)+ : '-'}+ </span>+ )}+ </MetaDataRow>+ <MetaDataRow label={t(($) => $['meta.time'], { ns: 'runLog' })}>+ {status === 'running' && <div className="my-1 h-2 w-18 rounded-xs bg-text-quaternary" />}+ {status !== 'running' && <span>{time ? `${time.toFixed(3)}s` : '-'}</span>}+ </MetaDataRow>+ <MetaDataRow label={t(($) => $['meta.tokens'], { ns: 'runLog' })}>+ {['running', 'paused'].includes(status) && (+ <div className="my-1 h-2 w-12 animate-pulse rounded-xs bg-text-quaternary" />+ )}+ {!['running', 'paused'].includes(status) && <span>{`${tokens || 0} Tokens`}</span>}+ </MetaDataRow>{showSteps && (- <div className="flex">- <div className="w-26 shrink-0 truncate px-2 py-1.5 system-xs-regular text-text-tertiary">- {t(($) => $['meta.steps'], { ns: 'runLog' })}- </div>- <div className="grow px-2 py-1.5 system-xs-regular text-text-secondary">- {status === 'running' && (- <div className="my-1 h-2 w-6 rounded-xs bg-text-quaternary" />- )}- {status !== 'running' && <span>{steps}</span>}- </div>- </div>+ <MetaDataRow label={t(($) => $['meta.steps'], { ns: 'runLog' })}>+ {status === 'running' && <div className="my-1 h-2 w-6 rounded-xs bg-text-quaternary" />}+ {status !== 'running' && <span>{steps}</span>}+ </MetaDataRow>)}- </div>+ {children}+ </dl></div>)}diff --git a/web/app/components/workflow/run/node.tsx b/web/app/components/workflow/run/node.tsxindex fc2c8efab42..833653d341b 100644--- a/web/app/components/workflow/run/node.tsx+++ b/web/app/components/workflow/run/node.tsx@@ -1,5 +1,6 @@'use client'import type { FC } from 'react'+import type { ExternalTraceRun } from './external-trace-row'import type {AgentLogItemWithChildren,IterationDurationMap,@@ -22,6 +23,7 @@ import { use, useCallback, useEffect, useId, useMemo, useState } from 'react'import { useTranslation } from 'react-i18next'import CodeEditor from '@/app/components/workflow/nodes/_base/components/editor/code-editor'import ErrorHandleTip from '@/app/components/workflow/nodes/_base/components/error-handle/error-handle-tip'+import { isBoundAgentV2Execution } from '@/app/components/workflow/nodes/agent-v2/execution'import { CodeLanguage } from '@/app/components/workflow/nodes/code/types'import StatusContainer from '@/app/components/workflow/run/status-container'import { hasRetryNode } from '@/app/components/workflow/utils'@@ -30,6 +32,7 @@ import BlockIcon from '../block-icon'import { BlockEnum } from '../types'import LargeDataAlert from '../variable-inspect/large-data-alert'import { AgentLogTrigger } from './agent-log/agent-log-trigger'+import { ExternalTraceRow } from './external-trace-row'import { IterationLogTrigger } from './iteration-log'import { LoopLogTrigger } from './loop-log'import { RetryLogTrigger } from './retry-log'@@ -55,6 +58,7 @@ type Props = {readonly onShowAgentOrToolLog?: (detail?: AgentLogItemWithChildren) => voidreadonly notShowIterationNav?: booleanreadonly notShowLoopNav?: boolean+ externalTraceRun?: ExternalTraceRun}const NodePanel: FC<Props> = ({@@ -70,6 +74,7 @@ const NodePanel: FC<Props> = ({onShowAgentOrToolLog,notShowIterationNav,notShowLoopNav,+ externalTraceRun,}) => {const workflowToolTracing = use(WorkflowToolTracingContext)const [collapseState, doSetCollapseState] = useState<boolean>(true)@@ -273,6 +278,18 @@ const NodePanel: FC<Props> = ({<span aria-hidden className="i-ri-arrow-right-line size-4" /></Button>)}+ {isBoundAgentV2Execution(nodeInfo) && externalTraceRun && (+ <dl>+ <ExternalTraceRow+ source={{+ ...externalTraceRun,+ kind: 'workflow',+ nodeExecutionId: nodeInfo.id,+ }}+ subject={nodeInfo.title}+ />+ </dl>+ )}<div className={cn('mb-1', hideInfo && 'px-2! py-0.5!')}>{nodeInfo.status === 'stopped' && (<StatusContainer status="stopped">diff --git a/web/app/components/workflow/run/result-panel.tsx b/web/app/components/workflow/run/result-panel.tsxindex 6c1830c40c0..a3553079433 100644--- a/web/app/components/workflow/run/result-panel.tsx+++ b/web/app/components/workflow/run/result-panel.tsx@@ -1,5 +1,6 @@'use client'import type { FC } from 'react'+import type { ExternalTraceSource } from './external-trace-row'import type { AgentLogItemWithChildren, NodeTracing } from '@/types/workflow'import { useTranslation } from 'react-i18next'import CodeEditor from '@/app/components/workflow/nodes/_base/components/editor/code-editor'@@ -12,6 +13,7 @@ import { RetryLogTrigger } from '@/app/components/workflow/run/retry-log'import { BlockEnum } from '@/app/components/workflow/types'import { hasRetryNode } from '@/app/components/workflow/utils'import LargeDataAlert from '../variable-inspect/large-data-alert'+import { ExternalTraceRow } from './external-trace-row'import MetaData from './meta'import StatusPanel from './status'@@ -39,6 +41,7 @@ export type ResultPanelProps = {execution_metadata?: anyisListening?: booleanworkflowRunId?: string+ externalTrace?: ExternalTraceSourceonOpenTracingTab?: () => voidhandleShowIterationResultList?: (detail: NodeTracing[][], iterDurationMap: any) => voidhandleShowLoopResultList?: (detail: NodeTracing[][], loopDurationMap: any) => void@@ -67,6 +70,7 @@ const ResultPanel: FC<ResultPanelProps> = ({execution_metadata,isListening = false,workflowRunId,+ externalTrace,onOpenTracingTab,handleShowIterationResultList,handleShowLoopResultList,@@ -174,7 +178,9 @@ const ResultPanel: FC<ResultPanelProps> = ({tokens={total_tokens}steps={steps}showSteps={showSteps}- />+ >+ {externalTrace && <ExternalTraceRow source={externalTrace} />}+ </MetaData></div></div>)diff --git a/web/app/components/workflow/run/special-result-panel.tsx b/web/app/components/workflow/run/special-result-panel.tsxindex 70a0bf96a2a..73930b26cfb 100644--- a/web/app/components/workflow/run/special-result-panel.tsx+++ b/web/app/components/workflow/run/special-result-panel.tsx@@ -1,3 +1,4 @@+import type { ExternalTraceRun } from './external-trace-row'import type {AgentLogItemWithChildren,IterationDurationMap,@@ -29,6 +30,7 @@ export type SpecialResultPanelProps = {agentOrToolLogItemStack?: AgentLogItemWithChildren[]agentOrToolLogListMap?: Record<string, AgentLogItemWithChildren[]>handleShowAgentOrToolLog?: (detail?: AgentLogItemWithChildren) => void+ externalTraceRun?: ExternalTraceRun}const SpecialResultPanel = ({showRetryDetail,@@ -49,6 +51,7 @@ const SpecialResultPanel = ({agentOrToolLogItemStack,agentOrToolLogListMap,handleShowAgentOrToolLog,+ externalTraceRun,}: SpecialResultPanelProps) => {return (<div@@ -65,6 +68,7 @@ const SpecialResultPanel = ({list={iterationResultList}onBack={setShowIteratingDetailFalse}iterDurationMap={iterationResultDurationMap}+ externalTraceRun={externalTraceRun}/>)}{showLoopingDetail && !!loopResultList?.length && setShowLoopingDetailFalse && (@@ -73,6 +77,7 @@ const SpecialResultPanel = ({onBack={setShowLoopingDetailFalse}loopDurationMap={loopResultDurationMap}loopVariableMap={loopResultVariableMap}+ externalTraceRun={externalTraceRun}/>)}{!!agentOrToolLogItemStack?.length && agentOrToolLogListMap && handleShowAgentOrToolLog && (diff --git a/web/app/components/workflow/run/tracing-panel.tsx b/web/app/components/workflow/run/tracing-panel.tsxindex a231b8350fe..7f56c183f63 100644--- a/web/app/components/workflow/run/tracing-panel.tsx+++ b/web/app/components/workflow/run/tracing-panel.tsx@@ -1,5 +1,6 @@'use client'import type { FC } from 'react'+import type { ExternalTraceRun } from './external-trace-row'import type { WorkflowRunInfo } from './workflow-tool-tracing-context'import type { NodeTracing } from '@/types/workflow'import { cn } from '@langgenius/dify-ui/cn'@@ -18,6 +19,7 @@ import { WorkflowToolTracingContext } from './workflow-tool-tracing-context'type TracingPanelProps = {list: NodeTracing[]+ externalTraceRun?: ExternalTraceRunclassName?: stringhideNodeInfo?: booleanhideNodeProcessDetail?: boolean@@ -34,6 +36,7 @@ function findExecution(nodes: NodeTracing[], id: string): NodeTracing | undefineconst TracingPanel: FC<TracingPanelProps> = ({list,+ externalTraceRun,className,hideNodeInfo = false,hideNodeProcessDetail = false,@@ -142,6 +145,7 @@ const TracingPanel: FC<TracingPanelProps> = ({<NodePanelnodeInfo={node!}allExecutions={list}+ externalTraceRun={externalTraceRun}onShowIterationDetail={() => setContainerId(node.id)}onShowLoopDetail={() => setContainerId(node.id)}onShowRetryDetail={logs.handleShowRetryResultList}@@ -165,6 +169,7 @@ const TracingPanel: FC<TracingPanelProps> = ({) : container || logs.showSpecialResultPanel ? (<SpecialResultPanel{...logs}+ externalTraceRun={externalTraceRun}showIteratingDetail={!!iteration}setShowIteratingDetailFalse={() => setContainerId(null)}iterationResultList={iteration ? getIterationResultList(iteration, list) : undefined}diff --git a/web/features/agent-v2/agent-detail/configure/__tests__/page-build-session.spec.tsx b/web/features/agent-v2/agent-detail/configure/__tests__/page-build-session.spec.tsxindex 893944ade81..0ea33d5897b 100644--- a/web/features/agent-v2/agent-detail/configure/__tests__/page-build-session.spec.tsx+++ b/web/features/agent-v2/agent-detail/configure/__tests__/page-build-session.spec.tsx@@ -180,7 +180,10 @@ describe('Leaving Build', () => {expect(await screen.findByText('Built answer')).toBeVisible()await changeMode(user, 'preview')await confirm(user)- expect(api.stop).toHaveBeenCalledWith({ params: { agent_id: 'agent-1', task_id: 'task-0' } })+ expect(api.stop).toHaveBeenCalledWith(+ { params: { agent_id: 'agent-1', task_id: 'task-0' } },+ { context: { silent: true } },+ )expect(api.stop.mock.invocationCallOrder[0]).toBeLessThan(api.discard.mock.invocationCallOrder[0]!,)diff --git a/web/features/agent-v2/agent-detail/configure/components/preview/__tests__/chat.spec.tsx b/web/features/agent-v2/agent-detail/configure/components/preview/__tests__/chat.spec.tsxindex 6b9917f2340..86363b2f53d 100644--- a/web/features/agent-v2/agent-detail/configure/components/preview/__tests__/chat.spec.tsx+++ b/web/features/agent-v2/agent-detail/configure/components/preview/__tests__/chat.spec.tsx@@ -21,6 +21,7 @@ import { createAgentFixture } from '@/test/fixtures/agent'import { AgentBuildChat } from '../build-chat'import { AgentPreviewChat } from '../preview-chat'+// oxlint-disable-next-line typescript/no-deprecated -- Exercise the existing SSE transport used by Agent preview.const ssePost = vi.hoisted(() => vi.fn<typeof import('@/service/base').ssePost>())const api = vi.hoisted(() => ({history: vi.fn(),@@ -419,11 +420,14 @@ describe('Agent sends and interruptions', () => {await user.click(await screen.findByRole('button', { name: 'appDebug.operation.stopResponding' }),)- else act(() => controllerRef.current?.stop())- expect(api.stop).toHaveBeenCalledExactlyOnceWith({- params: { agent_id: 'agent-1', task_id: 'task-0' },- })- expect(abortControllers[0]?.signal.aborted).toBe(true)+ else await act(async () => controllerRef.current?.stop())+ expect(api.stop).toHaveBeenCalledExactlyOnceWith(+ {+ params: { agent_id: 'agent-1', task_id: 'task-0' },+ },+ { context: { silent: true } },+ )+ await waitFor(() => expect(abortControllers[0]?.signal.aborted).toBe(true))await act(async () => {stream().onError?.('Connection closed')await stream().onCompleted?.(true)@@ -449,29 +453,6 @@ describe('Agent sends and interruptions', () => {expect(sendButton()).toBeEnabled()})- it('maps Agent error events at the transport boundary and ignores unrelated events', async () => {- const user = userEvent.setup()- renderChat()- await send(user)- await waitFor(() => expect(ssePost).toHaveBeenCalledOnce())- expect(- stream().onUnhandledEvent?.({- event: 'error',- conversation_id: 'conversation-1',- message_id: 'message-0',- code: 'agent_run_failed',- message: 'Agent execution failed',- }),- ).toEqual({- conversationId: 'conversation-1',- messageId: 'message-0',- errorCode: 'agent_run_failed',- errorMessage: 'Agent execution failed',- })- expect(stream().onUnhandledEvent?.({ event: 'unknown', message: 'Ignored' })).toBeUndefined()- expect(api.error).not.toHaveBeenCalled()- })-it.each([['Agent run exceeded the configured limit of 3600 seconds', 'agentRunLimitExceeded'],['The next request would exceed the request_limit of 500', 'agentModelRequestLimitExceeded'],@@ -481,12 +462,7 @@ describe('Agent sends and interruptions', () => {await send(user)await waitFor(() => expect(ssePost).toHaveBeenCalledOnce())act(() => {- stream().onUnhandledEvent?.({- event: 'error',- code: 'agent_run_limit_exceeded',- status: 400,- message,- })+ stream().onNotifyError?.(message, 'agent_run_limit_exceeded')})expect(api.error).toHaveBeenCalledExactlyOnceWith(`${prefix}.preview.errors.${errorKey}`,@@ -620,3 +596,158 @@ describe('Agent attachments and notices', () => {},)})++describe('Agent stop and failure ownership', () => {+ it('stops thought-only execution, preserves its task across empty deltas, and never reuses it next turn', async () => {+ const user = userEvent.setup()+ renderChat()+ await send(user)+ await waitFor(() => expect(ssePost).toHaveBeenCalledOnce())+ await act(async () => {+ stream().onThought?.({+ id: 'thought',+ task_id: 'task-thought',+ conversation_id: 'conversation-1',+ message_id: 'message-0',+ thought: 'Working',+ tool: '',+ tool_input: '',+ observation: '',+ position: 1,+ })+ stream().onData?.('', false, { messageId: '' })+ })+ await user.click(screen.getByRole('button', { name: 'appDebug.operation.stopResponding' }))+ await waitFor(() => expect(abortControllers[0]?.signal.aborted).toBe(true))+ expect(api.stop).toHaveBeenCalledExactlyOnceWith(+ {+ params: { agent_id: 'agent-1', task_id: 'task-thought' },+ },+ { context: { silent: true } },+ )+ await send(user, 'Next turn')+ await waitFor(() => expect(ssePost).toHaveBeenCalledTimes(2))+ await user.click(screen.getByRole('button', { name: 'appDebug.operation.stopResponding' }))+ expect(api.stop).toHaveBeenCalledOnce()+ expect(abortControllers[1]?.signal.aborted).toBe(false)+ expect(api.error).toHaveBeenCalled()+ expect(+ screen.getByRole('button', { name: 'appDebug.operation.stopResponding' }),+ ).toBeInTheDocument()+ })++ it('stops each execution independently while earlier stop requests are pending', async () => {+ const user = userEvent.setup()+ const firstStop = createDeferred<{ result: string }>()+ const secondStop = createDeferred<{ result: string }>()+ api.stop.mockReturnValueOnce(firstStop.promise).mockReturnValueOnce(secondStop.promise)+ renderChat()+ await send(user)+ await receive()+ const stop = () =>+ user.click(screen.getByRole('button', { name: 'appDebug.operation.stopResponding' }))+ await stop()+ await complete()+ await send(user, 'Next turn')+ await receive(1)+ await stop()+ expect(api.stop).toHaveBeenCalledTimes(2)+ expect(api.stop).toHaveBeenLastCalledWith(+ { params: { agent_id: 'agent-1', task_id: 'task-1' } },+ { context: { silent: true } },+ )+ await act(async () => firstStop.resolve({ result: 'success' }))+ expect(abortControllers[1]?.signal.aborted).toBe(false)+ await stop()+ expect(api.stop).toHaveBeenCalledTimes(2)+ await act(async () => secondStop.resolve({ result: 'success' }))+ await waitFor(() => expect(abortControllers[1]?.signal.aborted).toBe(true))+ })++ it('keeps the stream active after a rejected stop and allows retrying', async () => {+ const user = userEvent.setup()+ api.stop.mockRejectedValueOnce(new Error('Forbidden'))+ renderChat()+ await send(user)+ await receive()+ await user.click(screen.getByRole('button', { name: 'appDebug.operation.stopResponding' }))+ await waitFor(() => expect(api.error).toHaveBeenCalled())+ expect(abortControllers[0]?.signal.aborted).toBe(false)+ await user.click(screen.getByRole('button', { name: 'appDebug.operation.stopResponding' }))+ await waitFor(() => expect(abortControllers[0]?.signal.aborted).toBe(true))+ expect(api.stop).toHaveBeenCalledTimes(2)+ expect(screen.queryByRole('alert')).not.toBeInTheDocument()+ })++ it.each(['', 'Partial answer'])(+ 'retains a safe error alongside %s through history reload',+ async (answer) => {+ const user = userEvent.setup()+ const view = renderChat()+ await send(user)+ await receive(0, answer)+ messages.set('conversation-1', [+ createMessage({ answer, status: 'error', error: 'SECRET provider detail' }),+ ])+ await act(async () => {+ stream().onError?.('SECRET provider detail')+ await stream().onCompleted?.(true)+ })+ expect(await screen.findByRole('alert')).toHaveTextContent('common.api.actionFailed')+ expect(screen.queryByText('SECRET provider detail')).not.toBeInTheDocument()+ if (answer) expect(await screen.findByText(answer)).toBeInTheDocument()+ view.unmount()+ renderChat({ conversationId: 'conversation-1' })+ expect(await screen.findByRole('alert')).toHaveTextContent('common.api.actionFailed')+ expect(screen.queryByText('SECRET provider detail')).not.toBeInTheDocument()+ },+ )+})++it.each(['sse', 'http'])(+ 'renders a persistent safe error from the real %s transport',+ async (transport) => {+ const actual = await vi.importActual<typeof import('@/service/base')>('@/service/base')+ // oxlint-disable-next-line typescript/no-deprecated -- Restore the real SSE parser for the transport regression test.+ ssePost.mockImplementation(actual.ssePost)+ const payload = {+ event: 'error',+ message: 'SECRET provider details',+ code: 'agent_run_failed',+ conversation_id: 'conversation-1',+ message_id: 'message-0',+ }+ const response =+ transport === 'http'+ ? Response.json(payload, { status: 500 })+ : new Response(+ new ReadableStream({+ start(controller) {+ controller.enqueue(new TextEncoder().encode(`data: ${JSON.stringify(payload)}\n`))+ controller.close()+ },+ }),+ { headers: { 'Content-Type': 'text/event-stream' } },+ )+ const fetch = vi.spyOn(globalThis, 'fetch').mockResolvedValue(response)+ try {+ const user = userEvent.setup()+ renderChat()+ await send(user)+ expect(await screen.findByRole('alert')).toHaveTextContent('common.api.actionFailed')+ expect(screen.queryByText('SECRET provider details')).not.toBeInTheDocument()+ expect(api.error).not.toHaveBeenCalled()+ expect(+ screen.queryByRole('button', { name: 'appDebug.operation.stopResponding' }),+ ).not.toBeInTheDocument()+ if (transport === 'sse')+ await waitFor(() =>+ expect(api.history).toHaveBeenCalledWith(+ expect.objectContaining({ query: { conversation_id: 'conversation-1' } }),+ ),+ )+ } finally {+ fetch.mockRestore()+ }+ },+)diff --git a/web/features/agent-v2/agent-detail/configure/components/preview/chat-conversation.tsx b/web/features/agent-v2/agent-detail/configure/components/preview/chat-conversation.tsxindex 0b125efb89b..f24906ec1e5 100644--- a/web/features/agent-v2/agent-detail/configure/components/preview/chat-conversation.tsx+++ b/web/features/agent-v2/agent-detail/configure/components/preview/chat-conversation.tsx@@ -29,12 +29,15 @@ import { getAgentSoulInputs, getAgentSoulInputsForm } from './chat-config'const Chat = dynamic(() => import('@/app/components/base/chat/chat'), { ssr: false })const stopAgentChatMessageResponding = (agentId: string, taskId: string) => {- return consoleClient.agent.byAgentId.chatMessages.byTaskId.stop.post({- params: {- agent_id: agentId,- task_id: taskId,+ return consoleClient.agent.byAgentId.chatMessages.byTaskId.stop.post(+ {+ params: {+ agent_id: agentId,+ task_id: taskId,+ },},- })+ { context: { silent: true } },+ )}const fetchAgentSuggestedQuestions = (agentId: string, messageId: string) => {@@ -152,7 +155,7 @@ export function AgentPreviewChatConversation({},initialChatTree,(taskId) => {- void stopAgentChatMessageResponding(agentId, taskId)+ return stopAgentChatMessageResponding(agentId, taskId)},clearChatList,onClearChatListChange,@@ -208,14 +211,11 @@ export function AgentPreviewChatConversation({},onGetSuggestedQuestions: (responseItemId) =>fetchAgentSuggestedQuestions(agentId, responseItemId),- onUnhandledEvent: (event) => {- if (event.event !== 'error' || typeof event.message !== 'string') return-- const errorCode = typeof event.code === 'string' ? event.code : undefined+ onNotifyError: (message, errorCode) => {if (errorCode === 'agent_run_limit_exceeded') {// The backend currently uses the same code for time and request-count limits.// Pydantic AI's request-count error includes its `request_limit` field name.- const errorMessage = event.message.includes('request_limit')+ const errorMessage = message.includes('request_limit')? t(($) =>$['agentDetail.configure.preview.errors.agentModelRequestLimitExceeded'],@@ -235,14 +235,6 @@ export function AgentPreviewChatConversation({timeout: 0,})}-- return {- conversationId:- typeof event.conversation_id === 'string' ? event.conversation_id : undefined,- messageId: typeof event.message_id === 'string' ? event.message_id : undefined,- errorMessage: event.message,- errorCode,- }},onConversationComplete: (completedConversationId, workflowRunId) => {if (completedConversationId && completedConversationId !== conversationId)@@ -284,9 +276,8 @@ export function AgentPreviewChatConversation({],)- const doStopResponding = useCallback(() => {- handleStop()- notifySendInterrupted()+ const doStopResponding = useCallback(async () => {+ if (await handleStop()) notifySendInterrupted()}, [handleStop, notifySendInterrupted])const doRegenerate = useCallback(diff --git a/web/features/agent-v2/agent-detail/configure/components/preview/chat-history.ts b/web/features/agent-v2/agent-detail/configure/components/preview/chat-history.tsindex 6f3694dbd0f..c3c5173c9b9 100644--- a/web/features/agent-v2/agent-detail/configure/components/preview/chat-history.ts+++ b/web/features/agent-v2/agent-detail/configure/components/preview/chat-history.ts@@ -120,6 +120,7 @@ export function getFormattedAgentDebugChatTree(chatList.push({id: item.id,content: answer,+ isError: item.status === 'error',agent_thoughts: addFileInfos(sortAgentSorts((item.agent_thoughts ?? []).map((thought) =>diff --git a/web/features/agent-v2/agent-detail/logs/__tests__/log-tracing.spec.tsx b/web/features/agent-v2/agent-detail/logs/__tests__/log-tracing.spec.tsxnew file mode 100644index 00000000000..1c9d8a74637--- /dev/null+++ b/web/features/agent-v2/agent-detail/logs/__tests__/log-tracing.spec.tsx@@ -0,0 +1,100 @@+import type {+ AgentLogConversationItemResponse,+ AgentLogMessageItemResponse,+} from '@dify/contracts/api/console/agent/types.gen'+import { Drawer } from '@langgenius/dify-ui/drawer'+import { render, screen, waitFor } from '@testing-library/react'+import { createConsoleQueryWrapper } from '@/test/console/query-data'+import { AgentLogDetailPanel } from '../components/log-detail-panel'++const { request } = vi.hoisted(() => ({+ // oxlint-disable-next-line typescript/no-deprecated -- Observe the existing transport boundary without mocking the tracing UI.+ request: vi.fn<typeof import('@/service/base').request>(),+}))+vi.mock('@/service/base', async (importOriginal) => ({+ ...(await importOriginal<typeof import('@/service/base')>()),+ request,+}))++const message: AgentLogMessageItemResponse = {+ id: 'message-1',+ message_id: 'message-1',+ conversation_id: 'conversation-1',+ query: 'First question',+ answer: 'First answer',+ status: 'success',+ answer_tokens: 1,+ message_tokens: 1,+ total_tokens: 2,+ total_price: '0',+ currency: 'USD',+ latency: 1,+}+const log: AgentLogConversationItemResponse = {+ id: 'conversation-1',+ conversation_id: 'conversation-1',+ title: 'Conversation',+ message_count: 2,+ status: 'success',+ unread: false,+ source: { id: 'webapp:app-1', type: 'webapp', app_id: 'app-1', app_name: 'Agent' },+}++it.each(['webapp', 'workflow'] as const)(+ 'keeps each %s message trace attached to its real execution',+ async (sourceType) => {+ const urls: string[] = []+ request.mockImplementation(async (url, _init, options) => {+ const path = new URL(options?.request?.url ?? String(url), 'https://example.com').pathname+ urls.push(path)+ if (path.includes('/trace-runs/'))+ return Response.json({+ status: 'accepted',+ source_kind: sourceType === 'workflow' ? 'workflow' : 'message',+ source_id: path.split('/').at(-1),+ provider: 'langfuse',+ trace_url: `https://traces.example.com/${path.split('/').at(-1)}`,+ })+ if (path.includes('/logs/'))+ return Response.json({+ data: [+ message,+ {+ ...message,+ id: 'message-2',+ message_id: 'message-2',+ query: 'Second question',+ answer: 'Second answer',+ },+ ],+ total: 2,+ page: 1,+ limit: 100,+ })+ throw new Error(`Unexpected request: ${path}`)+ })+ const { wrapper } = createConsoleQueryWrapper()+ render(+ <Drawer open>+ <AgentLogDetailPanel+ agentId="agent-1"+ log={{ ...log, source: { ...log.source!, type: sourceType, app_id: 'caller-app' } }}+ onClose={() => {}}+ />+ </Drawer>,+ { wrapper },+ )+ await waitFor(() =>+ expect(screen.getAllByRole('link', { name: 'app.tracing.run.viewTrace' })).toHaveLength(2),+ )+ const links = screen.getAllByRole('link', { name: 'app.tracing.run.viewTrace' })+ expect(links.map((link) => link.getAttribute('href'))).toEqual([+ 'https://traces.example.com/message-1',+ 'https://traces.example.com/message-2',+ ])+ const owner =+ sourceType === 'workflow' ? '/apps/caller-app/trace-runs/node' : '/agent/agent-1/trace-runs'+ expect(urls.some((url) => url.endsWith(`${owner}/message-1`))).toBe(true)+ expect(urls.some((url) => url.endsWith(`${owner}/message-2`))).toBe(true)+ },+)diff --git a/web/features/agent-v2/agent-detail/logs/__tests__/page.spec.tsx b/web/features/agent-v2/agent-detail/logs/__tests__/page.spec.tsxindex 8965769c788..e25adaec88e 100644--- a/web/features/agent-v2/agent-detail/logs/__tests__/page.spec.tsx+++ b/web/features/agent-v2/agent-detail/logs/__tests__/page.spec.tsx@@ -35,6 +35,16 @@ vi.mock('@/service/console', async (importOriginal) => {'agent.byAgentId.logs.get': mocks.logsQueryFn,'agent.byAgentId.logSources.get': mocks.logSourcesQueryFn,'agent.byAgentId.logs.byConversationId.messages.get': mocks.messagesQueryFn,+ 'agent.byAgentId.traceRuns.byMessageId.get': async () => ({+ status: 'not_collected',+ source_kind: 'message',+ source_id: 'message-1',+ }),+ 'apps.byAppId.traceRuns.bySourceKind.bySourceId.get': async () => ({+ status: 'not_collected',+ source_kind: 'workflow',+ source_id: 'message-1',+ }),'agent.byAgentId.feedbacks.post': mocks.feedbackMutationFn,}),}diff --git a/web/features/agent-v2/agent-detail/logs/components/log-detail-panel.tsx b/web/features/agent-v2/agent-detail/logs/components/log-detail-panel.tsxindex aa2b506d713..722220cbb23 100644--- a/web/features/agent-v2/agent-detail/logs/components/log-detail-panel.tsx+++ b/web/features/agent-v2/agent-detail/logs/components/log-detail-panel.tsx@@ -12,6 +12,7 @@ import { useTranslation } from 'react-i18next'import Chat from '@/app/components/base/chat/chat'import CopyIcon from '@/app/components/base/copy-icon'import { LoadingPlaceholder } from '@/app/components/base/loading-placeholder'+import { ExternalTraceRow } from '@/app/components/workflow/run/external-trace-row'import { toast } from '@/app/notifications'import useTimestamp from '@/hooks/use-timestamp'import { consoleQuery } from '@/service/console'@@ -145,6 +146,17 @@ export function AgentLogDetailPanel({} as ChatConfig}chatList={chatList}+ renderMessageFooter={(item) => (+ <dl>+ <ExternalTraceRow+ source={+ log?.source?.type === 'workflow'+ ? { kind: 'node', appId: log.source.app_id, nodeExecutionId: item.id }+ : { kind: 'agent', agentId, messageId: item.id }+ }+ />+ </dl>+ )}noChatInputhideProcessDetailchatContainerInnerClassName="px-3"diff --git a/web/features/agent-v2/agent-detail/monitoring/__tests__/page.spec.tsx b/web/features/agent-v2/agent-detail/monitoring/__tests__/page.spec.tsxindex 3c2d95e4c6e..a1ea97ab22c 100644--- a/web/features/agent-v2/agent-detail/monitoring/__tests__/page.spec.tsx+++ b/web/features/agent-v2/agent-detail/monitoring/__tests__/page.spec.tsx@@ -7,6 +7,8 @@ import { act, render, screen, waitFor } from '@testing-library/react'import userEvent from '@testing-library/user-event'import { AgentMonitoringPage } from '../page'+vi.mock('../tracing-configuration', () => ({ AgentTracingConfiguration: () => null }))+const mocks = vi.hoisted(() => ({statisticsQueryFn: vi.fn(),logSourcesQueryFn: vi.fn(),diff --git a/web/features/agent-v2/agent-detail/monitoring/__tests__/tracing-configuration.spec.tsx b/web/features/agent-v2/agent-detail/monitoring/__tests__/tracing-configuration.spec.tsxnew file mode 100644index 00000000000..cc0d34c9708--- /dev/null+++ b/web/features/agent-v2/agent-detail/monitoring/__tests__/tracing-configuration.spec.tsx@@ -0,0 +1,528 @@+import type {+ AppTraceResponse,+ TraceProviderCapabilitiesResponse,+} from '@dify/contracts/api/console/agent/types.gen'+import { act, render, screen, waitFor, within } from '@testing-library/react'+import userEvent from '@testing-library/user-event'+import { AgentPermission } from '@/features/agent-v2/acl'+import { consoleQuery } from '@/service/console'+import { httpErrorFromResponse } from '@/service/http-error'+import { createConsoleQueryWrapper } from '@/test/console/query-data'+import { createAgentFixture } from '@/test/fixtures/agent'+import { createNuqsTestWrapper } from '@/test/nuqs-testing'+import { AgentTracingConfiguration } from '../tracing-configuration'++const request = vi.hoisted(() =>+ vi.fn<(url: string, init: RequestInit, options: { request: Request }) => Promise<Response>>(),+)+vi.mock('@/service/base', async (importOriginal) => ({+ ...(await importOriginal<typeof import('@/service/base')>()),+ request,+}))++const langfuse = {+ public_key: 'public',+ secret_key: '[__MASKED__]',+ host: 'https://cloud.langfuse.com',+}+const capabilities: TraceProviderCapabilitiesResponse = {+ provider: 'langfuse',+ agent_spans: true,+ session: true,+ native_usage: true,+ native_cost: true,+ trace_url: true,+ span_url: false,+ api_collection_enabled: true,+ export_ack: 'accepted',+}++function setup({+ permissions = [AgentPermission.Monitor, AgentPermission.Edit] as string[],+ configured = true,+} = {}) {+ const { wrapper: QueryWrapper, queryClient } = createConsoleQueryWrapper({+ systemFeatures: { rbac_enabled: true, agent_tracing_api_collection_enabled: true },+ })+ const detailKey = consoleQuery.agent.byAgentId.get.queryKey({+ input: { params: { agent_id: 'agent-1' } },+ })+ queryClient.setQueryData(+ detailKey,+ createAgentFixture({ id: 'agent-1', permission_keys: permissions }),+ )+ const state = {+ policy: {+ enabled: configured,+ tracing_provider: configured ? 'langfuse' : null,+ capture_content: false,+ capture_agent: true,+ } satisfies AppTraceResponse,+ config: configured ? langfuse : null,+ failPolicy: false,+ failDelete: false,+ failConfig: false,+ failCapabilities: false,+ capabilities: { ...capabilities },+ }+ const sent: Request[] = []+ request.mockImplementation(async (_url, _init, { request: req }) => {+ sent.push(req.clone())+ const url = new URL(req.url)+ if (url.pathname.endsWith('/agent/agent-1'))+ return Response.json(createAgentFixture({ id: 'agent-1', permission_keys: permissions }))+ if (url.pathname.endsWith('/trace')) {+ if (req.method === 'POST') {+ if (state.failPolicy)+ throw await httpErrorFromResponse(+ Response.json(+ { code: 'invalid_param', message: 'Policy unavailable' },+ { status: 400 },+ ),+ )+ state.policy = await req.json()+ }+ return Response.json(state.policy)+ }+ if (url.pathname.endsWith('/trace-capabilities')) {+ if (state.failCapabilities)+ throw await httpErrorFromResponse(+ Response.json(+ { code: 'tracing_provider_unavailable', message: 'Capabilities unavailable' },+ { status: 400 },+ ),+ )+ return Response.json(state.capabilities)+ }+ if (url.pathname.endsWith('/trace-config')) {+ if (req.method === 'GET') {+ const config = url.searchParams.get('tracing_provider') === 'langfuse' ? state.config : null+ return Response.json({ tracing_config: config, has_not_configured: !config })+ }+ if (req.method === 'DELETE') {+ if (state.failDelete)+ throw await httpErrorFromResponse(+ Response.json(+ { code: 'invalid_param', message: 'Delete unavailable' },+ { status: 400 },+ ),+ )+ state.config = null+ state.policy = { ...state.policy, enabled: false, tracing_provider: null }+ return new Response(null, { status: 204 })+ }+ if (state.failConfig)+ throw await httpErrorFromResponse(+ Response.json({ code: 'invalid_param', message: 'Config rejected' }, { status: 400 }),+ )+ const body = await req.json()+ if (body.activate)+ state.policy = { ...state.policy, enabled: true, tracing_provider: body.tracing_provider }+ state.config = { ...body.tracing_config, secret_key: '[__MASKED__]' }+ return Response.json({ result: 'success' }, { status: req.method === 'POST' ? 201 : 200 })+ }+ throw new Error(`Unexpected request ${req.method} ${url.pathname}`)+ })+ const { wrapper: NuqsWrapper } = createNuqsTestWrapper({ hasMemory: true })+ const view = render(<AgentTracingConfiguration agentId="agent-1" />, {+ wrapper: ({ children }) => (+ <QueryWrapper>+ <NuqsWrapper>{children}</NuqsWrapper>+ </QueryWrapper>+ ),+ })+ return { ...view, state, sent, queryClient, detailKey }+}++async function openPanel(configured = true, { expandCapture = configured } = {}) {+ const user = userEvent.setup()+ const trigger = await screen.findByRole('button', {+ name: configured ? /app.tracing.enabled/ : 'app.tracing.title',+ })+ await waitFor(() => expect(trigger).toBeEnabled())+ await user.click(trigger)+ // Capture settings stay collapsed until opened.+ if (expandCapture)+ await user.click(await screen.findByRole('button', { name: /app\.tracing\.captureTitle/ }))+ return user+}+async function openProvider(user: ReturnType<typeof userEvent.setup>) {+ const group = within(screen.getByRole('group', { name: 'app.tracing.langfuse.title' }))+ await user.click(group.getByRole('button', { name: 'app.tracing.config' }))+}+const writes = (sent: Request[]) => sent.filter((req) => req.method !== 'GET')++function holdPolicySaves() {+ const server = request.getMockImplementation()!+ const saves: Array<{ request: Request; finish: (fail?: boolean) => void }> = []+ request.mockImplementation(async (...args) => {+ const req = args[2].request+ if (req.method === 'POST' && new URL(req.url).pathname.endsWith('/trace')) {+ const fail = await new Promise<boolean>((resolve) => {+ saves.push({ request: req.clone(), finish: (failed = false) => resolve(failed) })+ })+ if (fail)+ throw await httpErrorFromResponse(+ Response.json({ code: 'invalid_param', message: 'Policy unavailable' }, { status: 400 }),+ )+ }+ return server(...args)+ })+ return saves+}++describe('Agent tracing configuration', () => {+ it.each(+ [[], [AgentPermission.Edit], [AgentPermission.LogManage]].map((permissions) => ({+ permissions,+ })),+ )('does not expose tracing without Monitor permission: $permissions', async ({ permissions }) => {+ const { sent, queryClient } = setup({ permissions })+ await waitFor(() => expect(queryClient.isFetching()).toBe(0))+ expect(screen.queryByRole('button')).not.toBeInTheDocument()+ expect(sent.some((req) => new URL(req.url).pathname.includes('/trace'))).toBe(false)+ })++ it('shows policy and capabilities to Monitor-only users without requesting credentials', async () => {+ const { sent } = setup({ permissions: [AgentPermission.Monitor] })+ const user = await openPanel()+ expect(+ await screen.findByRole('button', { name: /app\.tracing\.capabilities/ }),+ ).toBeInTheDocument()+ expect(screen.getByRole('switch', { name: 'app.tracing.captureContent' })).toHaveAttribute(+ 'aria-readonly',+ 'true',+ )+ expect(screen.getByRole('switch', { name: 'app.tracing.captureAgent' })).toBeChecked()+ for (const control of screen.getAllByRole('switch')) {+ expect(control).toHaveAttribute('aria-readonly', 'true')+ await user.click(control)+ await user.keyboard(' {Enter}')+ }+ expect(screen.queryByRole('button', { name: 'app.tracing.config' })).not.toBeInTheDocument()+ expect(sent.some((req) => new URL(req.url).pathname.endsWith('/trace-config'))).toBe(false)+ expect(writes(sent)).toHaveLength(0)+ })++ it.each([false, true])(+ 'keeps switches responsive and saves the latest complete configuration when the first save fails: %s',+ async (failFirst) => {+ const { state } = setup()+ const user = await openPanel()+ const saves = holdPolicySaves()+ const content = screen.getByRole('switch', { name: 'app.tracing.captureContent' })+ const agent = screen.getByRole('switch', { name: 'app.tracing.captureAgent' })+ await user.click(content)+ expect(content).toBeChecked()+ await user.click(agent)+ expect(agent).not.toBeChecked()+ for (const control of screen.getAllByRole('switch')) {+ expect(control).not.toHaveAttribute('aria-busy', 'true')+ expect(control).not.toHaveAttribute('aria-disabled', 'true')+ }+ expect(saves).toHaveLength(1)+ await act(() => saves[0]!.finish(failFirst))+ await waitFor(() => expect(saves).toHaveLength(2))+ expect(await saves[1]!.request.json()).toMatchObject({+ capture_content: true,+ capture_agent: false,+ })+ expect(agent).not.toBeChecked()+ expect(content).toBeChecked()+ await act(() => saves[1]!.finish())+ await waitFor(() => expect(state.policy.capture_agent).toBe(false))+ expect(state.policy.capture_content).toBe(true)+ },+ )++ it('keeps the latest intent when the same switch is toggled repeatedly and saves fail', async () => {+ const { state } = setup()+ const user = await openPanel()+ const saves = holdPolicySaves()+ const content = screen.getByRole('switch', { name: 'app.tracing.captureContent' })+ await user.click(content)+ await user.click(content)+ await user.click(content)+ expect(content).toBeChecked()+ await act(() => saves[0]!.finish(true))+ await waitFor(() => expect(saves).toHaveLength(2))+ expect(content).toBeChecked()+ await act(() => saves[1]!.finish())+ await waitFor(() => expect(saves).toHaveLength(3))+ expect(content).toBeChecked()+ await act(() => saves[2]!.finish(true))+ await waitFor(() => expect(content).not.toBeChecked())+ expect(state.policy.capture_content).toBe(false)+ expect(screen.getByRole('alert')).toHaveTextContent('Policy unavailable')+ })++ it('rolls back only the failed change after another setting has saved', async () => {+ const { state } = setup()+ const user = await openPanel()+ const saves = holdPolicySaves()+ const content = screen.getByRole('switch', { name: 'app.tracing.captureContent' })+ const agent = screen.getByRole('switch', { name: 'app.tracing.captureAgent' })+ await user.click(content)+ await user.click(agent)+ await act(() => saves[0]!.finish())+ await waitFor(() => expect(saves).toHaveLength(2))+ await act(() => saves[1]!.finish(true))+ await waitFor(() => expect(agent).toBeChecked())+ expect(content).toBeChecked()+ expect(state.policy).toMatchObject({ capture_content: true, capture_agent: true })+ })++ it('retains a successful save when refresh fails, then rolls back a later failed save to it', async () => {+ const { state } = setup()+ const user = await openPanel()+ const server = request.getMockImplementation()!+ request.mockImplementation(async (...args) => {+ const req = args[2].request+ if (req.method === 'GET' && new URL(req.url).pathname.endsWith('/trace'))+ throw await httpErrorFromResponse(+ Response.json({ message: 'Refresh unavailable' }, { status: 400 }),+ )+ return server(...args)+ })+ const content = screen.getByRole('switch', { name: 'app.tracing.captureContent' })+ const saves = holdPolicySaves()+ await user.click(content)+ await act(() => saves[0]!.finish())+ await waitFor(() => expect(state.policy.capture_content).toBe(true))+ await user.click(content)+ await waitFor(() => expect(saves).toHaveLength(2))+ expect(content).not.toBeChecked()+ await act(() => saves[1]!.finish(true))+ await waitFor(() => expect(content).toBeChecked())+ expect(screen.getByRole('alert')).toHaveTextContent('Policy unavailable')+ })++ it('updates the main switch and entry immediately, then rolls back a failed save', async () => {+ setup()+ const user = await openPanel()+ const saves = holdPolicySaves()+ const control = screen.getByRole('switch', { name: 'app.tracing.tracing' })+ const panel = within(screen.getByRole('dialog', { name: 'app.tracing.tracing' }))+ expect(panel.getByText('app.tracing.enabled')).toBeInTheDocument()+ await user.click(control)+ expect(control).not.toBeChecked()+ expect(panel.getByText('app.tracing.disabled')).toBeInTheDocument()+ expect(screen.getByRole('button', { name: /app.tracing.disabled/ })).toBeInTheDocument()+ await act(() => saves[0]!.finish(true))+ await waitFor(() => expect(control).toBeChecked())+ expect(panel.getByText('app.tracing.enabled')).toBeInTheDocument()+ expect(screen.getByRole('button', { name: /app.tracing.enabled/ })).toBeInTheDocument()+ })++ it('preserves all policy fields when changing capture flags and refreshing', async () => {+ const { sent, state, queryClient } = setup()+ const user = await openPanel()+ await user.click(screen.getByRole('switch', { name: 'app.tracing.captureContent' }))+ await waitFor(() =>+ expect(screen.getByRole('switch', { name: 'app.tracing.captureContent' })).toBeChecked(),+ )+ expect(await writes(sent)[0]!.json()).toEqual({+ enabled: true,+ tracing_provider: 'langfuse',+ capture_content: true,+ capture_agent: true,+ })+ await user.click(screen.getByRole('switch', { name: 'app.tracing.captureAgent' }))+ await waitFor(() =>+ expect(screen.getByRole('switch', { name: 'app.tracing.captureAgent' })).not.toBeChecked(),+ )+ expect(state.policy).toEqual({+ enabled: true,+ tracing_provider: 'langfuse',+ capture_content: true,+ capture_agent: false,+ })+ await act(() =>+ queryClient.invalidateQueries({ queryKey: consoleQuery.agent.byAgentId.trace.get.key() }),+ )+ expect(screen.getByRole('switch', { name: 'app.tracing.captureContent' })).toBeChecked()+ expect(screen.getByRole('switch', { name: 'app.tracing.captureAgent' })).not.toBeChecked()+ expect(sent.every((req) => new URL(req.url).pathname.includes('/agent/agent-1/'))).toBe(true)+ })++ it('keeps a failed save-and-enable draft and retries the single atomic request', async () => {+ const { state, sent } = setup({ configured: false })+ const user = await openPanel(false)+ await openProvider(user)+ await user.type(+ screen.getByRole('textbox', { name: 'app.tracing.configProvider.publicKey' }),+ 'public',+ )+ await user.type(+ screen.getByRole('textbox', { name: 'app.tracing.configProvider.secretKey' }),+ 'secret',+ )+ const host = screen.getByRole('textbox', { name: 'Host' })+ await user.type(host, 'https://cloud.langfuse.com')+ state.failConfig = true+ await user.click(screen.getByRole('button', { name: 'common.operation.saveAndEnable' }))+ expect(await screen.findByRole('alert')).toHaveTextContent('Config rejected')+ expect(state.config).toBeNull()+ expect(state.policy.enabled).toBe(false)+ expect(host).toHaveValue('https://cloud.langfuse.com')+ expect(writes(sent)).toHaveLength(1)+ state.failConfig = false+ await user.clear(host)+ await user.type(host, 'https://updated.langfuse.com')+ await user.click(screen.getByRole('button', { name: 'common.operation.saveAndEnable' }))+ await waitFor(() =>+ expect(+ screen.queryByRole('dialog', { name: /app.tracing.configProvider.title/ }),+ ).not.toBeInTheDocument(),+ )+ expect(+ writes(sent).map((req) => `${req.method} ${new URL(req.url).pathname.split('/').at(-1)}`),+ ).toEqual(['POST trace-config', 'POST trace-config'])+ expect(await writes(sent)[1]!.json()).toEqual({+ tracing_provider: 'langfuse',+ tracing_config: { ...langfuse, secret_key: 'secret', host: 'https://updated.langfuse.com' },+ activate: true,+ })+ expect(screen.getByRole('switch', { name: 'app.tracing.tracing' })).toBeChecked()+ expect(state.policy).toEqual({+ enabled: true,+ tracing_provider: 'langfuse',+ capture_content: false,+ capture_agent: true,+ })+ expect(state.config?.secret_key).toBe('[__MASKED__]')+ })++ it('preserves the draft after concurrent deletion and clears the conflict when retrying creation', async () => {+ const { state } = setup()+ const user = await openPanel()+ await openProvider(user)+ const host = screen.getByRole('textbox', { name: 'Host' })+ await user.clear(host)+ await user.type(host, 'https://draft.langfuse.com')+ const server = request.getMockImplementation()!+ request.mockImplementation(async (...args) => {+ if (args[2].request.method === 'PATCH') {+ state.config = null+ state.policy = { ...state.policy, enabled: false, tracing_provider: null }+ throw await httpErrorFromResponse(+ Response.json(+ {+ code: 'tracing_config_conflict',+ message: 'Tracing configuration changed. Refresh and try again.',+ },+ { status: 409 },+ ),+ )+ }+ return server(...args)+ })+ await user.click(screen.getByRole('button', { name: 'common.operation.save' }))+ expect(await screen.findByRole('alert')).toHaveTextContent('Tracing configuration changed')+ expect(host).toHaveValue('https://draft.langfuse.com')+ expect(screen.getByRole('button', { name: 'common.operation.saveAndEnable' })).toBeEnabled()+ expect(+ screen.getByRole('switch', { name: 'app.tracing.tracing', hidden: true }),+ ).not.toBeChecked()++ let finishRetry!: () => void+ const retry = new Promise<void>((resolve) => {+ finishRetry = resolve+ })+ request.mockImplementation(async (...args) => {+ if (args[2].request.method === 'POST') await retry+ return server(...args)+ })+ await user.type(+ screen.getByRole('textbox', { name: 'app.tracing.configProvider.secretKey' }),+ 'secret',+ )+ await user.click(screen.getByRole('button', { name: 'common.operation.saveAndEnable' }))+ expect(screen.queryByRole('alert')).not.toBeInTheDocument()+ expect(host).toHaveValue('https://draft.langfuse.com')+ await act(async () => finishRetry())+ await waitFor(() =>+ expect(+ screen.queryByRole('dialog', { name: /app.tracing.configProvider.title/ }),+ ).not.toBeInTheDocument(),+ )+ expect(screen.getByRole('switch', { name: 'app.tracing.tracing' })).toBeChecked()+ })++ it('preserves tracing after failed deletion and retries deletion without a policy request', async () => {+ const { state, sent } = setup()+ const user = await openPanel()+ await openProvider(user)+ state.failDelete = true+ await user.click(screen.getByRole('button', { name: 'common.operation.remove' }))+ const dialog = within(screen.getByRole('alertdialog'))+ await user.click(dialog.getByRole('button', { name: 'common.operation.remove' }))+ expect(await dialog.findByRole('alert')).toHaveTextContent('Delete unavailable')+ expect(writes(sent).map((req) => req.method)).toEqual(['DELETE'])+ expect(state.config).toEqual(langfuse)+ expect(state.policy.enabled).toBe(true)+ state.failDelete = false+ await user.click(dialog.getByRole('button', { name: 'common.operation.remove' }))+ await waitFor(() => expect(screen.queryByRole('alertdialog')).not.toBeInTheDocument())+ expect(writes(sent).map((req) => req.method)).toEqual(['DELETE', 'DELETE'])+ expect(state.config).toBeNull()+ expect(screen.getByRole('switch', { name: 'app.tracing.tracing' })).not.toBeChecked()+ expect(state.policy).toEqual({+ enabled: false,+ tracing_provider: null,+ capture_content: false,+ capture_agent: true,+ })+ })++ it('refreshes capabilities after updating masked credentials', async () => {+ const { sent } = setup()+ const user = await openPanel()+ await openProvider(user)+ await user.click(screen.getByRole('button', { name: 'common.operation.save' }))+ await waitFor(() =>+ expect(screen.queryByRole('textbox', { name: 'Host' })).not.toBeInTheDocument(),+ )+ const patch = writes(sent).find((req) => req.method === 'PATCH')!+ expect(await patch.json()).toEqual({ tracing_provider: 'langfuse', tracing_config: langfuse })+ expect(+ sent.filter((req) => new URL(req.url).pathname.endsWith('/trace-capabilities')).length,+ ).toBeGreaterThan(1)+ })++ it('retries capabilities independently without blocking configuration', async () => {+ const { state } = setup()+ state.failCapabilities = true+ const user = await openPanel()+ expect(await screen.findByRole('alert')).toHaveTextContent('app.tracing.capabilitiesLoadFailed')+ expect(+ within(screen.getByRole('group', { name: 'app.tracing.langfuse.title' })).getByRole(+ 'button',+ { name: 'app.tracing.config' },+ ),+ ).toBeEnabled()+ state.failCapabilities = false+ await user.click(screen.getByRole('button', { name: 'common.operation.retry' }))+ expect(+ await screen.findByRole('button', { name: /app\.tracing\.capabilities/ }),+ ).toBeInTheDocument()+ })++ it('closes credential editing when Edit permission is revoked', async () => {+ const { queryClient, detailKey } = setup()+ const user = await openPanel()+ await openProvider(user)+ act(() =>+ queryClient.setQueryData(+ detailKey,+ createAgentFixture({ permission_keys: [AgentPermission.Monitor] }),+ ),+ )+ await waitFor(() =>+ expect(+ screen.queryByRole('dialog', { name: /app.tracing.configProvider.title/ }),+ ).not.toBeInTheDocument(),+ )+ expect(screen.queryByRole('button', { name: 'app.tracing.config' })).not.toBeInTheDocument()+ })+})diff --git a/web/features/agent-v2/agent-detail/monitoring/page.tsx b/web/features/agent-v2/agent-detail/monitoring/page.tsxindex f294abcd93c..2e3f939618f 100644--- a/web/features/agent-v2/agent-detail/monitoring/page.tsx+++ b/web/features/agent-v2/agent-detail/monitoring/page.tsx@@ -4,7 +4,6 @@ import type { AgentLogSourceResponse } from '@dify/contracts/api/console/agent/timport type { ReactNode } from 'react'import type { AgentMonitoringPeriod } from './time-range-picker'import { Button } from '@langgenius/dify-ui/button'-import { IconButton } from '@langgenius/dify-ui/icon-button'import {ScrollArea,ScrollAreaContent,@@ -12,26 +11,17 @@ import {ScrollAreaThumb,ScrollAreaViewport,} from '@langgenius/dify-ui/scroll-area'-import {- Select,- SelectItem,- SelectItemIndicator,- SelectItemText,- SelectList,- SelectPopup,- SelectPortal,- SelectPositioner,- SelectTrigger,-} from '@langgenius/dify-ui/select'import { keepPreviousData, useQuery } from '@tanstack/react-query'import dayjs from 'dayjs'import { useState } from 'react'import { useTranslation } from 'react-i18next'+import Chip from '@/app/components/base/chip'import { consoleQuery } from '@/service/console'import { AgentDetailSectionSurface } from '../section-surface'import { AgentMonitoringChart } from './chart'import { getAgentMonitoringMetrics } from './metrics'import { AgentMonitoringTimeRangePicker } from './time-range-picker'+import { AgentTracingConfiguration } from './tracing-configuration'type SourceFilterValue = 'all' | AgentLogSourceResponse['id']type SourceFilterItem = {@@ -115,20 +105,24 @@ export function AgentMonitoringPage({ agentId }: AgentMonitoringPageProps) {</p></div>- <div className="mt-3 flex min-w-0 flex-wrap items-center gap-2">- <AgentMonitoringTimeRangePicker value={period} onChange={setPeriod} />+ <div className="mt-3 flex min-w-0 flex-wrap items-end justify-between gap-3">+ <div className="flex min-w-0 flex-wrap items-center gap-2">+ <AgentMonitoringTimeRangePicker value={period} onChange={setPeriod} />- <AgentMonitoringSourceFilter- value={sourceFilter}- items={sourceItems}- label={t(($) => $['agentDetail.metadata.sourceLabel'])}- onSelect={(item) => {- setSourceFilter(item.value)- }}- onClear={() => {- setSourceFilter('all')- }}- />+ <Chip<SourceFilterValue>+ showLeftIcon={false}+ value={sourceFilter}+ items={sourceItems}+ label={t(($) => $['agentDetail.metadata.sourceLabel'])}+ onSelect={(item) => {+ setSourceFilter(item.value)+ }}+ onClear={() => {+ setSourceFilter('all')+ }}+ />+ </div>+ <AgentTracingConfiguration agentId={agentId} /></div></header><div className="px-6 pt-2">@@ -177,74 +171,6 @@ export function AgentMonitoringPage({ agentId }: AgentMonitoringPageProps) {)}-function AgentMonitoringSourceFilter({- value,- items,- label,- onSelect,- onClear,-}: {- value: SourceFilterValue- items: SourceFilterItem[]- label: string- onSelect: (item: SourceFilterItem) => void- onClear: () => void-}) {- const { t } = useTranslation(['common'])- const selectedItem = items.find((item) => Object.is(item.value, value))- const selectedName = selectedItem?.name ?? ''- const triggerLabel = selectedName ? `${label} ${selectedName}` : label- const clearLabel = selectedName- ? `${t(($) => $['operation.clear'])} ${triggerLabel}`- : t(($) => $['operation.clear'])-- return (- <Select- value={selectedItem?.value ?? null}- itemToStringLabel={(itemValue: SourceFilterValue) =>- items.find((item) => Object.is(item.value, itemValue))?.name ?? ''- }- itemToStringValue={(itemValue) => String(itemValue)}- onValueChange={(nextValue) => {- if (nextValue === null) return- const selected = items.find((item) => Object.is(item.value, nextValue))- if (selected) onSelect(selected)- }}- >- <div className="flex w-fit max-w-full items-center gap-1">- <SelectTrigger- aria-label={triggerLabel}- className="h-auto min-h-8 w-fit max-w-full min-w-53 cursor-pointer items-center rounded-lg border-[0.5px] border-components-button-secondary-border bg-components-button-secondary-bg px-2 py-1 shadow-xs hover:border-components-button-secondary-border-hover hover:bg-components-button-secondary-bg-hover! data-popup-open:border-components-button-secondary-border-hover! data-popup-open:bg-components-button-secondary-bg-hover! data-popup-open:hover:border-components-button-secondary-border-hover data-popup-open:hover:bg-components-button-secondary-bg-hover! [&>*:last-child]:hidden"- >- <span className="flex min-w-0 grow items-center gap-1 text-left">- <span className="flex min-w-0 grow items-center gap-1 px-1">- <span className="shrink-0 system-sm-regular text-text-tertiary">{label}</span>- <span className="truncate system-sm-medium text-text-secondary">{selectedName}</span>- </span>- </span>- </SelectTrigger>- <IconButton aria-label={clearLabel} size="md" className="shrink-0" onClick={onClear}>- <span aria-hidden="true" className="i-ri-close-circle-fill size-3.5" />- </IconButton>- <SelectPortal>- <SelectPositioner placement="bottom-start" sideOffset={4}>- <SelectPopup className="relative w-61 rounded-xl border-[0.5px] bg-components-panel-bg-blur p-0 text-sm text-text-secondary shadow-lg outline-hidden backdrop-blur-[5px] focus:outline-hidden focus-visible:outline-hidden">- <SelectList className="max-h-72 p-1">- {items.map((item) => (- <SelectItem key={item.value} value={item.value}>- <SelectItemText title={item.name}>{item.name}</SelectItemText>- <SelectItemIndicator />- </SelectItem>- ))}- </SelectList>- </SelectPopup>- </SelectPositioner>- </SelectPortal>- </div>- </Select>- )-}-function AgentMonitoringState({ children }: { children: ReactNode }) {return (<div className="flex h-79 items-center justify-center rounded-xl border-[0.5px] border-components-panel-border bg-components-panel-on-panel-item-bg px-6 py-8 text-center system-sm-regular text-text-tertiary">diff --git a/web/features/agent-v2/agent-detail/monitoring/tracing-configuration.tsx b/web/features/agent-v2/agent-detail/monitoring/tracing-configuration.tsxnew file mode 100644index 00000000000..a36239bc4a5--- /dev/null+++ b/web/features/agent-v2/agent-detail/monitoring/tracing-configuration.tsx@@ -0,0 +1,10 @@+import { TracingConfiguration } from '@/app/components/app/tracing/configuration'+import { useAgentPermissions } from '../../permissions'++export function AgentTracingConfiguration({ agentId }: { agentId: string }) {+ const { canMonitor, canEdit } = useAgentPermissions(agentId)+ if (!canMonitor) return null+ return (+ <TracingConfiguration key={agentId} resource={{ kind: 'agent', agentId }} readOnly={!canEdit} />+ )+}diff --git a/web/i18n/locales/ar-TN/app.json b/web/i18n/locales/ar-TN/app.jsonindex 74625a69f8a..daeeb77c25c 100644--- a/web/i18n/locales/ar-TN/app.json+++ b/web/i18n/locales/ar-TN/app.json@@ -243,10 +243,27 @@"switchTip": "غير مسموح","switchTipEnd": " بالعودة إلى Basic Orchestrate.","switchTipStart": "سيتم إنشاء نسخة تطبيق جديدة لك، وستنتقل النسخة الجديدة إلى Workflow Orchestrate. النسخة الجديدة ستكون ",+ "tracing.agentSpansUnsupported": "لا يدعم {{provider}} تتبعات Agent الكاملة بعد.",+ "tracing.agentTracingUnavailable": "تتبع Agent غير متاح، لذا لن تتضمن التتبعات التفاصيل الداخلية للـ Agent ولا روابط التشغيل.","tracing.aliyun.description": "منصة المراقبة المدارة بالكامل والتي لا تحتاج إلى صيانة والمقدمة من Alibaba Cloud، تتيح المراقبة الجاهزة والتتبع وتقييم تطبيقات Dify.","tracing.aliyun.title": "Cloud Monitor","tracing.arize.description": "مراقبة LLM على مستوى المؤسسة، والتقييم عبر الإنترنت وغير المتصل بالإنترنت، والمراقبة، والتجريب - بدعم من OpenTelemetry. مصمم خصيصًا لتطبيقات LLM والتطبيقات التي تعتمد على الوكيل.","tracing.arize.title": "Arize",+ "tracing.capabilities": "إمكانات المزوّد",+ "tracing.capabilitiesLoadFailed": "تعذر تحميل قدرات المزوّد.",+ "tracing.capability.agent_spans": "مقاطع الوكيل",+ "tracing.capability.native_cost": "التكلفة الأصلية",+ "tracing.capability.native_usage": "الاستخدام الأصلي",+ "tracing.capability.session": "الجلسات",+ "tracing.capability.span_url": "روابط المقاطع",+ "tracing.capability.trace_url": "روابط التتبع",+ "tracing.capabilitySummary.allSupported": "الكل مدعوم",+ "tracing.capabilitySummary.unsupported": "{{count}} غير مدعوم",+ "tracing.captureAgent": "جمع العمليات الداخلية للوكيل",+ "tracing.captureAgentDescription": "إرسال استدعاءات النموذج والأدوات الداخلية للـ Agent",+ "tracing.captureContent": "جمع المحتوى",+ "tracing.captureContentDescription": "إرسال مدخلات ومخرجات كل تشغيل",+ "tracing.captureTitle": "التقاط بيانات Agent","tracing.config": "تكوين","tracing.configProvider.clientId": "معرف العميل (Client ID)","tracing.configProvider.clientSecret": "سر العميل (Client Secret)",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "أدخل {{key}} الخاص بك","tracing.configProvider.project": "مشروع","tracing.configProvider.publicKey": "المفتاح العام",- "tracing.configProvider.removeConfirmContent": "التكوين الحالي قيد الاستخدام، وستؤدي إزالته إلى إيقاف ميزة التتبع.",+ "tracing.configProvider.removeConfirmContentInUse": "سيتم إيقاف التتبع، وسيتم حذف بيانات الاعتماد المحفوظة.",+ "tracing.configProvider.removeConfirmContentNotInUse": "سيتم حذف بيانات الاعتماد المحفوظة. ستحتاج إلى إدخالها مرة أخرى لاستخدام {{key}}.","tracing.configProvider.removeConfirmTitle": "إزالة تكوين {{key}}؟","tracing.configProvider.secretKey": "المفتاح السري","tracing.configProvider.title": "تكوين ",@@ -265,7 +283,7 @@"tracing.configProvider.username": "اسم المستخدم","tracing.configProvider.viewDocsLink": "عرض وثائق {{key}}","tracing.configProviderTitle.configured": "تم التكوين",- "tracing.configProviderTitle.moreProvider": "مزيد من المزودين",+ "tracing.configProviderTitle.moreProviders": "المزيد من المزوّدين","tracing.configProviderTitle.notConfigured": "تكوين المزود لتمكين التتبع","tracing.databricks.description": "توفر Databricks تدفق MLflow مدار بالكامل مع حوكمة وأمان قويين لتخزين بيانات التتبع.","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "الرجاء تكوين المزود أولاً","tracing.enabled": "في الخدمة","tracing.inUse": "قيد الاستخدام",+ "tracing.inherited.description": "عند تشغيل هذا الـ Agent في سير العمل هذا، يستخدم إعدادات التتبع الخاصة بسير العمل، بما في ذلك المزوّد وحالة التشغيل/الإيقاف وسياسة الالتقاط. لا تنطبق إعدادات التتبع الخاصة بالـ Agent هنا، ولا تحتاج العقدة إلى إعداد منفصل.",+ "tracing.inherited.loadFailed": "تعذر تحميل حالة التتبع.",+ "tracing.inherited.notConfigured": "غير مُعد",+ "tracing.inherited.off": "إيقاف",+ "tracing.inherited.on": "تشغيل",+ "tracing.inherited.providerDisabled": "{{provider}} معطّل",+ "tracing.inherited.providerEnabled": "{{provider}} مفعّل",+ "tracing.inherited.settings": "الإعداد في سير العمل",+ "tracing.inherited.title": "التتبع الخارجي","tracing.langfuse.description": "مراقبة LLM مفتوحة المصدر وتقييمها وإدارة المطالبات والمقاييس لتصحيح وتحسين تطبيق LLM الخاص بك.","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "منصة مطور شاملة لكل خطوة من خطوات دورة حياة التطبيق المدعوم بـ LLM.",@@ -283,11 +310,24 @@"tracing.opik.title": "Opik","tracing.phoenix.description": "منصة مفتوحة المصدر تعتمد على OpenTelemetry للمراقبة والتقييم وهندسة المطالبات والتجريب لتدفقات عمل LLM والوكلاء.","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "للعرض فقط",+ "tracing.run.accepted": "تم الإرسال إلى {{provider}}",+ "tracing.run.failed": "فشل الإرسال إلى {{provider}}",+ "tracing.run.pending": "جارٍ الإرسال إلى {{provider}}",+ "tracing.run.title": "التتبع الخارجي",+ "tracing.run.uncertain": "لم يؤكد {{provider}} الاستلام",+ "tracing.run.viewProject": "فتح المشروع",+ "tracing.run.viewSpan": "عرض هذه العقدة",+ "tracing.run.viewTrace": "عرض هذا التشغيل",+ "tracing.supported": "مدعوم","tracing.tencent.description": "تُوفر مراقبة أداء التطبيقات من Tencent تتبعًا شاملاً وتحليلاً متعدد الأبعاد لتطبيقات LLM.",+ "tracing.tencent.endpointHelp": "انسخ نقطة النهاية المناسبة لمنطقتك وشبكتك من Tencent Cloud LLM Observability ← التطبيقات ← ربط تطبيق.",+ "tracing.tencent.serviceNameHelp": "حتى 63 حرفًا: أحرف لاتينية صغيرة وأرقام وشرطات. ابدأ بحرف صغير وأنهِ بحرف أو رقم.","tracing.tencent.title": "Tencent APM","tracing.title": "تتبع أداء التطبيق","tracing.tracing": "تتبع","tracing.tracingDescription": "التقاط السياق الكامل لتنفيذ التطبيق، بما في ذلك مكالمات LLM، والسياق، والمطالبات، وطلبات HTTP، والمزيد، إلى منصة تتبع تابعة لجهة خارجية.",+ "tracing.unsupported": "غير متاح","tracing.view": "عرض","tracing.weave.description": "Weave هي منصة مفتوحة المصدر لتقييم واختبار ومراقبة تطبيقات LLM.","tracing.weave.title": "Weave",diff --git a/web/i18n/locales/az-AZ/app.json b/web/i18n/locales/az-AZ/app.jsonindex f7101d5d75d..a11c0c0387a 100644--- a/web/i18n/locales/az-AZ/app.json+++ b/web/i18n/locales/az-AZ/app.json@@ -243,10 +243,27 @@"switchTip": "mümkün olmayacaq","switchTipEnd": ".","switchTipStart": "Sizin üçün yeni tətbiq nüsxəsi yaradılacaq və bu nüsxə iş axınının təşkili rejiminə keçəcək. Yeni nüsxədə əsas təşkil rejiminə geri keçmək ",+ "tracing.agentSpansUnsupported": "{{provider}} hələ tam Agent izlərini dəstəkləmir.",+ "tracing.agentTracingUnavailable": "Agent izləmə əlçatan deyil, buna görə izlərdə Agent daxili detalları və icra keçidləri olmayacaq.","tracing.aliyun.description": "Alibaba Cloud tərəfindən təqdim edilən, tam idarə olunan və texniki xidmət tələb etməyən müşahidə platforması Dify tətbiqlərinin hazır monitorinq, izləmə və qiymətləndirmə imkanlarını təmin edir.","tracing.aliyun.title": "Cloud Monitor","tracing.arize.description": "OpenTelemetry əsasında müəssisə səviyyəli LLM müşahidəsi, onlayn və oflayn qiymətləndirmə, monitorinq və təcrübələr. LLM və agent əsaslı tətbiqlər üçün xüsusi hazırlanıb.","tracing.arize.title": "Arize",+ "tracing.capabilities": "Provayder imkanları",+ "tracing.capabilitiesLoadFailed": "Provayder imkanları yüklənə bilmədi.",+ "tracing.capability.agent_spans": "Agent spanları",+ "tracing.capability.native_cost": "Yerli xərc",+ "tracing.capability.native_usage": "Yerli istifadə",+ "tracing.capability.session": "Sessiyalar",+ "tracing.capability.span_url": "Span keçidləri",+ "tracing.capability.trace_url": "İz keçidləri",+ "tracing.capabilitySummary.allSupported": "Hamısı dəstəklənir",+ "tracing.capabilitySummary.unsupported": "{{count}} dəstəklənmir",+ "tracing.captureAgent": "Agent daxili əməliyyatlarını topla",+ "tracing.captureAgentDescription": "Agent-in daxili model və alət çağırışlarını göndər",+ "tracing.captureContent": "Məzmunu topla",+ "tracing.captureContentDescription": "Hər icranın giriş və çıxışlarını göndər",+ "tracing.captureTitle": "Agent məlumat toplanması","tracing.config": "Konfiqurasiya","tracing.configProvider.clientId": "OAuth müştəri ID-si","tracing.configProvider.clientSecret": "OAuth müştəri sirri",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "{{key}} üçün dəyəri daxil edin","tracing.configProvider.project": "Layihə","tracing.configProvider.publicKey": "Açıq açar",- "tracing.configProvider.removeConfirmContent": "Cari konfiqurasiya istifadə olunur, onun çıxarılması izləmə funksiyasını söndürəcək.",+ "tracing.configProvider.removeConfirmContentInUse": "İzləmə söndürüləcək və saxlanılmış etimadnamələr silinəcək.",+ "tracing.configProvider.removeConfirmContentNotInUse": "Saxlanılmış etimadnamələr silinəcək. {{key}} istifadə etmək üçün onları yenidən daxil etməli olacaqsınız.","tracing.configProvider.removeConfirmTitle": "{{key}} konfiqurasiyasının çıxarılması","tracing.configProvider.secretKey": "Gizli açar","tracing.configProvider.title": "Konfiqurasiya: ",@@ -265,7 +283,7 @@"tracing.configProvider.username": "İstifadəçi adı","tracing.configProvider.viewDocsLink": "{{key}} sənədlərinə bax","tracing.configProviderTitle.configured": "Konfiqurasiya edilib",- "tracing.configProviderTitle.moreProvider": "Daha çox provayder",+ "tracing.configProviderTitle.moreProviders": "Digər təminatçılar","tracing.configProviderTitle.notConfigured": "İzləməni aktivləşdirmək üçün provayderi konfiqurasiya et","tracing.databricks.description": "Databricks izləmə məlumatlarının saxlanması üçün güclü idarəetmə və təhlükəsizlik imkanları olan, tam idarə olunan MLflow təqdim edir.","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "Əvvəlcə provayderi konfiqurasiya edin","tracing.enabled": "Aktivdir","tracing.inUse": "İstifadə olunur",+ "tracing.inherited.description": "Bu Agent bu iş axınında işlədikdə provayder, açıq/bağlı vəziyyəti və toplama siyasəti daxil olmaqla iş axınının izləmə ayarlarından istifadə edir. Agent-in öz izləmə ayarları burada tətbiq olunmur və node üçün ayrıca quraşdırma lazım deyil.",+ "tracing.inherited.loadFailed": "İzləmə statusu yüklənə bilmədi.",+ "tracing.inherited.notConfigured": "Konfiqurasiya edilməyib",+ "tracing.inherited.off": "Bağlı",+ "tracing.inherited.on": "Açıq",+ "tracing.inherited.providerDisabled": "{{provider}} deaktiv",+ "tracing.inherited.providerEnabled": "{{provider}} aktiv",+ "tracing.inherited.settings": "İş axınında konfiqurasiya et",+ "tracing.inherited.title": "Xarici izləmə","tracing.langfuse.description": "LLM tətbiqinizdə xətaları tapmaq və onu təkmilləşdirmək üçün açıq mənbəli LLM müşahidəsi, qiymətləndirmə, təlimatların idarə edilməsi və göstəricilər.","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "LLM əsaslı tətbiqin həyat dövrünün hər mərhələsi üçün bütün imkanları birləşdirən tərtibatçı platforması.",@@ -283,11 +310,24 @@"tracing.opik.title": "Opik","tracing.phoenix.description": "LLM iş axınlarınız və agentləriniz üçün açıq mənbəli, OpenTelemetry əsaslı müşahidə, qiymətləndirmə, təlimat mühəndisliyi və təcrübə platforması.","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "Yalnız baxış",+ "tracing.run.accepted": "{{provider}} xidmətinə göndərildi",+ "tracing.run.failed": "{{provider}} xidmətinə göndərmək alınmadı",+ "tracing.run.pending": "{{provider}} xidmətinə göndərilir",+ "tracing.run.title": "Xarici izləmə",+ "tracing.run.uncertain": "{{provider}} qəbulu təsdiqləməyib",+ "tracing.run.viewProject": "Layihəni aç",+ "tracing.run.viewSpan": "Bu node-a bax",+ "tracing.run.viewTrace": "Bu icraya bax",+ "tracing.supported": "Dəstəklənir","tracing.tencent.description": "Tencent Application Performance Monitoring LLM tətbiqləri üçün hərtərəfli izləmə və çoxölçülü təhlil təmin edir.",+ "tracing.tencent.endpointHelp": "Tencent Cloud LLM Observability → Tətbiqlər → Tətbiqi qoş bölməsindən regionunuza və şəbəkənizə uyğun son nöqtəni kopyalayın.",+ "tracing.tencent.serviceNameHelp": "Ən çox 63 simvol: kiçik latın hərfləri, rəqəmlər və defislər. Kiçik hərflə başlayıb hərf və ya rəqəmlə bitməlidir.","tracing.tencent.title": "Tencent APM","tracing.title": "Tətbiqin məhsuldarlığının izlənməsi","tracing.tracing": "İzləmə","tracing.tracingDescription": "LLM çağırışları, kontekst, təlimatlar, HTTP sorğuları və digər məlumatlar daxil olmaqla tətbiqin icrasının tam kontekstini üçüncü tərəf izləmə platformasına ötürün.",+ "tracing.unsupported": "Mövcud deyil","tracing.view": "Bax","tracing.weave.description": "Weave LLM tətbiqlərinin qiymətləndirilməsi, sınaqdan keçirilməsi və monitorinqi üçün açıq mənbəli platformadır.","tracing.weave.title": "Weave",diff --git a/web/i18n/locales/de-DE/app.json b/web/i18n/locales/de-DE/app.jsonindex 6916a6c3f50..9d97fd7a219 100644--- a/web/i18n/locales/de-DE/app.json+++ b/web/i18n/locales/de-DE/app.json@@ -243,10 +243,27 @@"switchTip": "nicht erlauben","switchTipEnd": " zur Basis-Orchestrierung zurückzuwechseln.","switchTipStart": "Eine neue App-Kopie wird für Sie erstellt, und die neue Kopie wird zur Workflow-Orchestrierung wechseln. Die neue Kopie wird ",+ "tracing.agentSpansUnsupported": "{{provider}} unterstützt vollständige Agent-Traces noch nicht.",+ "tracing.agentTracingUnavailable": "Agent-Tracing ist nicht verfügbar, daher enthalten Traces keine Agent-Interna und keine Lauf-Links.","tracing.aliyun.description": "Die vollständig verwaltete und wartungsfreie Observability-Plattform von Alibaba Cloud ermöglicht eine sofortige Überwachung, Verfolgung und Bewertung von Dify-Anwendungen.","tracing.aliyun.title": "Cloud-Monitor","tracing.arize.description": "Unternehmensgerechte LLM-Observierbarkeit, Online- und Offline-Bewertung, Überwachung und Experimentierung—unterstützt durch OpenTelemetry. Speziell für LLM- und agentenbasierte Anwendungen entwickelt.","tracing.arize.title": "Arize",+ "tracing.capabilities": "Anbieterfunktionen",+ "tracing.capabilitiesLoadFailed": "Anbieterfunktionen konnten nicht geladen werden.",+ "tracing.capability.agent_spans": "Agent-Spans",+ "tracing.capability.native_cost": "Native Kosten",+ "tracing.capability.native_usage": "Native Nutzung",+ "tracing.capability.session": "Sitzungen",+ "tracing.capability.span_url": "Span-Links",+ "tracing.capability.trace_url": "Trace-Links",+ "tracing.capabilitySummary.allSupported": "Alle unterstützt",+ "tracing.capabilitySummary.unsupported": "{{count}} nicht unterstützt",+ "tracing.captureAgent": "Agent-Interna erfassen",+ "tracing.captureAgentDescription": "Interne Modell- und Tool-Aufrufe des Agents senden",+ "tracing.captureContent": "Inhalte erfassen",+ "tracing.captureContentDescription": "Ein- und Ausgaben jedes Laufs senden",+ "tracing.captureTitle": "Agent-Datenerfassung","tracing.config": "Konfigurieren","tracing.configProvider.clientId": "OAuth-Client-ID","tracing.configProvider.clientSecret": "OAuth-Client-Geheimnis",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "Geben Sie Ihren {{key}} ein","tracing.configProvider.project": "Projekt","tracing.configProvider.publicKey": "Öffentlicher Schlüssel",- "tracing.configProvider.removeConfirmContent": "Die aktuelle Konfiguration wird verwendet. Das Entfernen wird die Nachverfolgungsfunktion ausschalten.",+ "tracing.configProvider.removeConfirmContentInUse": "Die Nachverfolgung wird deaktiviert und die gespeicherten Zugangsdaten werden gelöscht.",+ "tracing.configProvider.removeConfirmContentNotInUse": "Die gespeicherten Zugangsdaten werden gelöscht. Um {{key}} wieder zu verwenden, müssen Sie sie erneut eingeben.","tracing.configProvider.removeConfirmTitle": "{{key}}-Konfiguration entfernen?","tracing.configProvider.secretKey": "Geheimer Schlüssel","tracing.configProvider.title": "Konfigurieren ",@@ -265,7 +283,7 @@"tracing.configProvider.username": "Benutzername","tracing.configProvider.viewDocsLink": "{{key}}-Dokumentation ansehen","tracing.configProviderTitle.configured": "Konfiguriert",- "tracing.configProviderTitle.moreProvider": "Weitere Anbieter",+ "tracing.configProviderTitle.moreProviders": "Weitere Anbieter","tracing.configProviderTitle.notConfigured": "Anbieter konfigurieren, um Nachverfolgung zu aktivieren","tracing.databricks.description": "Databricks bietet vollständig verwaltetes MLflow mit starker Governance und Sicherheit für die Speicherung von Trace-Daten.","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "Bitte zuerst den Anbieter konfigurieren","tracing.enabled": "In Betrieb","tracing.inUse": "In Verwendung",+ "tracing.inherited.description": "Wenn dieser Agent in diesem Workflow läuft, verwendet er die Tracing-Einstellungen des Workflows, einschließlich Anbieter, Ein/Aus-Status und Erfassungsrichtlinie. Die eigenen Tracing-Einstellungen des Agents gelten hier nicht, und der Knoten braucht keine separate Einrichtung.",+ "tracing.inherited.loadFailed": "Tracing-Status konnte nicht geladen werden.",+ "tracing.inherited.notConfigured": "Nicht konfiguriert",+ "tracing.inherited.off": "Aus",+ "tracing.inherited.on": "An",+ "tracing.inherited.providerDisabled": "{{provider}} deaktiviert",+ "tracing.inherited.providerEnabled": "{{provider}} aktiviert",+ "tracing.inherited.settings": "Im Workflow konfigurieren",+ "tracing.inherited.title": "Externes Tracing","tracing.langfuse.description": "Traces, Bewertungen, Prompt-Management und Metriken zum Debuggen und Verbessern Ihrer LLM-Anwendung.","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "Eine All-in-One-Entwicklerplattform für jeden Schritt des LLM-gesteuerten Anwendungslebenszyklus.",@@ -283,11 +310,24 @@"tracing.opik.title": "Opik","tracing.phoenix.description": "Open-Source- und OpenTelemetry-basierte Plattform für Observierbarkeit, Bewertung, Prompt-Engineering und Experimentierung für Ihre LLM-Workflows und -Agenten.","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "Nur Lesezugriff",+ "tracing.run.accepted": "An {{provider}} gesendet",+ "tracing.run.failed": "Senden an {{provider}} fehlgeschlagen",+ "tracing.run.pending": "Wird an {{provider}} gesendet",+ "tracing.run.title": "Externes Tracing",+ "tracing.run.uncertain": "{{provider}} hat den Empfang nicht bestätigt",+ "tracing.run.viewProject": "Projekt öffnen",+ "tracing.run.viewSpan": "Diesen Knoten anzeigen",+ "tracing.run.viewTrace": "Diesen Lauf anzeigen",+ "tracing.supported": "Unterstützt","tracing.tencent.description": "Tencent Application Performance Monitoring bietet umfassendes Tracing und multidimensionale Analyse für LLM-Anwendungen.",+ "tracing.tencent.endpointHelp": "Kopieren Sie den Endpunkt für Ihre Region und Ihr Netzwerk aus Tencent Cloud LLM Observability → Anwendungen → Anwendung verbinden.",+ "tracing.tencent.serviceNameHelp": "Maximal 63 Zeichen: Kleinbuchstaben, Ziffern und Bindestriche. Mit einem Kleinbuchstaben beginnen und mit einem Buchstaben oder einer Ziffer enden.","tracing.tencent.title": "Tencent APM","tracing.title": "Anwendungsleistung nachverfolgen","tracing.tracing": "Nachverfolgung","tracing.tracingDescription": "Erfassung des vollständigen Kontexts der Anwendungsausführung, einschließlich LLM-Aufrufe, Kontext, Prompts, HTTP-Anfragen und mehr, auf einer Nachverfolgungsplattform von Drittanbietern.",+ "tracing.unsupported": "Nicht verfügbar","tracing.view": "Ansehen","tracing.weave.description": "Weave ist eine Open-Source-Plattform zur Bewertung, Testung und Überwachung von LLM-Anwendungen.","tracing.weave.title": "Weben",diff --git a/web/i18n/locales/en-US/app.json b/web/i18n/locales/en-US/app.jsonindex c7fb606adff..428e9e6d96a 100644--- a/web/i18n/locales/en-US/app.json+++ b/web/i18n/locales/en-US/app.json@@ -243,10 +243,27 @@"switchTip": "not allow","switchTipEnd": " switching back to Basic Orchestrate.","switchTipStart": "A new app copy will be created for you, and the new copy will switch to Workflow Orchestrate. The new copy will ",+ "tracing.agentSpansUnsupported": "{{provider}} does not support full Agent traces yet.",+ "tracing.agentTracingUnavailable": "Agent tracing isn't available, so traces won't include Agent internals or run links.","tracing.aliyun.description": "The fully-managed and maintenance-free observability platform provided by Alibaba Cloud, enables out-of-the-box monitoring, tracing, and evaluation of Dify applications.","tracing.aliyun.title": "Cloud Monitor","tracing.arize.description": "Enterprise-grade LLM observability, online & offline evaluation, monitoring, and experimentation—powered by OpenTelemetry. Purpose-built for LLM & agent-driven applications.","tracing.arize.title": "Arize",+ "tracing.capabilities": "Provider capabilities",+ "tracing.capabilitiesLoadFailed": "Unable to load provider capabilities.",+ "tracing.capability.agent_spans": "Agent spans",+ "tracing.capability.native_cost": "Native cost",+ "tracing.capability.native_usage": "Native usage",+ "tracing.capability.session": "Sessions",+ "tracing.capability.span_url": "Span links",+ "tracing.capability.trace_url": "Trace links",+ "tracing.capabilitySummary.allSupported": "All supported",+ "tracing.capabilitySummary.unsupported": "{{count}} unsupported",+ "tracing.captureAgent": "Capture Agent internals",+ "tracing.captureAgentDescription": "Send the Agent's internal model and tool calls",+ "tracing.captureContent": "Capture content",+ "tracing.captureContentDescription": "Send each run's inputs and outputs",+ "tracing.captureTitle": "Agent data capture","tracing.config": "Config","tracing.configProvider.clientId": "OAuth Client ID","tracing.configProvider.clientSecret": "OAuth Client Secret",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "Enter your {{key}}","tracing.configProvider.project": "Project","tracing.configProvider.publicKey": "Public Key",- "tracing.configProvider.removeConfirmContent": "The current configuration is in use, removing it will turn off the Tracing feature.",+ "tracing.configProvider.removeConfirmContentInUse": "Tracing will turn off, and the saved credentials will be deleted.",+ "tracing.configProvider.removeConfirmContentNotInUse": "The saved credentials will be deleted. You'll need to enter them again to use {{key}}.","tracing.configProvider.removeConfirmTitle": "Remove {{key}} configuration?","tracing.configProvider.secretKey": "Secret Key","tracing.configProvider.title": "Config ",@@ -265,7 +283,7 @@"tracing.configProvider.username": "Username","tracing.configProvider.viewDocsLink": "View {{key}} docs","tracing.configProviderTitle.configured": "Configured",- "tracing.configProviderTitle.moreProvider": "More Provider",+ "tracing.configProviderTitle.moreProviders": "More providers","tracing.configProviderTitle.notConfigured": "Config provider to enable tracing","tracing.databricks.description": "Databricks offers fully-managed MLflow with strong governance and security for storing trace data.","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "Please config provider first","tracing.enabled": "In Service","tracing.inUse": "In use",+ "tracing.inherited.description": "When this Agent runs in this workflow, it uses the workflow's tracing settings, including provider, on/off state, and capture policy. The Agent's own tracing settings don't apply here, and the node needs no separate setup.",+ "tracing.inherited.loadFailed": "Unable to load tracing status.",+ "tracing.inherited.notConfigured": "Not configured",+ "tracing.inherited.off": "Off",+ "tracing.inherited.on": "On",+ "tracing.inherited.providerDisabled": "{{provider}} disabled",+ "tracing.inherited.providerEnabled": "{{provider}} enabled",+ "tracing.inherited.settings": "Configure in workflow",+ "tracing.inherited.title": "External tracing","tracing.langfuse.description": "Open-source LLM observability, evaluation, prompt management and metrics to debug and improve your LLM application.","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "An all-in-one developer platform for every step of the LLM-powered application lifecycle.",@@ -283,11 +310,24 @@"tracing.opik.title": "Opik","tracing.phoenix.description": "Open-source & OpenTelemetry-based observability, evaluation, prompt engineering and experimentation platform for your LLM workflows and agents.","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "View only",+ "tracing.run.accepted": "Sent to {{provider}}",+ "tracing.run.failed": "Failed to send to {{provider}}",+ "tracing.run.pending": "Sending to {{provider}}",+ "tracing.run.title": "External tracing",+ "tracing.run.uncertain": "{{provider}} has not confirmed receipt",+ "tracing.run.viewProject": "Open project",+ "tracing.run.viewSpan": "View this node",+ "tracing.run.viewTrace": "View this run",+ "tracing.supported": "Supported","tracing.tencent.description": "Tencent Application Performance Monitoring provides comprehensive tracing and multi-dimensional analysis for LLM applications.",+ "tracing.tencent.endpointHelp": "Copy the endpoint for your region and network from Tencent Cloud LLM Observability → Applications → Connect application.",+ "tracing.tencent.serviceNameHelp": "Up to 63 characters: lowercase letters, digits, and hyphens. Start with a lowercase letter and end with a letter or digit.","tracing.tencent.title": "Tencent APM","tracing.title": "Tracing app performance","tracing.tracing": "Tracing","tracing.tracingDescription": "Capture the full context of app execution, including LLM calls, context, prompts, HTTP requests, and more, to a third-party tracing platform.",+ "tracing.unsupported": "Unavailable","tracing.view": "View","tracing.weave.description": "Weave is an open-source platform for evaluating, testing, and monitoring LLM applications.","tracing.weave.title": "Weave",diff --git a/web/i18n/locales/es-ES/app.json b/web/i18n/locales/es-ES/app.jsonindex 0a7de4a41c8..7cee1ba511f 100644--- a/web/i18n/locales/es-ES/app.json+++ b/web/i18n/locales/es-ES/app.json@@ -243,10 +243,27 @@"switchTip": "volver","switchTipEnd": " a la Orquestación Básica.","switchTipStart": "Se creará una nueva copia de la app para ti y la nueva copia cambiará a Orquestación de Flujo de Trabajo. La nueva copia no permitirá",+ "tracing.agentSpansUnsupported": "{{provider}} aún no admite trazas completas de Agent.",+ "tracing.agentTracingUnavailable": "El rastreo de Agent no está disponible, así que las trazas no incluirán detalles internos del Agent ni enlaces de ejecución.","tracing.aliyun.description": "La plataforma de observabilidad totalmente gestionada y sin mantenimiento proporcionada por Alibaba Cloud, permite la monitorización, trazado y evaluación de aplicaciones Dify de manera inmediata.","tracing.aliyun.title": "Monitor de Nubes","tracing.arize.description": "Observabilidad de LLM de nivel empresarial, evaluación en línea y fuera de línea, monitoreo y experimentación—impulsada por OpenTelemetry. Diseñada específicamente para aplicaciones impulsadas por LLM y agentes.","tracing.arize.title": "Arize",+ "tracing.capabilities": "Capacidades del proveedor",+ "tracing.capabilitiesLoadFailed": "No se pudieron cargar las capacidades del proveedor.",+ "tracing.capability.agent_spans": "Spans de Agent",+ "tracing.capability.native_cost": "Coste nativo",+ "tracing.capability.native_usage": "Uso nativo",+ "tracing.capability.session": "Sesiones",+ "tracing.capability.span_url": "Enlaces de span",+ "tracing.capability.trace_url": "Enlaces de traza",+ "tracing.capabilitySummary.allSupported": "Todo compatible",+ "tracing.capabilitySummary.unsupported": "{{count}} no compatibles",+ "tracing.captureAgent": "Capturar procesos internos del Agent",+ "tracing.captureAgentDescription": "Enviar las llamadas internas a modelos y herramientas del Agent",+ "tracing.captureContent": "Capturar contenido",+ "tracing.captureContentDescription": "Enviar las entradas y salidas de cada ejecución",+ "tracing.captureTitle": "Captura de datos de Agent","tracing.config": "Configurar","tracing.configProvider.clientId": "ID de cliente OAuth","tracing.configProvider.clientSecret": "Secreto del cliente OAuth",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "Ingresa tu {{key}}","tracing.configProvider.project": "Proyecto","tracing.configProvider.publicKey": "Clave pública",- "tracing.configProvider.removeConfirmContent": "La configuración actual está en uso, eliminarla desactivará la función de rastreo.",+ "tracing.configProvider.removeConfirmContentInUse": "El rastreo se desactivará y se eliminarán las credenciales guardadas.",+ "tracing.configProvider.removeConfirmContentNotInUse": "Se eliminarán las credenciales guardadas. Tendrás que volver a introducirlas para usar {{key}}.","tracing.configProvider.removeConfirmTitle": "¿Eliminar la configuración de {{key}}?","tracing.configProvider.secretKey": "Clave secreta","tracing.configProvider.title": "Configurar ",@@ -265,7 +283,7 @@"tracing.configProvider.username": "Nombre de usuario","tracing.configProvider.viewDocsLink": "Ver documentación de {{key}}","tracing.configProviderTitle.configured": "Configurado",- "tracing.configProviderTitle.moreProvider": "Más proveedores",+ "tracing.configProviderTitle.moreProviders": "Más proveedores","tracing.configProviderTitle.notConfigured": "Configurar proveedor para habilitar el rastreo","tracing.databricks.description": "Databricks ofrece MLflow completamente gestionado con fuerte gobernanza y seguridad para almacenar datos de trazabilidad.","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "Por favor, configura el proveedor primero","tracing.enabled": "En servicio","tracing.inUse": "En uso",+ "tracing.inherited.description": "Cuando este Agent se ejecuta en este flujo de trabajo, usa la configuración de rastreo del flujo, incluidos el proveedor, el estado activado/desactivado y la política de captura. La configuración de rastreo propia del Agent no se aplica aquí y el nodo no necesita configuración aparte.",+ "tracing.inherited.loadFailed": "No se pudo cargar el estado del rastreo.",+ "tracing.inherited.notConfigured": "Sin configurar",+ "tracing.inherited.off": "Desactivado",+ "tracing.inherited.on": "Activado",+ "tracing.inherited.providerDisabled": "{{provider}} desactivado",+ "tracing.inherited.providerEnabled": "{{provider}} activado",+ "tracing.inherited.settings": "Configurar en el flujo de trabajo",+ "tracing.inherited.title": "Rastreo externo","tracing.langfuse.description": "Rastrea, evalúa, gestiona prompts y métricas para depurar y mejorar tu aplicación LLM.","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "Una plataforma de desarrollo todo en uno para cada paso del ciclo de vida de la aplicación impulsada por LLM.",@@ -283,11 +310,24 @@"tracing.opik.title": "Opik","tracing.phoenix.description": "Plataforma de observabilidad, evaluación, ingeniería de prompts y experimentación de código abierto basada en OpenTelemetry para sus flujos de trabajo y agentes de LLM.","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "Solo lectura",+ "tracing.run.accepted": "Enviado a {{provider}}",+ "tracing.run.failed": "Error al enviar a {{provider}}",+ "tracing.run.pending": "Enviando a {{provider}}",+ "tracing.run.title": "Rastreo externo",+ "tracing.run.uncertain": "{{provider}} no ha confirmado la recepción",+ "tracing.run.viewProject": "Abrir proyecto",+ "tracing.run.viewSpan": "Ver este nodo",+ "tracing.run.viewTrace": "Ver esta ejecución",+ "tracing.supported": "Compatible","tracing.tencent.description": "Tencent Application Performance Monitoring proporciona rastreo integral y análisis multidimensional para aplicaciones LLM.",+ "tracing.tencent.endpointHelp": "Copie el endpoint de su región y red desde Tencent Cloud LLM Observability → Aplicaciones → Conectar aplicación.",+ "tracing.tencent.serviceNameHelp": "Hasta 63 caracteres: letras minúsculas, dígitos y guiones. Debe empezar con una letra minúscula y terminar con una letra o un dígito.","tracing.tencent.title": "Tencent APM","tracing.title": "Rastreo del rendimiento de la app","tracing.tracing": "Rastreo","tracing.tracingDescription": "Captura el contexto completo de la ejecución de la app, incluyendo llamadas LLM, contexto, prompts, solicitudes HTTP y más, en una plataforma de rastreo de terceros.",+ "tracing.unsupported": "No disponible","tracing.view": "Vista","tracing.weave.description": "Weave es una plataforma de código abierto para evaluar, probar y monitorear aplicaciones de LLM.","tracing.weave.title": "Tejer",diff --git a/web/i18n/locales/fa-IR/app.json b/web/i18n/locales/fa-IR/app.jsonindex 3dcbc658d38..b6f1be9850f 100644--- a/web/i18n/locales/fa-IR/app.json+++ b/web/i18n/locales/fa-IR/app.json@@ -243,10 +243,27 @@"switchTip": "اجازه نمیدهد","switchTipEnd": " تغییر به سازماندهی اساسی بازگردد.","switchTipStart": "یک نسخه جدید از برنامه برای شما ایجاد خواهد شد و نسخه جدید به سازماندهی گردش کار تغییر خواهد کرد. نسخه جدید ",+ "tracing.agentSpansUnsupported": "{{provider}} هنوز از ردیابی کامل Agent پشتیبانی نمیکند.",+ "tracing.agentTracingUnavailable": "ردیابی Agent در دسترس نیست، بنابراین ردیابیها شامل جزئیات داخلی Agent و پیوندهای اجرا نخواهند بود.","tracing.aliyun.description": "پلتفرم مشاهدهپذیری کاملاً مدیریتشده و بدون نیاز به نگهداری که توسط Alibaba Cloud ارائه شده، امکان نظارت، ردیابی و ارزیابی برنامههای Dify را بهصورت آماده و با تنظیمات اولیه فراهم میکند.","tracing.aliyun.title": "نظارت بر ابر","tracing.arize.description": "قابلیت مشاهده LLM در سطح سازمانی، ارزیابی آنلاین و آفلاین، نظارت و آزمایش — با پشتیبانی از OpenTelemetry. طراحیشده مخصوص برنامههای مبتنی بر LLM و عاملها.","tracing.arize.title": "Arize",+ "tracing.capabilities": "قابلیتهای ارائهدهنده",+ "tracing.capabilitiesLoadFailed": "بارگیری قابلیتهای ارائهدهنده ممکن نشد.",+ "tracing.capability.agent_spans": "اسپنهای Agent",+ "tracing.capability.native_cost": "هزینه بومی",+ "tracing.capability.native_usage": "مصرف بومی",+ "tracing.capability.session": "نشستها",+ "tracing.capability.span_url": "پیوندهای اسپن",+ "tracing.capability.trace_url": "پیوندهای ردیابی",+ "tracing.capabilitySummary.allSupported": "همه پشتیبانی میشوند",+ "tracing.capabilitySummary.unsupported": "{{count}} پشتیبانی نمیشود",+ "tracing.captureAgent": "جمعآوری عملیات داخلی Agent",+ "tracing.captureAgentDescription": "ارسال فراخوانیهای داخلی مدل و ابزار Agent",+ "tracing.captureContent": "جمعآوری محتوا",+ "tracing.captureContentDescription": "ارسال ورودیها و خروجیهای هر اجرا",+ "tracing.captureTitle": "جمعآوری داده Agent","tracing.config": "پیکربندی","tracing.configProvider.clientId": "شناسه مشتری OAuth","tracing.configProvider.clientSecret": "رمز مخفی مشتری OAuth",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "کلید {{key}} خود را وارد کنید","tracing.configProvider.project": "پروژه","tracing.configProvider.publicKey": "کلید عمومی",- "tracing.configProvider.removeConfirmContent": "پیکربندی فعلی در حال استفاده است، حذف آن ویژگی ردیابی را غیرفعال خواهد کرد.",+ "tracing.configProvider.removeConfirmContentInUse": "ردیابی خاموش میشود و اعتبارنامههای ذخیرهشده حذف خواهند شد.",+ "tracing.configProvider.removeConfirmContentNotInUse": "اعتبارنامههای ذخیرهشده حذف خواهند شد. برای استفاده از {{key}} باید آنها را دوباره وارد کنید.","tracing.configProvider.removeConfirmTitle": "حذف پیکربندی {{key}}؟","tracing.configProvider.secretKey": "کلید محرمانه","tracing.configProvider.title": "پیکربندی",@@ -265,7 +283,7 @@"tracing.configProvider.username": "نام کاربری","tracing.configProvider.viewDocsLink": "مشاهده مستندات {{key}}","tracing.configProviderTitle.configured": "پیکربندی شده",- "tracing.configProviderTitle.moreProvider": "ارائهدهندگان بیشتر",+ "tracing.configProviderTitle.moreProviders": "ارائهدهندگان بیشتر","tracing.configProviderTitle.notConfigured": "برای فعالسازی ردیابی ارائهدهنده را پیکربندی کنید","tracing.databricks.description": "Databricks MLflow کاملاً مدیریتشده با حکمرانی و امنیت قوی برای ذخیرهسازی دادههای ردیابی ارائه میدهد.","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "لطفاً ابتدا ارائهدهنده را پیکربندی کنید","tracing.enabled": "در حال خدمت","tracing.inUse": "در حال استفاده",+ "tracing.inherited.description": "وقتی این Agent در این گردش کار اجرا میشود، از تنظیمات ردیابی گردش کار شامل ارائهدهنده، وضعیت روشن/خاموش و سیاست جمعآوری استفاده میکند. تنظیمات ردیابی خود Agent در اینجا اعمال نمیشود و گره به تنظیم جداگانه نیاز ندارد.",+ "tracing.inherited.loadFailed": "بارگیری وضعیت ردیابی ممکن نشد.",+ "tracing.inherited.notConfigured": "پیکربندی نشده",+ "tracing.inherited.off": "خاموش",+ "tracing.inherited.on": "روشن",+ "tracing.inherited.providerDisabled": "{{provider}} غیرفعال",+ "tracing.inherited.providerEnabled": "{{provider}} فعال",+ "tracing.inherited.settings": "پیکربندی در گردش کار",+ "tracing.inherited.title": "ردیابی خارجی","tracing.langfuse.description": "ردیابی، ارزیابی، مدیریت درخواستها و معیارها برای رفع اشکال و بهبود برنامه LLM شما.","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "یک پلتفرم همهکاره برای هر مرحله از چرخه عمر برنامههای مبتنی بر LLM.",@@ -283,11 +310,24 @@"tracing.opik.title": "اوپیک","tracing.phoenix.description": "پلتفرم متنباز و مبتنی بر OpenTelemetry برای مشاهدهپذیری، ارزیابی، مهندسی پرامپت و آزمایش برای جریانهای کاری و عاملهای LLM شما.","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "فقط مشاهده",+ "tracing.run.accepted": "به {{provider}} ارسال شد",+ "tracing.run.failed": "ارسال به {{provider}} ناموفق بود",+ "tracing.run.pending": "در حال ارسال به {{provider}}",+ "tracing.run.title": "ردیابی خارجی",+ "tracing.run.uncertain": "{{provider}} دریافت را تأیید نکرده است",+ "tracing.run.viewProject": "باز کردن پروژه",+ "tracing.run.viewSpan": "مشاهده این گره",+ "tracing.run.viewTrace": "مشاهده این اجرا",+ "tracing.supported": "پشتیبانی میشود","tracing.tencent.description": "نظارت بر عملکرد برنامههای Tencent تحلیلهای جامع و ردیابی چندبعدی برای برنامههای LLM ارائه میدهد.",+ "tracing.tencent.endpointHelp": "نقطه پایانی مناسب منطقه و شبکه خود را از Tencent Cloud LLM Observability ← برنامهها ← اتصال برنامه کپی کنید.",+ "tracing.tencent.serviceNameHelp": "حداکثر ۶۳ نویسه: حروف کوچک لاتین، رقم و خط تیره. با حرف کوچک شروع و با حرف یا رقم تمام شود.","tracing.tencent.title": "تنست ایپیام","tracing.title": "ردیابی عملکرد برنامه","tracing.tracing": "ردیابی","tracing.tracingDescription": "ثبت کامل متن اجرای برنامه، از جمله تماسهای LLM، متن، درخواستهای HTTP و بیشتر، به یک پلتفرم ردیابی شخص ثالث.",+ "tracing.unsupported": "در دسترس نیست","tracing.view": "مشاهده","tracing.weave.description": "ویو یک پلتفرم متن باز برای ارزیابی، آزمایش و نظارت بر برنامههای LLM است.","tracing.weave.title": "بافندگی",diff --git a/web/i18n/locales/fr-FR/app.json b/web/i18n/locales/fr-FR/app.jsonindex c7f2f148f8b..3a57ddece17 100644--- a/web/i18n/locales/fr-FR/app.json+++ b/web/i18n/locales/fr-FR/app.json@@ -243,10 +243,27 @@"switchTip": "retour","switchTipEnd": " à l'orchestration de base.","switchTipStart": "Une nouvelle copie de l'application sera créée pour vous, et la nouvelle copie passera à l'orchestration de flux de travail. La nouvelle copie ne permettra pas le ",+ "tracing.agentSpansUnsupported": "{{provider}} ne prend pas encore en charge les traces Agent complètes.",+ "tracing.agentTracingUnavailable": "Le traçage Agent n'est pas disponible : les traces n'incluront ni les détails internes de l'Agent ni les liens d'exécution.","tracing.aliyun.description": "La plateforme d'observabilité entièrement gérée et sans maintenance fournie par Alibaba Cloud permet une surveillance, un traçage et une évaluation prêts à l'emploi des applications Dify.","tracing.aliyun.title": "Surveillance Cloud","tracing.arize.description": "Observabilité de LLM de niveau entreprise, évaluation en ligne et hors ligne, surveillance et expérimentation—alimentée par OpenTelemetry. Conçue spécialement pour les applications basées sur LLM et agents.","tracing.arize.title": "Arize",+ "tracing.capabilities": "Fonctionnalités du fournisseur",+ "tracing.capabilitiesLoadFailed": "Impossible de charger les capacités du fournisseur.",+ "tracing.capability.agent_spans": "Spans Agent",+ "tracing.capability.native_cost": "Coût natif",+ "tracing.capability.native_usage": "Utilisation native",+ "tracing.capability.session": "Sessions",+ "tracing.capability.span_url": "Liens de span",+ "tracing.capability.trace_url": "Liens de trace",+ "tracing.capabilitySummary.allSupported": "Tout est pris en charge",+ "tracing.capabilitySummary.unsupported": "{{count}} non pris en charge",+ "tracing.captureAgent": "Collecter les opérations internes de l’Agent",+ "tracing.captureAgentDescription": "Envoyer les appels internes de modèle et d'outil de l'Agent",+ "tracing.captureContent": "Collecter le contenu",+ "tracing.captureContentDescription": "Envoyer les entrées et sorties de chaque exécution",+ "tracing.captureTitle": "Collecte des données Agent","tracing.config": "Configurer","tracing.configProvider.clientId": "ID client OAuth","tracing.configProvider.clientSecret": "Secret client OAuth",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "Entrez votre {{key}}","tracing.configProvider.project": "Projet","tracing.configProvider.publicKey": "Clé Publique",- "tracing.configProvider.removeConfirmContent": "La configuration actuelle est en cours d'utilisation, sa suppression désactivera la fonction de Traçage.",+ "tracing.configProvider.removeConfirmContentInUse": "Le traçage sera désactivé et les identifiants enregistrés seront supprimés.",+ "tracing.configProvider.removeConfirmContentNotInUse": "Les identifiants enregistrés seront supprimés. Vous devrez les saisir à nouveau pour utiliser {{key}}.","tracing.configProvider.removeConfirmTitle": "Supprimer la configuration de {{key}} ?","tracing.configProvider.secretKey": "Clé Secrète","tracing.configProvider.title": "Configurer ",@@ -265,7 +283,7 @@"tracing.configProvider.username": "Nom d'utilisateur","tracing.configProvider.viewDocsLink": "Voir la documentation de {{key}}","tracing.configProviderTitle.configured": "Configuré",- "tracing.configProviderTitle.moreProvider": "Plus de fournisseurs",+ "tracing.configProviderTitle.moreProviders": "Autres fournisseurs","tracing.configProviderTitle.notConfigured": "Configurez le fournisseur pour activer le traçage","tracing.databricks.description": "Databricks propose MLflow entièrement géré avec une gouvernance et une sécurité robustes pour stocker les données de traçabilité.","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "Veuillez d'abord configurer le fournisseur","tracing.enabled": "En service","tracing.inUse": "En utilisation",+ "tracing.inherited.description": "Lorsque cet Agent s'exécute dans ce workflow, il utilise les paramètres de traçage du workflow, y compris le fournisseur, l'état activé/désactivé et la politique de collecte. Les paramètres de traçage propres à l'Agent ne s'appliquent pas ici, et le nœud ne nécessite aucune configuration séparée.",+ "tracing.inherited.loadFailed": "Impossible de charger l'état du traçage.",+ "tracing.inherited.notConfigured": "Non configuré",+ "tracing.inherited.off": "Désactivé",+ "tracing.inherited.on": "Activé",+ "tracing.inherited.providerDisabled": "{{provider}} désactivé",+ "tracing.inherited.providerEnabled": "{{provider}} activé",+ "tracing.inherited.settings": "Configurer dans le workflow",+ "tracing.inherited.title": "Traçage externe","tracing.langfuse.description": "Traces, évaluations, gestion des prompts et métriques pour déboguer et améliorer votre application LLM.","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "Une plateforme de développement tout-en-un pour chaque étape du cycle de vie des applications basées sur LLM.",@@ -283,11 +310,24 @@"tracing.opik.title": "Opik","tracing.phoenix.description": "Plateforme open-source basée sur OpenTelemetry pour l’observabilité, l’évaluation, l’ingénierie des prompts et l’expérimentation de vos flux de travail et agents LLM.","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "Lecture seule",+ "tracing.run.accepted": "Envoyé à {{provider}}",+ "tracing.run.failed": "Échec de l'envoi à {{provider}}",+ "tracing.run.pending": "Envoi vers {{provider}}",+ "tracing.run.title": "Traçage externe",+ "tracing.run.uncertain": "{{provider}} n'a pas confirmé la réception",+ "tracing.run.viewProject": "Ouvrir le projet",+ "tracing.run.viewSpan": "Voir ce nœud",+ "tracing.run.viewTrace": "Voir cette exécution",+ "tracing.supported": "Pris en charge","tracing.tencent.description": "Tencent Application Performance Monitoring fournit une traçabilité complète et une analyse multidimensionnelle pour les applications LLM.",+ "tracing.tencent.endpointHelp": "Copiez le point de terminaison adapté à votre région et réseau depuis Tencent Cloud LLM Observability → Applications → Connecter une application.",+ "tracing.tencent.serviceNameHelp": "63 caractères maximum : lettres minuscules, chiffres et traits d’union. Commencez par une lettre minuscule et terminez par une lettre ou un chiffre.","tracing.tencent.title": "Tencent APM","tracing.title": "Traçage des performances de l'application","tracing.tracing": "Traçage","tracing.tracingDescription": "Capturez le contexte complet de l'exécution de l'application, y compris les appels LLM, le contexte, les prompts, les requêtes HTTP et plus encore, vers une plateforme de traçage tierce.",+ "tracing.unsupported": "Indisponible","tracing.view": "Vue","tracing.weave.description": "Weave est une plateforme open-source pour évaluer, tester et surveiller les applications LLM.","tracing.weave.title": "Tisser",diff --git a/web/i18n/locales/hi-IN/app.json b/web/i18n/locales/hi-IN/app.jsonindex b51687cccbf..48c158b4c87 100644--- a/web/i18n/locales/hi-IN/app.json+++ b/web/i18n/locales/hi-IN/app.json@@ -243,10 +243,27 @@"switchTip": "की अनुमति नहीं देगा","switchTipEnd": " बेसिक ऑर्केस्ट्रेट में स्विच करना।","switchTipStart": "आपके लिए एक नई ऐप कॉपी बनाई जाएगी, और नई कॉपी वर्कफ़्लो ऑर्केस्ट्रेट में स्विच हो जाएगी। नई कॉपी ",+ "tracing.agentSpansUnsupported": "{{provider}} अभी पूर्ण Agent ट्रेस का समर्थन नहीं करता।",+ "tracing.agentTracingUnavailable": "Agent ट्रेसिंग उपलब्ध नहीं है, इसलिए ट्रेस में Agent के आंतरिक विवरण और रन लिंक शामिल नहीं होंगे।","tracing.aliyun.description": "अलीबाबा क्लाउड द्वारा प्रदान की गई पूरी तरह से प्रबंधित और रखरखाव-मुक्त अवलोकन प्लेटफ़ॉर्म, Dify अनुप्रयोगों की स्वचालित निगरानी, ट्रेसिंग और मूल्यांकन का सक्षम बनाता है।","tracing.aliyun.title": "क्लाउड मॉनिटर","tracing.arize.description": "एंटरप्राइज-स्तरीय LLM ऑब्ज़र्वेबिलिटी, ऑनलाइन और ऑफ़लाइन मूल्यांकन, मॉनिटरिंग और प्रयोग — OpenTelemetry द्वारा समर्थित। LLM और एजेंट-आधारित अनुप्रयोगों के लिए विशेष रूप से तैयार किया गया।","tracing.arize.title": "Arize",+ "tracing.capabilities": "प्रदाता की क्षमताएँ",+ "tracing.capabilitiesLoadFailed": "प्रदाता क्षमताएँ लोड नहीं हो सकीं।",+ "tracing.capability.agent_spans": "Agent स्पैन",+ "tracing.capability.native_cost": "मूल लागत",+ "tracing.capability.native_usage": "मूल उपयोग",+ "tracing.capability.session": "सत्र",+ "tracing.capability.span_url": "स्पैन लिंक",+ "tracing.capability.trace_url": "ट्रेस लिंक",+ "tracing.capabilitySummary.allSupported": "सभी समर्थित",+ "tracing.capabilitySummary.unsupported": "{{count}} असमर्थित",+ "tracing.captureAgent": "Agent की आंतरिक गतिविधियाँ एकत्र करें",+ "tracing.captureAgentDescription": "Agent के आंतरिक मॉडल और टूल कॉल भेजें",+ "tracing.captureContent": "सामग्री एकत्र करें",+ "tracing.captureContentDescription": "हर रन के इनपुट और आउटपुट भेजें",+ "tracing.captureTitle": "Agent डेटा संग्रह","tracing.config": "कॉन्फ़िगर करें","tracing.configProvider.clientId": "OAuth क्लाइंट आईडी","tracing.configProvider.clientSecret": "OAuth क्लाइंट सीक्रेट",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "अपना {{key}} दर्ज करें","tracing.configProvider.project": "प्रोजेक्ट","tracing.configProvider.publicKey": "सार्वजनिक कुंजी",- "tracing.configProvider.removeConfirmContent": "वर्तमान कॉन्फ़िगरेशन उपयोग में है, इसे हटाने से ट्रेसिंग सुविधा बंद हो जाएगी।",+ "tracing.configProvider.removeConfirmContentInUse": "ट्रेसिंग बंद हो जाएगी और सहेजे गए क्रेडेंशियल हटा दिए जाएंगे।",+ "tracing.configProvider.removeConfirmContentNotInUse": "सहेजे गए क्रेडेंशियल हटा दिए जाएंगे। {{key}} का उपयोग करने के लिए आपको उन्हें फिर से दर्ज करना होगा।","tracing.configProvider.removeConfirmTitle": "{{key}} कॉन्फ़िगरेशन हटाएं?","tracing.configProvider.secretKey": "गुप्त कुंजी","tracing.configProvider.title": "कॉन्फ़िगर करें ",@@ -265,7 +283,7 @@"tracing.configProvider.username": "उपयोगकर्ता नाम","tracing.configProvider.viewDocsLink": "{{key}} दस्तावेज़ देखें","tracing.configProviderTitle.configured": "कॉन्फ़िगर किया गया",- "tracing.configProviderTitle.moreProvider": "अधिक प्रदाता",+ "tracing.configProviderTitle.moreProviders": "अन्य प्रदाता","tracing.configProviderTitle.notConfigured": "ट्रेसिंग सक्षम करने के लिए प्रदाता कॉन्फ़िगर करें","tracing.databricks.description": "Databricks मजबूत शासन और सुरक्षा के साथ पूरी तरह से प्रबंधित MLflow प्रदान करता है, ट्रेस डेटा संग्रहीत करने के लिए।","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "कृपया पहले प्रदाता को कॉन्फ़िगर करें","tracing.enabled": "सेवा में","tracing.inUse": "उपयोग में",+ "tracing.inherited.description": "इस वर्कफ़्लो में चलने पर यह Agent वर्कफ़्लो की ट्रेसिंग सेटिंग्स का उपयोग करता है, जिनमें प्रदाता, चालू/बंद स्थिति और कैप्चर नीति शामिल हैं। Agent की अपनी ट्रेसिंग सेटिंग्स यहाँ लागू नहीं होतीं, और नोड के लिए अलग सेटअप की आवश्यकता नहीं है।",+ "tracing.inherited.loadFailed": "ट्रेसिंग स्थिति लोड नहीं हो सकी।",+ "tracing.inherited.notConfigured": "कॉन्फ़िगर नहीं है",+ "tracing.inherited.off": "बंद",+ "tracing.inherited.on": "चालू",+ "tracing.inherited.providerDisabled": "{{provider}} बंद",+ "tracing.inherited.providerEnabled": "{{provider}} चालू",+ "tracing.inherited.settings": "वर्कफ़्लो में कॉन्फ़िगर करें",+ "tracing.inherited.title": "बाहरी ट्रेसिंग","tracing.langfuse.description": "आपके LLM एप्लिकेशन को डीबग और सुधारने के लिए ट्रेस, मूल्यांकन, प्रॉम्प्ट प्रबंधन और मेट्रिक्स।","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "LLM-संचालित एप्लिकेशन जीवनचक्र के प्रत्येक चरण के लिए एक ऑल-इन-वन डेवलपर प्लेटफ़ॉर्म।",@@ -283,11 +310,24 @@"tracing.opik.title": "ओपिक","tracing.phoenix.description": "आपके LLM वर्कफ़्लोज़ और एजेंट्स के लिए ओपन-सोर्स और OpenTelemetry-आधारित ऑब्ज़र्वेबिलिटी, मूल्यांकन, प्रॉम्प्ट इंजीनियरिंग और प्रयोग का प्लेटफ़ॉर्म।","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "केवल देखने के लिए",+ "tracing.run.accepted": "{{provider}} को भेजा गया",+ "tracing.run.failed": "{{provider}} को भेजना विफल",+ "tracing.run.pending": "{{provider}} को भेजा जा रहा है",+ "tracing.run.title": "बाहरी ट्रेसिंग",+ "tracing.run.uncertain": "{{provider}} ने प्राप्ति की पुष्टि नहीं की",+ "tracing.run.viewProject": "प्रोजेक्ट खोलें",+ "tracing.run.viewSpan": "यह नोड देखें",+ "tracing.run.viewTrace": "यह रन देखें",+ "tracing.supported": "समर्थित","tracing.tencent.description": "Tencent एप्लिकेशन परफॉर्मेंस मॉनिटरिंग LLM एप्लिकेशन के लिए व्यापक ट्रेसिंग और बहु-आयामी विश्लेषण प्रदान करता है।",+ "tracing.tencent.endpointHelp": "Tencent Cloud LLM Observability → एप्लिकेशन → एप्लिकेशन कनेक्ट करें से अपने क्षेत्र और नेटवर्क का एंडपॉइंट कॉपी करें।",+ "tracing.tencent.serviceNameHelp": "अधिकतम 63 वर्ण: अंग्रेज़ी के छोटे अक्षर, अंक और हाइफ़न। छोटे अक्षर से शुरू करें और अक्षर या अंक पर समाप्त करें।","tracing.tencent.title": "टेनसेंट एपीएम","tracing.title": "एप्लिकेशन प्रदर्शन ट्रेसिंग","tracing.tracing": "ट्रेसिंग","tracing.tracingDescription": "एप्लिकेशन निष्पादन का पूरा संदर्भ कैप्चर करें, जिसमें LLM कॉल, संदर्भ, प्रॉम्प्ट्स, HTTP अनुरोध और अधिक शामिल हैं, एक तृतीय-पक्ष ट्रेसिंग प्लेटफ़ॉर्म पर।",+ "tracing.unsupported": "अनुपलब्ध","tracing.view": "देखना","tracing.weave.description": "वीव एक ओपन-सोर्स प्लेटफ़ॉर्म है जो LLM अनुप्रयोगों का मूल्यांकन, परीक्षण और निगरानी करने के लिए है।","tracing.weave.title": "बुनना",diff --git a/web/i18n/locales/id-ID/app.json b/web/i18n/locales/id-ID/app.jsonindex 083e7067316..6c46518de95 100644--- a/web/i18n/locales/id-ID/app.json+++ b/web/i18n/locales/id-ID/app.json@@ -243,10 +243,27 @@"switchTip": "tidak mengizinkan","switchTipEnd": "beralih kembali ke Basic Orchestrate.","switchTipStart": "Salinan aplikasi baru akan dibuat untuk Anda, dan salinan baru akan beralih ke Workflow Orchestrate. Salinan baru akan",+ "tracing.agentSpansUnsupported": "{{provider}} belum mendukung trace Agent lengkap.",+ "tracing.agentTracingUnavailable": "Pelacakan Agent tidak tersedia, jadi jejak tidak akan menyertakan detail internal Agent maupun tautan eksekusi.","tracing.aliyun.description": "Platform observabilitas yang dikelola sepenuhnya dan bebas perawatan yang disediakan oleh Alibaba Cloud, memungkinkan pemantauan, pelacakan, dan evaluasi aplikasi Dify yang out-of-the-box.","tracing.aliyun.title": "Monitor Awan","tracing.arize.description": "Observabilitas LLM tingkat perusahaan, evaluasi, pemantauan, dan eksperimen online & offline—didukung oleh OpenTelemetry. Dibuat khusus untuk LLM & aplikasi berbasis agen.","tracing.arize.title": "Arize",+ "tracing.capabilities": "Kemampuan penyedia",+ "tracing.capabilitiesLoadFailed": "Tidak dapat memuat kemampuan penyedia.",+ "tracing.capability.agent_spans": "Span Agent",+ "tracing.capability.native_cost": "Biaya native",+ "tracing.capability.native_usage": "Penggunaan native",+ "tracing.capability.session": "Sesi",+ "tracing.capability.span_url": "Tautan span",+ "tracing.capability.trace_url": "Tautan trace",+ "tracing.capabilitySummary.allSupported": "Semua didukung",+ "tracing.capabilitySummary.unsupported": "{{count}} tidak didukung",+ "tracing.captureAgent": "Kumpulkan proses internal Agent",+ "tracing.captureAgentDescription": "Kirim panggilan model dan alat internal Agent",+ "tracing.captureContent": "Kumpulkan konten",+ "tracing.captureContentDescription": "Kirim input dan output setiap eksekusi",+ "tracing.captureTitle": "Pengambilan data Agent","tracing.config": "Konfigurasi","tracing.configProvider.clientId": "ID Klien OAuth","tracing.configProvider.clientSecret": "Rahasia Klien OAuth",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "Masukkan {{key}} Anda","tracing.configProvider.project": "Proyek","tracing.configProvider.publicKey": "Kunci Publik",- "tracing.configProvider.removeConfirmContent": "Konfigurasi saat ini sedang digunakan, menghapusnya akan mematikan fitur Pelacakan.",+ "tracing.configProvider.removeConfirmContentInUse": "Pelacakan akan dimatikan dan kredensial yang tersimpan akan dihapus.",+ "tracing.configProvider.removeConfirmContentNotInUse": "Kredensial yang tersimpan akan dihapus. Anda perlu memasukkannya lagi untuk menggunakan {{key}}.","tracing.configProvider.removeConfirmTitle": "Hapus konfigurasi {{key}}?","tracing.configProvider.secretKey": "Kunci Rahasia","tracing.configProvider.title": "Konfigurasi",@@ -265,7 +283,7 @@"tracing.configProvider.username": "Nama Pengguna","tracing.configProvider.viewDocsLink": "Lihat dokumen {{key}}","tracing.configProviderTitle.configured": "Dikonfigurasi",- "tracing.configProviderTitle.moreProvider": "Lebih Banyak Penyedia",+ "tracing.configProviderTitle.moreProviders": "Penyedia lainnya","tracing.configProviderTitle.notConfigured": "Penyedia konfigurasi untuk mengaktifkan pelacakan","tracing.databricks.description": "Databricks menawarkan MLflow yang sepenuhnya dikelola dengan tata kelola dan keamanan yang kuat untuk menyimpan data jejak.","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "Silakan konfigurasi penyedia terlebih dahulu","tracing.enabled": "Aktif","tracing.inUse": "Sedang digunakan",+ "tracing.inherited.description": "Saat Agent ini berjalan di alur kerja ini, Agent memakai pengaturan pelacakan alur kerja, termasuk penyedia, status aktif/nonaktif, dan kebijakan pengambilan. Pengaturan pelacakan milik Agent tidak berlaku di sini, dan node tidak perlu pengaturan terpisah.",+ "tracing.inherited.loadFailed": "Tidak dapat memuat status pelacakan.",+ "tracing.inherited.notConfigured": "Belum dikonfigurasi",+ "tracing.inherited.off": "Nonaktif",+ "tracing.inherited.on": "Aktif",+ "tracing.inherited.providerDisabled": "{{provider}} nonaktif",+ "tracing.inherited.providerEnabled": "{{provider}} aktif",+ "tracing.inherited.settings": "Atur di alur kerja",+ "tracing.inherited.title": "Pelacakan eksternal","tracing.langfuse.description": "Observabilitas LLM sumber terbuka, evaluasi, manajemen prompt, dan metrik untuk men-debug dan meningkatkan aplikasi LLM Anda.","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "Platform pengembang all-in-one untuk setiap langkah siklus hidup aplikasi yang didukung LLM.",@@ -283,11 +310,24 @@"tracing.opik.title": "Opik","tracing.phoenix.description": "Observabilitas, evaluasi, rekayasa cepat, dan platform eksperimen berbasis sumber terbuka & OpenTelemetri untuk alur kerja dan agen LLM Anda.","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "Hanya lihat",+ "tracing.run.accepted": "Terkirim ke {{provider}}",+ "tracing.run.failed": "Gagal mengirim ke {{provider}}",+ "tracing.run.pending": "Mengirim ke {{provider}}",+ "tracing.run.title": "Pelacakan eksternal",+ "tracing.run.uncertain": "{{provider}} belum mengonfirmasi penerimaan",+ "tracing.run.viewProject": "Buka proyek",+ "tracing.run.viewSpan": "Lihat node ini",+ "tracing.run.viewTrace": "Lihat eksekusi ini",+ "tracing.supported": "Didukung","tracing.tencent.description": "Tencent Application Performance Monitoring menyediakan pelacakan komprehensif dan analisis multi-dimensi untuk aplikasi LLM.",+ "tracing.tencent.endpointHelp": "Salin endpoint untuk wilayah dan jaringan Anda dari Tencent Cloud LLM Observability → Aplikasi → Hubungkan aplikasi.",+ "tracing.tencent.serviceNameHelp": "Maksimal 63 karakter: huruf kecil, angka, dan tanda hubung. Awali dengan huruf kecil dan akhiri dengan huruf atau angka.","tracing.tencent.title": "Tencent APM","tracing.title": "Melacak performa aplikasi","tracing.tracing": "Menelusuri","tracing.tracingDescription": "Tangkap konteks lengkap eksekusi aplikasi, termasuk panggilan LLM, konteks, perintah, permintaan HTTP, dan lainnya, ke platform pelacakan pihak ketiga.",+ "tracing.unsupported": "Tidak tersedia","tracing.view": "Melihat","tracing.weave.description": "Weave adalah platform sumber terbuka untuk mengevaluasi, menguji, dan memantau aplikasi LLM.","tracing.weave.title": "Weave",diff --git a/web/i18n/locales/it-IT/app.json b/web/i18n/locales/it-IT/app.jsonindex ca7c92b03d7..a33536e92f0 100644--- a/web/i18n/locales/it-IT/app.json+++ b/web/i18n/locales/it-IT/app.json@@ -243,10 +243,27 @@"switchTip": "non permetterà","switchTipEnd": " di tornare a Orchestrazione di base.","switchTipStart": "Verrà creata una nuova copia dell'app per te, e la nuova copia passerà a Orchestrazione del flusso di lavoro. La nuova copia ",+ "tracing.agentSpansUnsupported": "{{provider}} non supporta ancora le tracce Agent complete.",+ "tracing.agentTracingUnavailable": "Il tracciamento Agent non è disponibile, quindi le tracce non includeranno i dettagli interni dell'Agent né i link di esecuzione.","tracing.aliyun.description": "La piattaforma di osservabilità completamente gestita e senza manutenzione fornita da Alibaba Cloud consente il monitoraggio, il tracciamento e la valutazione delle applicazioni Dify fin da subito.","tracing.aliyun.title": "Monitoraggio Cloud","tracing.arize.description": "Osservabilità LLM di livello aziendale, valutazione online e offline, monitoraggio e sperimentazione—alimentata da OpenTelemetry. Progettata appositamente per applicazioni basate su LLM e agenti.","tracing.arize.title": "Arize",+ "tracing.capabilities": "Funzionalità del fornitore",+ "tracing.capabilitiesLoadFailed": "Impossibile caricare le funzionalità del provider.",+ "tracing.capability.agent_spans": "Span Agent",+ "tracing.capability.native_cost": "Costo nativo",+ "tracing.capability.native_usage": "Utilizzo nativo",+ "tracing.capability.session": "Sessioni",+ "tracing.capability.span_url": "Link agli span",+ "tracing.capability.trace_url": "Link alle tracce",+ "tracing.capabilitySummary.allSupported": "Tutto supportato",+ "tracing.capabilitySummary.unsupported": "{{count}} non supportate",+ "tracing.captureAgent": "Acquisisci operazioni interne di Agent",+ "tracing.captureAgentDescription": "Invia le chiamate interne a modelli e strumenti dell'Agent",+ "tracing.captureContent": "Acquisisci contenuti",+ "tracing.captureContentDescription": "Invia input e output di ogni esecuzione",+ "tracing.captureTitle": "Acquisizione dati Agent","tracing.config": "Config","tracing.configProvider.clientId": "ID client OAuth","tracing.configProvider.clientSecret": "Segreto del client OAuth",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "Inserisci il tuo {{key}}","tracing.configProvider.project": "Progetto","tracing.configProvider.publicKey": "Chiave pubblica",- "tracing.configProvider.removeConfirmContent": "La configurazione attuale è in uso, rimuovendola disattiverà la funzione di Tracciamento.",+ "tracing.configProvider.removeConfirmContentInUse": "Il tracciamento verrà disattivato e le credenziali salvate verranno eliminate.",+ "tracing.configProvider.removeConfirmContentNotInUse": "Le credenziali salvate verranno eliminate. Dovrai inserirle di nuovo per usare {{key}}.","tracing.configProvider.removeConfirmTitle": "Rimuovere la configurazione di {{key}}?","tracing.configProvider.secretKey": "Chiave segreta","tracing.configProvider.title": "Config ",@@ -265,7 +283,7 @@"tracing.configProvider.username": "Nome utente","tracing.configProvider.viewDocsLink": "Visualizza documenti di {{key}}","tracing.configProviderTitle.configured": "Configurato",- "tracing.configProviderTitle.moreProvider": "Altri Provider",+ "tracing.configProviderTitle.moreProviders": "Altri fornitori","tracing.configProviderTitle.notConfigured": "Configura il provider per abilitare il tracciamento","tracing.databricks.description": "Databricks offre MLflow completamente gestito con forte governance e sicurezza per memorizzare i dati di tracciamento.","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "Configura prima il provider","tracing.enabled": "In servizio","tracing.inUse": "In uso",+ "tracing.inherited.description": "Quando questo Agent viene eseguito in questo workflow, usa le impostazioni di tracciamento del workflow, inclusi provider, stato attivo/disattivo e criterio di acquisizione. Le impostazioni di tracciamento dell'Agent non si applicano qui e il nodo non richiede una configurazione separata.",+ "tracing.inherited.loadFailed": "Impossibile caricare lo stato del tracciamento.",+ "tracing.inherited.notConfigured": "Non configurato",+ "tracing.inherited.off": "Disattivo",+ "tracing.inherited.on": "Attivo",+ "tracing.inherited.providerDisabled": "{{provider}} disattivato",+ "tracing.inherited.providerEnabled": "{{provider}} attivo",+ "tracing.inherited.settings": "Configura nel workflow",+ "tracing.inherited.title": "Tracciamento esterno","tracing.langfuse.description": "Tracce, valutazioni, gestione dei prompt e metriche per debug e miglioramento della tua applicazione LLM.","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "Una piattaforma all-in-one per sviluppatori per ogni fase del ciclo di vita delle applicazioni alimentate da LLM.",@@ -283,11 +310,24 @@"tracing.opik.title": "Opik","tracing.phoenix.description": "Piattaforma open-source basata su OpenTelemetry per osservabilità, valutazione, ingegneria dei prompt e sperimentazione per i tuoi flussi di lavoro e agenti LLM.","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "Sola lettura",+ "tracing.run.accepted": "Inviato a {{provider}}",+ "tracing.run.failed": "Invio a {{provider}} non riuscito",+ "tracing.run.pending": "Invio a {{provider}}",+ "tracing.run.title": "Tracciamento esterno",+ "tracing.run.uncertain": "{{provider}} non ha confermato la ricezione",+ "tracing.run.viewProject": "Apri progetto",+ "tracing.run.viewSpan": "Visualizza questo nodo",+ "tracing.run.viewTrace": "Visualizza questa esecuzione",+ "tracing.supported": "Supportato","tracing.tencent.description": "Tencent Application Performance Monitoring fornisce tracciamento completo e analisi multidimensionale per le applicazioni LLM.",+ "tracing.tencent.endpointHelp": "Copia l’endpoint per la tua regione e rete da Tencent Cloud LLM Observability → Applicazioni → Collega applicazione.",+ "tracing.tencent.serviceNameHelp": "Massimo 63 caratteri: lettere minuscole, cifre e trattini. Inizia con una lettera minuscola e termina con una lettera o cifra.","tracing.tencent.title": "Tencent APM","tracing.title": "Tracciamento delle prestazioni dell'app","tracing.tracing": "Tracciamento","tracing.tracingDescription": "Cattura il contesto completo dell'esecuzione dell'app, incluse chiamate LLM, contesto, prompt, richieste HTTP e altro, su una piattaforma di tracciamento di terze parti.",+ "tracing.unsupported": "Non disponibile","tracing.view": "Vista","tracing.weave.description": "Weave è una piattaforma open-source per valutare, testare e monitorare le applicazioni LLM.","tracing.weave.title": "Intrecciare",diff --git a/web/i18n/locales/ja-JP/app.json b/web/i18n/locales/ja-JP/app.jsonindex c907ace8337..5909138dda0 100644--- a/web/i18n/locales/ja-JP/app.json+++ b/web/i18n/locales/ja-JP/app.json@@ -243,10 +243,27 @@"switchTip": "切り替えを許可しません","switchTipEnd": " 基本的なオーケストレートに戻ることはできません。","switchTipStart": "新しいアプリのコピーが作成され、新しいコピーがワークフロー オーケストレートに切り替わります。新しいコピーは ",+ "tracing.agentSpansUnsupported": "{{provider}} は完全な Agent トレースにまだ対応していません。",+ "tracing.agentTracingUnavailable": "Agent トレースは利用できないため、トレースに Agent の内部処理は含まれず、実行リンクも作成されません。","tracing.aliyun.description": "Alibaba Cloud が提供する完全管理型でメンテナンスフリーの可観測性プラットフォームは、Dify アプリケーションの即時監視、トレース、評価を可能にします。","tracing.aliyun.title": "クラウドモニター","tracing.arize.description": "エンタープライズグレードのLLM可観測性、オンラインおよびオフライン評価、モニタリング、実験—OpenTelemetryによって支えられています。LLMおよびエージェント駆動型アプリケーション向けに特別に設計されています。","tracing.arize.title": "Arize",+ "tracing.capabilities": "プロバイダーの機能",+ "tracing.capabilitiesLoadFailed": "プロバイダーの機能を読み込めません。",+ "tracing.capability.agent_spans": "Agent スパン",+ "tracing.capability.native_cost": "ネイティブコスト",+ "tracing.capability.native_usage": "ネイティブ使用量",+ "tracing.capability.session": "セッション",+ "tracing.capability.span_url": "スパンリンク",+ "tracing.capability.trace_url": "トレースリンク",+ "tracing.capabilitySummary.allSupported": "すべて対応",+ "tracing.capabilitySummary.unsupported": "{{count}} 件未対応",+ "tracing.captureAgent": "Agent の内部処理を収集",+ "tracing.captureAgentDescription": "Agent 内部のモデル呼び出しとツール呼び出しを送信",+ "tracing.captureContent": "内容を収集",+ "tracing.captureContentDescription": "各実行の入力と出力を送信",+ "tracing.captureTitle": "Agent データ収集","tracing.config": "設定","tracing.configProvider.clientId": "OAuthクライアントID","tracing.configProvider.clientSecret": "OAuthクライアントシークレット",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "{{key}}を入力してください","tracing.configProvider.project": "プロジェクト","tracing.configProvider.publicKey": "公開キー",- "tracing.configProvider.removeConfirmContent": "現在の設定は使用中です。これを削除すると、トレース機能が無効になります。",+ "tracing.configProvider.removeConfirmContentInUse": "トレースが無効になり、保存済みの認証情報も削除されます。",+ "tracing.configProvider.removeConfirmContentNotInUse": "保存済みの認証情報が削除されます。{{key}} を再び使用するには、もう一度入力する必要があります。","tracing.configProvider.removeConfirmTitle": "{{key}}の設定を削除しますか?","tracing.configProvider.secretKey": "秘密キー","tracing.configProvider.title": "設定 ",@@ -265,7 +283,7 @@"tracing.configProvider.username": "ユーザー名","tracing.configProvider.viewDocsLink": "{{key}}に関するドキュメントを見る","tracing.configProviderTitle.configured": "設定しました",- "tracing.configProviderTitle.moreProvider": "その他のプロバイダー",+ "tracing.configProviderTitle.moreProviders": "その他のプロバイダー","tracing.configProviderTitle.notConfigured": "トレース機能を有効化するためには、サービスの設定が必要です。","tracing.databricks.description": "DatabricksはフルマネージドのMLflowサービスを提供し、本番環境のトレースデータを強力なガバナンスとセキュリティの元で保存することができます。","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "まずはサービスの設定から始めましょう。","tracing.enabled": "有効しました","tracing.inUse": "使用中",+ "tracing.inherited.description": "この Agent をこのワークフローで実行すると、プロバイダー、オン/オフ、収集ポリシーを含むワークフローのトレース設定が使われます。Agent 自身のトレース設定はここでは適用されず、ノードごとの設定も不要です。",+ "tracing.inherited.loadFailed": "トレース状態を読み込めません。",+ "tracing.inherited.notConfigured": "未設定",+ "tracing.inherited.off": "オフ",+ "tracing.inherited.on": "オン",+ "tracing.inherited.providerDisabled": "{{provider}} 無効",+ "tracing.inherited.providerEnabled": "{{provider}} 有効",+ "tracing.inherited.settings": "ワークフローで設定",+ "tracing.inherited.title": "外部トレース","tracing.langfuse.description": "トレース、評価、プロンプトの管理、そしてメトリクスを駆使して、LLM アプリケーションのデバッグや改善に役立てます。","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "LLM を利用したアプリケーションのライフサイクル全段階を支援する、オールインワンの開発者向けプラットフォームです。",@@ -283,11 +310,24 @@"tracing.opik.title": "オピック","tracing.phoenix.description": "オープンソースおよびOpenTelemetryベースの可観測性、評価、プロンプトエンジニアリング、実験プラットフォームで、LLMワークフローおよびエージェントに対応します。","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "閲覧のみ",+ "tracing.run.accepted": "{{provider}} に送信済み",+ "tracing.run.failed": "{{provider}} への送信に失敗",+ "tracing.run.pending": "{{provider}} に送信中",+ "tracing.run.title": "外部トレース",+ "tracing.run.uncertain": "{{provider}} が受信を未確認",+ "tracing.run.viewProject": "プロジェクトを開く",+ "tracing.run.viewSpan": "このノードを表示",+ "tracing.run.viewTrace": "この実行を表示",+ "tracing.supported": "対応","tracing.tencent.description": "Tencent アプリケーションパフォーマンスモニタリングは、LLM アプリケーションに対して包括的なトレーシングと多次元分析を提供します。",+ "tracing.tencent.endpointHelp": "Tencent Cloud の LLM 可観測性 → アプリ一覧 → アプリ接続から、リージョンとネットワークに合うエンドポイントをコピーしてください。",+ "tracing.tencent.serviceNameHelp": "最大63文字。英小文字、数字、ハイフンのみ。英小文字で始め、英字または数字で終えてください。","tracing.tencent.title": "テンセントAPM","tracing.title": "アプリのパフォーマンスの追跡","tracing.tracing": "追跡","tracing.tracingDescription": "LLM の呼び出し、コンテキスト、プロンプト、HTTP リクエストなど、アプリケーション実行の全ての文脈をサードパーティのトレースプラットフォームで取り込みます。",+ "tracing.unsupported": "非対応","tracing.view": "見る","tracing.weave.description": "Weave は、LLM アプリケーションを評価、テスト、および監視するためのオープンソースプラットフォームです。","tracing.weave.title": "織る",diff --git a/web/i18n/locales/ko-KR/app.json b/web/i18n/locales/ko-KR/app.jsonindex 6bfce66f14e..dcff6300187 100644--- a/web/i18n/locales/ko-KR/app.json+++ b/web/i18n/locales/ko-KR/app.json@@ -243,10 +243,27 @@"switchTip": "전환을 허용하지 않습니다","switchTipEnd": " 기본적인 오케스트레이션으로 되돌릴 수 없습니다.","switchTipStart": "새로운 앱의 복사본이 생성되어 새로운 복사본이 워크플로우 오케스트레이션으로 전환됩니다. 새로운 복사본은 ",+ "tracing.agentSpansUnsupported": "{{provider}}은(는) 아직 전체 Agent 추적을 지원하지 않습니다.",+ "tracing.agentTracingUnavailable": "Agent 추적을 사용할 수 없어 추적 데이터에 Agent 내부 과정이 포함되지 않으며 실행 링크도 생성되지 않습니다.","tracing.aliyun.description": "알리바바 클라우드에서 제공하는 완전 관리형 및 유지보수가 필요 없는 가시성 플랫폼은 Dify 애플리케이션의 모니터링, 추적 및 평가를 즉시 사용할 수 있도록 지원합니다.","tracing.aliyun.title": "클라우드 모니터","tracing.arize.description": "엔터프라이즈급 LLM 가시성, 온라인 및 오프라인 평가, 모니터링 및 실험—OpenTelemetry를 기반으로 합니다. LLM 및 에이전트 기반 애플리케이션을 위해 특별히 설계되었습니다.","tracing.arize.title": "Arize",+ "tracing.capabilities": "공급자 기능",+ "tracing.capabilitiesLoadFailed": "공급자 기능을 불러올 수 없습니다.",+ "tracing.capability.agent_spans": "Agent 스팬",+ "tracing.capability.native_cost": "기본 비용",+ "tracing.capability.native_usage": "기본 사용량",+ "tracing.capability.session": "세션",+ "tracing.capability.span_url": "스팬 링크",+ "tracing.capability.trace_url": "트레이스 링크",+ "tracing.capabilitySummary.allSupported": "모두 지원",+ "tracing.capabilitySummary.unsupported": "{{count}}개 미지원",+ "tracing.captureAgent": "Agent 내부 과정 수집",+ "tracing.captureAgentDescription": "Agent 내부의 모델 및 도구 호출을 전송",+ "tracing.captureContent": "콘텐츠 수집",+ "tracing.captureContentDescription": "각 실행의 입력과 출력을 전송",+ "tracing.captureTitle": "Agent 데이터 수집","tracing.config": "구성","tracing.configProvider.clientId": "OAuth 클라이언트 ID","tracing.configProvider.clientSecret": "OAuth 클라이언트 비밀",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "{{key}}를 입력하세요","tracing.configProvider.project": "프로젝트","tracing.configProvider.publicKey": "공개 키",- "tracing.configProvider.removeConfirmContent": "현재 구성이 사용 중입니다. 제거하면 추적 기능이 꺼집니다.",+ "tracing.configProvider.removeConfirmContentInUse": "추적이 꺼지고 저장된 자격 증명이 삭제됩니다.",+ "tracing.configProvider.removeConfirmContentNotInUse": "저장된 자격 증명이 삭제됩니다. {{key}}을(를) 다시 사용하려면 자격 증명을 다시 입력해야 합니다.","tracing.configProvider.removeConfirmTitle": "{{key}} 구성을 제거하시겠습니까?","tracing.configProvider.secretKey": "비밀 키","tracing.configProvider.title": "구성 ",@@ -265,7 +283,7 @@"tracing.configProvider.username": "사용자 이름","tracing.configProvider.viewDocsLink": "{{key}} 문서 보기","tracing.configProviderTitle.configured": "구성됨",- "tracing.configProviderTitle.moreProvider": "더 많은 제공업체",+ "tracing.configProviderTitle.moreProviders": "다른 제공업체","tracing.configProviderTitle.notConfigured": "추적을 활성화하려면 제공업체를 구성하세요","tracing.databricks.description": "Databricks는 강력한 거버넌스와 보안을 갖춘 완전 관리형 MLflow를 제공하여 트레이스 데이터 저장을 지원합니다.","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "먼저 제공업체를 구성해 주세요","tracing.enabled": "서비스 중","tracing.inUse": "사용 중",+ "tracing.inherited.description": "이 Agent가 이 워크플로에서 실행되면 공급자, 켜기/끄기, 수집 정책을 포함한 워크플로의 추적 설정을 사용합니다. Agent 자체 추적 설정은 여기에 적용되지 않으며 노드별 설정도 필요하지 않습니다.",+ "tracing.inherited.loadFailed": "추적 상태를 불러올 수 없습니다.",+ "tracing.inherited.notConfigured": "구성되지 않음",+ "tracing.inherited.off": "꺼짐",+ "tracing.inherited.on": "켜짐",+ "tracing.inherited.providerDisabled": "{{provider}} 사용 안 함",+ "tracing.inherited.providerEnabled": "{{provider}} 사용 중",+ "tracing.inherited.settings": "워크플로에서 설정",+ "tracing.inherited.title": "외부 추적","tracing.langfuse.description": "LLM 애플리케이션을 디버그하고 개선하기 위한 추적, 평가, 프롬프트 관리 및 메트릭.","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "LLM 기반 애플리케이션 수명 주기의 모든 단계를 위한 올인원 개발자 플랫폼.",@@ -283,11 +310,24 @@"tracing.opik.title": "오픽","tracing.phoenix.description": "오픈소스 및 OpenTelemetry 기반의 가시성, 평가, 프롬프트 엔지니어링 및 실험 플랫폼으로, LLM 워크플로우 및 에이전트를 지원합니다.","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "보기 전용",+ "tracing.run.accepted": "{{provider}}(으)로 전송됨",+ "tracing.run.failed": "{{provider}}(으)로 전송 실패",+ "tracing.run.pending": "{{provider}}(으)로 전송 중",+ "tracing.run.title": "외부 추적",+ "tracing.run.uncertain": "{{provider}}에서 수신을 확인하지 않음",+ "tracing.run.viewProject": "프로젝트 열기",+ "tracing.run.viewSpan": "이 노드 보기",+ "tracing.run.viewTrace": "이 실행 보기",+ "tracing.supported": "지원","tracing.tencent.description": "텐센트 애플리케이션 성능 모니터링은 LLM 애플리케이션에 대한 포괄적인 추적 및 다차원 분석을 제공합니다.",+ "tracing.tencent.endpointHelp": "Tencent Cloud LLM 관측 → 애플리케이션 목록 → 애플리케이션 연결에서 지역과 네트워크에 맞는 엔드포인트를 복사하세요.",+ "tracing.tencent.serviceNameHelp": "최대 63자. 영문 소문자, 숫자, 하이픈만 허용됩니다. 소문자로 시작하고 문자 또는 숫자로 끝나야 합니다.","tracing.tencent.title": "텐센트 APM","tracing.title": "앱 성능 추적","tracing.tracing": "추적","tracing.tracingDescription": "LLM 호출, 컨텍스트, 프롬프트, HTTP 요청 등 앱 실행의 전체 컨텍스트를 제 3 자 추적 플랫폼에 캡처합니다.",+ "tracing.unsupported": "미지원","tracing.view": "보기","tracing.weave.description": "Weave 는 LLM 애플리케이션을 평가하고 테스트하며 모니터링하기 위한 오픈 소스 플랫폼입니다.","tracing.weave.title": "Weave",diff --git a/web/i18n/locales/lo-LA/app.json b/web/i18n/locales/lo-LA/app.jsonindex 64f1bd4d1fe..cee6312d12f 100644--- a/web/i18n/locales/lo-LA/app.json+++ b/web/i18n/locales/lo-LA/app.json@@ -243,10 +243,27 @@"switchTip": "ບໍ່ອະນຸຍາດ","switchTipEnd": " ກັບຄືນໄປຫາ Basic Orchestrate.","switchTipStart": "ແອັບສຳເນົາໃໝ່ຈະຖືກສ້າງຂຶ້ນສຳລັບທ່ານ, ແລະ ສຳເນົາໃໝ່ນັ້ນຈະປ່ຽນເປັນ Workflow Orchestrate. ແອັບສຳເນົາໃໝ່ຈະ ",+ "tracing.agentSpansUnsupported": "{{provider}} ຍັງບໍ່ຮອງຮັບການຕິດຕາມ Agent ແບບຄົບຖ້ວນ.",+ "tracing.agentTracingUnavailable": "ການຕິດຕາມ Agent ຍັງໃຊ້ບໍ່ໄດ້ ຂໍ້ມູນການຕິດຕາມຈຶ່ງຈະບໍ່ລວມຂະບວນການພາຍໃນຂອງ Agent ແລະ ຈະບໍ່ສ້າງລິ້ງການແລ່ນ.","tracing.aliyun.description": "ແພລັດຟອມການຕິດຕາມທີ່ຄຸ້ມຄອງແບບເບັດເສັດຈາກ Alibaba Cloud, ຊ່ວຍໃນການຕິດຕາມ ແລະ ປະເມີນຜົນແອັບ Dify ໄດ້ທັນທີ.","tracing.aliyun.title": "Cloud Monitor","tracing.arize.description": "ການຕິດຕາມ LLM ລະດັບອົງກອນ, ການປະເມີນແບບອອນລາຍ ແລະ ອອຟລາຍ—ຂັບເຄື່ອນໂດຍ OpenTelemetry. ອອກແບບມາເພື່ອແອັບ LLM ແລະ ເອເຈນໂດຍສະເພາະ.","tracing.arize.title": "Arize",+ "tracing.capabilities": "ຄວາມສາມາດຂອງຜູ້ໃຫ້ບໍລິການ",+ "tracing.capabilitiesLoadFailed": "ບໍ່ສາມາດໂຫຼດຄວາມສາມາດຂອງຜູ້ໃຫ້ບໍລິການໄດ້.",+ "tracing.capability.agent_spans": "ສະແປນ Agent",+ "tracing.capability.native_cost": "ຄ່າໃຊ້ຈ່າຍເດີມ",+ "tracing.capability.native_usage": "ການໃຊ້ງານເດີມ",+ "tracing.capability.session": "ເຊດຊັນ",+ "tracing.capability.span_url": "ລິ້ງສະແປນ",+ "tracing.capability.trace_url": "ລິ້ງເທຣຊ",+ "tracing.capabilitySummary.allSupported": "ຮອງຮັບທັງໝົດ",+ "tracing.capabilitySummary.unsupported": "ບໍ່ຮອງຮັບ {{count}} ລາຍການ",+ "tracing.captureAgent": "ເກັບຂະບວນການພາຍໃນ Agent",+ "tracing.captureAgentDescription": "ສົ່ງການເອີ້ນໃຊ້ໂມເດວ ແລະ ເຄື່ອງມືພາຍໃນຂອງ Agent",+ "tracing.captureContent": "ເກັບເນື້ອຫາ",+ "tracing.captureContentDescription": "ສົ່ງຂໍ້ມູນເຂົ້າ ແລະ ອອກຂອງແຕ່ລະການແລ່ນ",+ "tracing.captureTitle": "ການເກັບຂໍ້ມູນ Agent","tracing.config": "ຕັ້ງຄ່າ","tracing.configProvider.clientId": "OAuth Client ID","tracing.configProvider.clientSecret": "OAuth Client Secret",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "ປ້ອນ {{key}} ຂອງທ່ານ","tracing.configProvider.project": "ໂປຣເຈັກ","tracing.configProvider.publicKey": "Public Key",- "tracing.configProvider.removeConfirmContent": "ການຕັ້ງຄ່າປະຈຸບັນກຳລັງຖືກໃຊ້ງານ, ການລຶບອອກຈະປິດການໃຊ້ງານ Tracing.",+ "tracing.configProvider.removeConfirmContentInUse": "Tracing ຈະຖືກປິດ ແລະ ຂໍ້ມູນຮັບຮອງທີ່ບັນທຶກໄວ້ຈະຖືກລຶບ.",+ "tracing.configProvider.removeConfirmContentNotInUse": "ຂໍ້ມູນຮັບຮອງທີ່ບັນທຶກໄວ້ຈະຖືກລຶບ. ທ່ານຈະຕ້ອງປ້ອນມັນຄືນໃໝ່ເພື່ອໃຊ້ {{key}}.","tracing.configProvider.removeConfirmTitle": "ລຶບການຕັ້ງຄ່າ {{key}} ບໍ?","tracing.configProvider.secretKey": "Secret Key","tracing.configProvider.title": "ຕັ້ງຄ່າ ",@@ -265,7 +283,7 @@"tracing.configProvider.username": "ຊື່ຜູ້ໃຊ້","tracing.configProvider.viewDocsLink": "ເບິ່ງເອກະສານຂອງ {{key}}","tracing.configProviderTitle.configured": "ຕັ້ງຄ່າແລ້ວ",- "tracing.configProviderTitle.moreProvider": "ຜູ້ໃຫ້ບໍລິການອື່ນໆ",+ "tracing.configProviderTitle.moreProviders": "ຜູ້ໃຫ້ບໍລິການອື່ນໆ","tracing.configProviderTitle.notConfigured": "ຕັ້ງຄ່າຜູ້ໃຫ້ບໍລິການເພື່ອເປີດໃຊ້ Tracing","tracing.databricks.description": "Databricks ໃຫ້ບໍລິການ MLflow ທີ່ຄຸ້ມຄອງແບບເບັດເສັດ ພ້ອມລະບົບຄວາມປອດໄພທີ່ເຂັ້ມງວດສຳລັບເກັບຂໍ້ມູນການຕິດຕາມ.","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "ກະລຸນາຕັ້ງຄ່າຜູ້ໃຫ້ບໍລິການກ່ອນ","tracing.enabled": "ເປີດໃຊ້ງານຢູ່","tracing.inUse": "ກຳລັງໃຊ້ງານ",+ "tracing.inherited.description": "ເມື່ອ Agent ນີ້ເຮັດວຽກໃນ workflow ນີ້, ມັນໃຊ້ການຕັ້ງຄ່າການຕິດຕາມຂອງ workflow ລວມທັງຜູ້ໃຫ້ບໍລິການ, ສະຖານະເປີດ/ປິດ ແລະ ນະໂຍບາຍການເກັບກຳ. ການຕັ້ງຄ່າການຕິດຕາມຂອງ Agent ເອງບໍ່ມີຜົນຢູ່ນີ້ ແລະ node ບໍ່ຕ້ອງຕັ້ງຄ່າແຍກ.",+ "tracing.inherited.loadFailed": "ບໍ່ສາມາດໂຫຼດສະຖານະການຕິດຕາມໄດ້.",+ "tracing.inherited.notConfigured": "ຍັງບໍ່ໄດ້ຕັ້ງຄ່າ",+ "tracing.inherited.off": "ປິດ",+ "tracing.inherited.on": "ເປີດ",+ "tracing.inherited.providerDisabled": "{{provider}} ປິດໃຊ້",+ "tracing.inherited.providerEnabled": "{{provider}} ເປີດໃຊ້",+ "tracing.inherited.settings": "ຕັ້ງຄ່າໃນ workflow",+ "tracing.inherited.title": "ການຕິດຕາມພາຍນອກ","tracing.langfuse.description": "ລະບົບຕິດຕາມ LLM ແບບ open-source, ການປະເມີນຜົນ, ການຈັດການ prompt ແລະ ມາດຕະວັດເພື່ອປັບປຸງແອັບ LLM ຂອງທ່ານ.","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "ແພລັດຟອມນັກພັດທະນາແບບຄົບວົງຈອນສຳລັບທຸກຂັ້ນຕອນຂອງວົງຈອນຊີວິດແອັບ LLM.",@@ -283,11 +310,24 @@"tracing.opik.title": "Opik","tracing.phoenix.description": "ແພລັດຟອມຕິດຕາມ ແລະ ປະເມີນຜົນແບບ open-source ທີ່ອີງໃສ່ OpenTelemetry ສຳລັບ Workflow ແລະ ເອເຈນ LLM ຂອງທ່ານ.","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "ເບິ່ງໄດ້ເທົ່ານັ້ນ",+ "tracing.run.accepted": "ສົ່ງໄປ {{provider}} ແລ້ວ",+ "tracing.run.failed": "ສົ່ງໄປ {{provider}} ບໍ່ສຳເລັດ",+ "tracing.run.pending": "ກຳລັງສົ່ງໄປ {{provider}}",+ "tracing.run.title": "ການຕິດຕາມພາຍນອກ",+ "tracing.run.uncertain": "{{provider}} ຍັງບໍ່ຢືນຢັນການຮັບ",+ "tracing.run.viewProject": "ເປີດໂປຣເຈັກ",+ "tracing.run.viewSpan": "ເບິ່ງ node ນີ້",+ "tracing.run.viewTrace": "ເບິ່ງການແລ່ນຄັ້ງນີ້",+ "tracing.supported": "ຮອງຮັບ","tracing.tencent.description": "Tencent Application Performance Monitoring ໃຫ້ການຕິດຕາມທີ່ຄົບຖ້ວນ ແລະ ການວິເຄາະຫຼາຍມິຕິສຳລັບແອັບ LLM.",+ "tracing.tencent.endpointHelp": "ຄັດລອກຈຸດປາຍທາງສຳລັບພາກພື້ນ ແລະ ເຄືອຂ່າຍຂອງທ່ານຈາກ Tencent Cloud LLM Observability → ແອັບ → ເຊື່ອມຕໍ່ແອັບ.",+ "tracing.tencent.serviceNameHelp": "ສູງສຸດ 63 ຕົວອັກສອນ: ຕົວອັກສອນອັງກິດນ້ອຍ, ຕົວເລກ ແລະ ຂີດຕໍ່. ເລີ່ມດ້ວຍຕົວອັກສອນນ້ອຍ ແລະ ຈົບດ້ວຍຕົວອັກສອນ ຫຼື ຕົວເລກ.","tracing.tencent.title": "Tencent APM","tracing.title": "ຕິດຕາມປະສິດທິພາບແອັບ","tracing.tracing": "ການຕິດຕາມ (Tracing)","tracing.tracingDescription": "ບັນທຶກສະພາບແວດລ້ອມທັງໝົດຂອງການເຮັດວຽກຂອງແອັບ, ລວມທັງການເອີ້ນ LLM, prompts, ການຮ້ອງຂໍ HTTP ແລະ ອື່ນໆ ໄປຍັງແພລັດຟອມພາຍນອກ.",+ "tracing.unsupported": "ບໍ່ຮອງຮັບ","tracing.view": "ເບິ່ງ","tracing.weave.description": "Weave ແມ່ນແພລັດຟອມ open-source ສຳລັບການປະເມີນ, ທົດສອບ ແລະ ຕິດຕາມແອັບ LLM.","tracing.weave.title": "Weave",diff --git a/web/i18n/locales/nl-NL/app.json b/web/i18n/locales/nl-NL/app.jsonindex 5fb32506163..50fb465d68f 100644--- a/web/i18n/locales/nl-NL/app.json+++ b/web/i18n/locales/nl-NL/app.json@@ -243,10 +243,27 @@"switchTip": "not allow","switchTipEnd": " switching back to Basic Orchestrate.","switchTipStart": "A new app copy will be created for you, and the new copy will switch to Workflow Orchestrate. The new copy will ",+ "tracing.agentSpansUnsupported": "{{provider}} ondersteunt nog geen volledige Agent-traces.",+ "tracing.agentTracingUnavailable": "Agent-tracing is niet beschikbaar, dus traces bevatten geen Agent-interne details of run-links.","tracing.aliyun.description": "The fully-managed and maintenance-free observability platform provided by Alibaba Cloud, enables out-of-the-box monitoring, tracing, and evaluation of Dify applications.","tracing.aliyun.title": "Cloud Monitor","tracing.arize.description": "Enterprise-grade LLM observability, online & offline evaluation, monitoring, and experimentation—powered by OpenTelemetry. Purpose-built for LLM & agent-driven applications.","tracing.arize.title": "Arize",+ "tracing.capabilities": "Aanbiedermogelijkheden",+ "tracing.capabilitiesLoadFailed": "Kan providermogelijkheden niet laden.",+ "tracing.capability.agent_spans": "Agent-spans",+ "tracing.capability.native_cost": "Native kosten",+ "tracing.capability.native_usage": "Native verbruik",+ "tracing.capability.session": "Sessies",+ "tracing.capability.span_url": "Spanlinks",+ "tracing.capability.trace_url": "Tracelinks",+ "tracing.capabilitySummary.allSupported": "Alles ondersteund",+ "tracing.capabilitySummary.unsupported": "{{count}} niet ondersteund",+ "tracing.captureAgent": "Interne Agent-processen vastleggen",+ "tracing.captureAgentDescription": "Interne model- en toolaanroepen van de Agent verzenden",+ "tracing.captureContent": "Inhoud vastleggen",+ "tracing.captureContentDescription": "Invoer en uitvoer van elke run verzenden",+ "tracing.captureTitle": "Agent-gegevensvastlegging","tracing.config": "Config","tracing.configProvider.clientId": "OAuth Client ID","tracing.configProvider.clientSecret": "OAuth Client Secret",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "Enter your {{key}}","tracing.configProvider.project": "Project","tracing.configProvider.publicKey": "Public Key",- "tracing.configProvider.removeConfirmContent": "The current configuration is in use, removing it will turn off the Tracing feature.",+ "tracing.configProvider.removeConfirmContentInUse": "Tracering wordt uitgeschakeld en de opgeslagen inloggegevens worden verwijderd.",+ "tracing.configProvider.removeConfirmContentNotInUse": "De opgeslagen inloggegevens worden verwijderd. Je moet ze opnieuw invoeren om {{key}} te gebruiken.","tracing.configProvider.removeConfirmTitle": "Remove {{key}} configuration?","tracing.configProvider.secretKey": "Secret Key","tracing.configProvider.title": "Config ",@@ -265,7 +283,7 @@"tracing.configProvider.username": "Username","tracing.configProvider.viewDocsLink": "View {{key}} docs","tracing.configProviderTitle.configured": "Configured",- "tracing.configProviderTitle.moreProvider": "More Provider",+ "tracing.configProviderTitle.moreProviders": "Meer providers","tracing.configProviderTitle.notConfigured": "Config provider to enable tracing","tracing.databricks.description": "Databricks offers fully-managed MLflow with strong governance and security for storing trace data.","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "Please config provider first","tracing.enabled": "In Service","tracing.inUse": "In use",+ "tracing.inherited.description": "Wanneer deze Agent in deze workflow draait, gebruikt hij de tracinginstellingen van de workflow, inclusief provider, aan/uit-status en vastlegbeleid. De eigen tracinginstellingen van de Agent gelden hier niet en de node heeft geen aparte configuratie nodig.",+ "tracing.inherited.loadFailed": "Kan de tracingstatus niet laden.",+ "tracing.inherited.notConfigured": "Niet geconfigureerd",+ "tracing.inherited.off": "Uit",+ "tracing.inherited.on": "Aan",+ "tracing.inherited.providerDisabled": "{{provider}} uitgeschakeld",+ "tracing.inherited.providerEnabled": "{{provider}} ingeschakeld",+ "tracing.inherited.settings": "Configureren in workflow",+ "tracing.inherited.title": "Externe tracing","tracing.langfuse.description": "Open-source LLM observability, evaluation, prompt management and metrics to debug and improve your LLM application.","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "An all-in-one developer platform for every step of the LLM-powered application lifecycle.",@@ -283,11 +310,24 @@"tracing.opik.title": "Opik","tracing.phoenix.description": "Open-source & OpenTelemetry-based observability, evaluation, prompt engineering and experimentation platform for your LLM workflows and agents.","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "Alleen bekijken",+ "tracing.run.accepted": "Verzonden naar {{provider}}",+ "tracing.run.failed": "Verzenden naar {{provider}} mislukt",+ "tracing.run.pending": "Verzenden naar {{provider}}",+ "tracing.run.title": "Externe tracing",+ "tracing.run.uncertain": "{{provider}} heeft ontvangst niet bevestigd",+ "tracing.run.viewProject": "Project openen",+ "tracing.run.viewSpan": "Deze node bekijken",+ "tracing.run.viewTrace": "Deze run bekijken",+ "tracing.supported": "Ondersteund","tracing.tencent.description": "Tencent Application Performance Monitoring provides comprehensive tracing and multi-dimensional analysis for LLM applications.",+ "tracing.tencent.endpointHelp": "Kopieer het eindpunt voor uw regio en netwerk uit Tencent Cloud LLM Observability → Applicaties → Applicatie verbinden.",+ "tracing.tencent.serviceNameHelp": "Maximaal 63 tekens: kleine letters, cijfers en koppeltekens. Begin met een kleine letter en eindig met een letter of cijfer.","tracing.tencent.title": "Tencent APM","tracing.title": "Tracing app performance","tracing.tracing": "Tracing","tracing.tracingDescription": "Capture the full context of app execution, including LLM calls, context, prompts, HTTP requests, and more, to a third-party tracing platform.",+ "tracing.unsupported": "Niet beschikbaar","tracing.view": "View","tracing.weave.description": "Weave is an open-source platform for evaluating, testing, and monitoring LLM applications.","tracing.weave.title": "Weave",diff --git a/web/i18n/locales/pl-PL/app.json b/web/i18n/locales/pl-PL/app.jsonindex afa318b2a3e..7991f30ead9 100644--- a/web/i18n/locales/pl-PL/app.json+++ b/web/i18n/locales/pl-PL/app.json@@ -243,10 +243,27 @@"switchTip": "nie pozwoli","switchTipEnd": " na powrót do Podstawowej Orkiestracji.","switchTipStart": "Dla ciebie zostanie utworzona nowa kopia aplikacji, a nowa kopia przełączy się na Orkiestrację Przepływu Pracy. Nowa kopia będzie ",+ "tracing.agentSpansUnsupported": "{{provider}} nie obsługuje jeszcze pełnych śladów Agent.",+ "tracing.agentTracingUnavailable": "Śledzenie Agenta jest niedostępne, więc ślady nie będą zawierać wnętrza Agenta ani linków do uruchomień.","tracing.aliyun.description": "W pełni zarządzana i wolna od konserwacji platforma obserwowalności oferowana przez Alibaba Cloud umożliwia gotowe monitorowanie, śledzenie i oceny aplikacji Dify.","tracing.aliyun.title": "Monitor Chmury","tracing.arize.description": "Obserwowalność LLM klasy korporacyjnej, ocena online i offline, monitorowanie i eksperymentowanie — oparta na OpenTelemetry. Zaprojektowana specjalnie dla aplikacji opartych na LLM i agentach.","tracing.arize.title": "Arize",+ "tracing.capabilities": "Możliwości dostawcy",+ "tracing.capabilitiesLoadFailed": "Nie można załadować możliwości dostawcy.",+ "tracing.capability.agent_spans": "Spany Agenta",+ "tracing.capability.native_cost": "Natywny koszt",+ "tracing.capability.native_usage": "Natywne użycie",+ "tracing.capability.session": "Sesje",+ "tracing.capability.span_url": "Linki do spanów",+ "tracing.capability.trace_url": "Linki do śladów",+ "tracing.capabilitySummary.allSupported": "Wszystko obsługiwane",+ "tracing.capabilitySummary.unsupported": "Nieobsługiwane: {{count}}",+ "tracing.captureAgent": "Zbieraj wewnętrzne operacje Agenta",+ "tracing.captureAgentDescription": "Wysyłaj wewnętrzne wywołania modeli i narzędzi Agenta",+ "tracing.captureContent": "Zbieraj treść",+ "tracing.captureContentDescription": "Wysyłaj dane wejściowe i wyjściowe każdego uruchomienia",+ "tracing.captureTitle": "Zbieranie danych Agent","tracing.config": "Konfiguruj","tracing.configProvider.clientId": "ID klienta OAuth","tracing.configProvider.clientSecret": "Sekretny klucz klienta OAuth",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "Wprowadź swój {{key}}","tracing.configProvider.project": "Projekt","tracing.configProvider.publicKey": "Klucz publiczny",- "tracing.configProvider.removeConfirmContent": "Obecna konfiguracja jest w użyciu, jej usunięcie wyłączy funkcję Śledzenia.",+ "tracing.configProvider.removeConfirmContentInUse": "Śledzenie zostanie wyłączone, a zapisane dane uwierzytelniające zostaną usunięte.",+ "tracing.configProvider.removeConfirmContentNotInUse": "Zapisane dane uwierzytelniające zostaną usunięte. Aby korzystać z {{key}}, trzeba będzie wprowadzić je ponownie.","tracing.configProvider.removeConfirmTitle": "Usunąć konfigurację {{key}}?","tracing.configProvider.secretKey": "Klucz tajny","tracing.configProvider.title": "Konfiguruj ",@@ -265,7 +283,7 @@"tracing.configProvider.username": "Nazwa użytkownika","tracing.configProvider.viewDocsLink": "Zobacz dokumentację {{key}}","tracing.configProviderTitle.configured": "Skonfigurowano",- "tracing.configProviderTitle.moreProvider": "Więcej dostawców",+ "tracing.configProviderTitle.moreProviders": "Więcej dostawców","tracing.configProviderTitle.notConfigured": "Skonfiguruj dostawcę, aby włączyć śledzenie","tracing.databricks.description": "Databricks oferuje w pełni zarządzany MLflow z silną kontrolą i bezpieczeństwem do przechowywania danych śledzenia.","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "Najpierw skonfiguruj dostawcę","tracing.enabled": "W użyciu","tracing.inUse": "W użyciu",+ "tracing.inherited.description": "Gdy ten Agent działa w tym przepływie pracy, korzysta z ustawień śledzenia przepływu, w tym dostawcy, stanu wł./wył. i zasad zbierania. Własne ustawienia śledzenia Agenta nie mają tu zastosowania, a węzeł nie wymaga osobnej konfiguracji.",+ "tracing.inherited.loadFailed": "Nie można załadować stanu śledzenia.",+ "tracing.inherited.notConfigured": "Nie skonfigurowano",+ "tracing.inherited.off": "Wył.",+ "tracing.inherited.on": "Wł.",+ "tracing.inherited.providerDisabled": "{{provider}} wyłączony",+ "tracing.inherited.providerEnabled": "{{provider}} włączony",+ "tracing.inherited.settings": "Skonfiguruj w przepływie pracy",+ "tracing.inherited.title": "Śledzenie zewnętrzne","tracing.langfuse.description": "Śledzenie, oceny, zarządzanie promptami i metryki do debugowania i ulepszania twojej aplikacji LLM.","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "Kompleksowa platforma deweloperska dla każdego etapu cyklu życia aplikacji opartej na LLM.",@@ -283,11 +310,24 @@"tracing.opik.title": "Opik","tracing.phoenix.description": "Otwarta i oparta na OpenTelemetry platforma do obserwowalności, oceny, inżynierii promptów i eksperymentowania dla Twoich przepływów pracy i agentów LLM.","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "Tylko do odczytu",+ "tracing.run.accepted": "Wysłano do {{provider}}",+ "tracing.run.failed": "Nie udało się wysłać do {{provider}}",+ "tracing.run.pending": "Wysyłanie do {{provider}}",+ "tracing.run.title": "Śledzenie zewnętrzne",+ "tracing.run.uncertain": "{{provider}} nie potwierdził odbioru",+ "tracing.run.viewProject": "Otwórz projekt",+ "tracing.run.viewSpan": "Zobacz ten węzeł",+ "tracing.run.viewTrace": "Zobacz to uruchomienie",+ "tracing.supported": "Obsługiwane","tracing.tencent.description": "Tencent Application Performance Monitoring zapewnia kompleksowe śledzenie i wielowymiarową analizę dla aplikacji LLM.",+ "tracing.tencent.endpointHelp": "Skopiuj punkt końcowy dla swojego regionu i sieci z Tencent Cloud LLM Observability → Aplikacje → Połącz aplikację.",+ "tracing.tencent.serviceNameHelp": "Maksymalnie 63 znaki: małe litery, cyfry i łączniki. Zacznij od małej litery i zakończ literą lub cyfrą.","tracing.tencent.title": "Tencent APM","tracing.title": "Śledzenie wydajności aplikacji","tracing.tracing": "Śledzenie","tracing.tracingDescription": "Przechwytywanie pełnego kontekstu wykonania aplikacji, w tym wywołań LLM, kontekstu, promptów, żądań HTTP i więcej, do platformy śledzenia stron trzecich.",+ "tracing.unsupported": "Niedostępne","tracing.view": "Widok","tracing.weave.description": "Weave to platforma open-source do oceny, testowania i monitorowania aplikacji LLM.","tracing.weave.title": "Tkaj",diff --git a/web/i18n/locales/pt-BR/app.json b/web/i18n/locales/pt-BR/app.jsonindex d99f933a2b7..de5c23414ad 100644--- a/web/i18n/locales/pt-BR/app.json+++ b/web/i18n/locales/pt-BR/app.json@@ -243,10 +243,27 @@"switchTip": "volta","switchTipEnd": " para Orquestração Básica.","switchTipStart": "Será criada uma nova cópia do aplicativo para você e a nova cópia mudará para Orquestração de Fluxo de Trabalho. A nova cópia não permitirá a ",+ "tracing.agentSpansUnsupported": "{{provider}} ainda não oferece suporte a traces completos de Agent.",+ "tracing.agentTracingUnavailable": "O rastreamento de Agent não está disponível, então os traces não incluirão detalhes internos do Agent nem links de execução.","tracing.aliyun.description": "A plataforma de observabilidade totalmente gerenciada e sem manutenção fornecida pela Alibaba Cloud, permite monitoramento, rastreamento e avaliação prontos para uso de aplicações Dify.","tracing.aliyun.title": "Monitoramento em Nuvem","tracing.arize.description": "Observabilidade de LLM de nível empresarial, avaliação online e offline, monitoramento e experimentação—impulsionada pelo OpenTelemetry. Projetado especificamente para aplicações baseadas em LLM e agentes.","tracing.arize.title": "Arize",+ "tracing.capabilities": "Recursos do provedor",+ "tracing.capabilitiesLoadFailed": "Não foi possível carregar os recursos do provedor.",+ "tracing.capability.agent_spans": "Spans do Agent",+ "tracing.capability.native_cost": "Custo nativo",+ "tracing.capability.native_usage": "Uso nativo",+ "tracing.capability.session": "Sessões",+ "tracing.capability.span_url": "Links de spans",+ "tracing.capability.trace_url": "Links de rastreamento",+ "tracing.capabilitySummary.allSupported": "Tudo compatível",+ "tracing.capabilitySummary.unsupported": "{{count}} não compatíveis",+ "tracing.captureAgent": "Capturar processos internos do Agent",+ "tracing.captureAgentDescription": "Enviar chamadas internas de modelo e ferramenta do Agent",+ "tracing.captureContent": "Capturar conteúdo",+ "tracing.captureContentDescription": "Enviar entradas e saídas de cada execução",+ "tracing.captureTitle": "Captura de dados do Agent","tracing.config": "Configurar","tracing.configProvider.clientId": "ID do Cliente OAuth","tracing.configProvider.clientSecret": "Segredo do Cliente OAuth",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "Insira sua {{key}}","tracing.configProvider.project": "Projeto","tracing.configProvider.publicKey": "Chave Pública",- "tracing.configProvider.removeConfirmContent": "A configuração atual está em uso, removê-la desligará o recurso de Rastreamento.",+ "tracing.configProvider.removeConfirmContentInUse": "O rastreamento será desativado e as credenciais salvas serão excluídas.",+ "tracing.configProvider.removeConfirmContentNotInUse": "As credenciais salvas serão excluídas. Você precisará inseri-las novamente para usar {{key}}.","tracing.configProvider.removeConfirmTitle": "Remover configuração de {{key}}?","tracing.configProvider.secretKey": "Chave Secreta","tracing.configProvider.title": "Configurar ",@@ -265,7 +283,7 @@"tracing.configProvider.username": "Nome de usuário","tracing.configProvider.viewDocsLink": "Ver documentação de {{key}}","tracing.configProviderTitle.configured": "Configurado",- "tracing.configProviderTitle.moreProvider": "Mais provedores",+ "tracing.configProviderTitle.moreProviders": "Mais provedores","tracing.configProviderTitle.notConfigured": "Configure o provedor para habilitar o rastreamento","tracing.databricks.description": "Databricks oferece MLflow totalmente gerenciado com forte governança e segurança para armazenar dados de rastreamento.","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "Por favor, configure o provedor primeiro","tracing.enabled": "Em serviço","tracing.inUse": "Em uso",+ "tracing.inherited.description": "Quando este Agent é executado neste fluxo de trabalho, ele usa as configurações de rastreamento do fluxo, incluindo provedor, estado ativado/desativado e política de captura. As configurações de rastreamento do próprio Agent não se aplicam aqui, e o nó não precisa de configuração separada.",+ "tracing.inherited.loadFailed": "Não foi possível carregar o status do rastreamento.",+ "tracing.inherited.notConfigured": "Não configurado",+ "tracing.inherited.off": "Desativado",+ "tracing.inherited.on": "Ativado",+ "tracing.inherited.providerDisabled": "{{provider}} desativado",+ "tracing.inherited.providerEnabled": "{{provider}} ativado",+ "tracing.inherited.settings": "Configurar no fluxo de trabalho",+ "tracing.inherited.title": "Rastreamento externo","tracing.langfuse.description": "Rastreamentos, avaliações, gerenciamento de prompts e métricas para depurar e melhorar seu aplicativo LLM.","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "Uma plataforma de desenvolvedor completa para cada etapa do ciclo de vida do aplicativo impulsionado por LLM.",@@ -283,11 +310,24 @@"tracing.opik.title": "Opik","tracing.phoenix.description": "Plataforma de observabilidade, avaliação, engenharia de prompts e experimentação de código aberto baseada em OpenTelemetry para seus fluxos de trabalho e agentes de LLM.","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "Somente leitura",+ "tracing.run.accepted": "Enviado para {{provider}}",+ "tracing.run.failed": "Falha ao enviar para {{provider}}",+ "tracing.run.pending": "Enviando para {{provider}}",+ "tracing.run.title": "Rastreamento externo",+ "tracing.run.uncertain": "{{provider}} não confirmou o recebimento",+ "tracing.run.viewProject": "Abrir projeto",+ "tracing.run.viewSpan": "Ver este nó",+ "tracing.run.viewTrace": "Ver esta execução",+ "tracing.supported": "Compatível","tracing.tencent.description": "O Monitoramento de Desempenho de Aplicações da Tencent fornece rastreamento abrangente e análise multidimensional para aplicações LLM.",+ "tracing.tencent.endpointHelp": "Copie o endpoint da sua região e rede em Tencent Cloud LLM Observability → Aplicativos → Conectar aplicativo.",+ "tracing.tencent.serviceNameHelp": "Até 63 caracteres: letras minúsculas, números e hífens. Comece com uma letra minúscula e termine com uma letra ou número.","tracing.tencent.title": "Tencent APM","tracing.title": "Rastreamento de desempenho do aplicativo","tracing.tracing": "Rastreamento","tracing.tracingDescription": "Captura o contexto completo da execução do aplicativo, incluindo chamadas LLM, contexto, prompts, solicitações HTTP e mais, para uma plataforma de rastreamento de terceiros.",+ "tracing.unsupported": "Indisponível","tracing.view": "Vista","tracing.weave.description": "Weave é uma plataforma de código aberto para avaliar, testar e monitorar aplicações de LLM.","tracing.weave.title": "Trançar",diff --git a/web/i18n/locales/ro-RO/app.json b/web/i18n/locales/ro-RO/app.jsonindex fce9a5e04f6..60a399d696a 100644--- a/web/i18n/locales/ro-RO/app.json+++ b/web/i18n/locales/ro-RO/app.json@@ -243,10 +243,27 @@"switchTip": "nu va permite","switchTipEnd": " comutarea înapoi la Orchestrare de Bază.","switchTipStart": "O nouă copie a aplicației va fi creată pentru tine, iar noua copie va comuta la Orchestrare Flux de Lucru. Noua copie ",+ "tracing.agentSpansUnsupported": "{{provider}} nu acceptă încă urme Agent complete.",+ "tracing.agentTracingUnavailable": "Urmărirea Agent nu este disponibilă, așa că urmele nu vor include detaliile interne ale Agentului și nici linkuri către rulări.","tracing.aliyun.description": "Platforma de observabilitate SaaS oferită de Alibaba Cloud permite monitorizarea, urmărirea și evaluarea aplicațiilor Dify din cutie.","tracing.aliyun.title": "Monitorizarea Cloud","tracing.arize.description": "Observabilitate LLM de nivel enterprise, evaluare online și offline, monitorizare și experimentare—alimentată de OpenTelemetry. Proiectată special pentru aplicații bazate pe LLM și agenți.","tracing.arize.title": "Arize",+ "tracing.capabilities": "Capabilitățile furnizorului",+ "tracing.capabilitiesLoadFailed": "Capacitățile furnizorului nu au putut fi încărcate.",+ "tracing.capability.agent_spans": "Span-uri Agent",+ "tracing.capability.native_cost": "Cost nativ",+ "tracing.capability.native_usage": "Utilizare nativă",+ "tracing.capability.session": "Sesiuni",+ "tracing.capability.span_url": "Linkuri span",+ "tracing.capability.trace_url": "Linkuri de urmărire",+ "tracing.capabilitySummary.allSupported": "Toate acceptate",+ "tracing.capabilitySummary.unsupported": "{{count}} neacceptate",+ "tracing.captureAgent": "Colectează operațiile interne ale Agentului",+ "tracing.captureAgentDescription": "Trimite apelurile interne ale Agentului către modele și instrumente",+ "tracing.captureContent": "Colectează conținut",+ "tracing.captureContentDescription": "Trimite intrările și ieșirile fiecărei rulări",+ "tracing.captureTitle": "Colectarea datelor Agent","tracing.config": "Configurare","tracing.configProvider.clientId": "ID client OAuth","tracing.configProvider.clientSecret": "Secret client OAuth",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "Introduceți {{key}}-ul dvs.","tracing.configProvider.project": "Proiect","tracing.configProvider.publicKey": "Cheie publică",- "tracing.configProvider.removeConfirmContent": "Configurația curentă este în uz, eliminarea acesteia va dezactiva funcția de Urmărire.",+ "tracing.configProvider.removeConfirmContentInUse": "Urmărirea va fi dezactivată, iar credențialele salvate vor fi șterse.",+ "tracing.configProvider.removeConfirmContentNotInUse": "Credențialele salvate vor fi șterse. Va trebui să le introduceți din nou pentru a folosi {{key}}.","tracing.configProvider.removeConfirmTitle": "Eliminați configurația {{key}}?","tracing.configProvider.secretKey": "Cheie secretă","tracing.configProvider.title": "Configurare ",@@ -265,7 +283,7 @@"tracing.configProvider.username": "Nume de utilizator","tracing.configProvider.viewDocsLink": "Vizualizați documentația {{key}}","tracing.configProviderTitle.configured": "Configurat",- "tracing.configProviderTitle.moreProvider": "Mai mulți furnizori",+ "tracing.configProviderTitle.moreProviders": "Mai mulți furnizori","tracing.configProviderTitle.notConfigured": "Configurați furnizorul pentru a activa urmărirea","tracing.databricks.description": "Databricks oferă MLflow complet gestionat cu o puternică guvernanță și securitate pentru stocarea datelor de urmărire.","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "Vă rugăm să configurați mai întâi furnizorul","tracing.enabled": "În serviciu","tracing.inUse": "În utilizare",+ "tracing.inherited.description": "Când acest Agent rulează în acest flux de lucru, folosește setările de urmărire ale fluxului, inclusiv furnizorul, starea pornit/oprit și politica de colectare. Setările de urmărire proprii ale Agentului nu se aplică aici, iar nodul nu necesită configurare separată.",+ "tracing.inherited.loadFailed": "Starea urmăririi nu a putut fi încărcată.",+ "tracing.inherited.notConfigured": "Neconfigurat",+ "tracing.inherited.off": "Oprit",+ "tracing.inherited.on": "Pornit",+ "tracing.inherited.providerDisabled": "{{provider}} dezactivat",+ "tracing.inherited.providerEnabled": "{{provider}} activat",+ "tracing.inherited.settings": "Configurează în fluxul de lucru",+ "tracing.inherited.title": "Urmărire externă","tracing.langfuse.description": "Urmărire, evaluări, gestionarea prompt-urilor și metrici pentru depanarea și îmbunătățirea aplicației dvs. LLM.","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "O platformă de dezvoltare all-in-one pentru fiecare etapă a ciclului de viață al aplicației bazate pe LLM.",@@ -283,11 +310,24 @@"tracing.opik.title": "Opik","tracing.phoenix.description": "Platformă open-source și bazată pe OpenTelemetry pentru observabilitate, evaluare, inginerie de prompturi și experimentare pentru fluxurile de lucru și agenții LLM.","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "Doar vizualizare",+ "tracing.run.accepted": "Trimis către {{provider}}",+ "tracing.run.failed": "Trimiterea către {{provider}} a eșuat",+ "tracing.run.pending": "Se trimite către {{provider}}",+ "tracing.run.title": "Urmărire externă",+ "tracing.run.uncertain": "{{provider}} nu a confirmat primirea",+ "tracing.run.viewProject": "Deschide proiectul",+ "tracing.run.viewSpan": "Vezi acest nod",+ "tracing.run.viewTrace": "Vezi această rulare",+ "tracing.supported": "Acceptat","tracing.tencent.description": "Monitorizarea Performanței Aplicațiilor Tencent oferă trasabilitate cuprinzătoare și analiză multidimensională pentru aplicațiile LLM.",+ "tracing.tencent.endpointHelp": "Copiați endpoint-ul regiunii și rețelei dvs. din Tencent Cloud LLM Observability → Aplicații → Conectare aplicație.",+ "tracing.tencent.serviceNameHelp": "Cel mult 63 de caractere: litere mici, cifre și cratime. Începeți cu o literă mică și terminați cu o literă sau cifră.","tracing.tencent.title": "Tencent APM","tracing.title": "Urmărirea performanței aplicației","tracing.tracing": "Urmărire","tracing.tracingDescription": "Captează contextul complet al execuției aplicației, inclusiv apelurile LLM, context, prompt-uri, cereri HTTP și altele, către o platformă de urmărire terță.",+ "tracing.unsupported": "Indisponibil","tracing.view": "Vedere","tracing.weave.description": "Weave este o platformă open-source pentru evaluarea, testarea și monitorizarea aplicațiilor LLM.","tracing.weave.title": "Împletește",diff --git a/web/i18n/locales/ru-RU/app.json b/web/i18n/locales/ru-RU/app.jsonindex f3b852c12e0..ae8012ca177 100644--- a/web/i18n/locales/ru-RU/app.json+++ b/web/i18n/locales/ru-RU/app.json@@ -243,10 +243,27 @@"switchTip": "не позволит","switchTipEnd": " переключиться обратно на базовую организацию.","switchTipStart": "Для вас будет создана новая копия Workflow. Новая копия ",+ "tracing.agentSpansUnsupported": "{{provider}} пока не поддерживает полные трассировки Agent.",+ "tracing.agentTracingUnavailable": "Трассировка Agent недоступна, поэтому трассировки не будут содержать внутренние детали Agent и ссылки на запуски.","tracing.aliyun.description": "Полностью управляемая и не требующая обслуживания платформа наблюдения, предоставляемая Alibaba Cloud, обеспечивает мониторинг, трассировку и оценку приложений Dify из коробки.","tracing.aliyun.title": "Облачный монитор","tracing.arize.description": "Корпоративный уровень наблюдаемости LLM, онлайн и оффлайн оценка, мониторинг и эксперименты—на основе OpenTelemetry. Специально разработан для приложений на базе LLM и агентов.","tracing.arize.title": "Arize",+ "tracing.capabilities": "Возможности провайдера",+ "tracing.capabilitiesLoadFailed": "Не удалось загрузить возможности провайдера.",+ "tracing.capability.agent_spans": "Спаны Agent",+ "tracing.capability.native_cost": "Нативная стоимость",+ "tracing.capability.native_usage": "Нативное использование",+ "tracing.capability.session": "Сессии",+ "tracing.capability.span_url": "Ссылки на спаны",+ "tracing.capability.trace_url": "Ссылки на трассы",+ "tracing.capabilitySummary.allSupported": "Всё поддерживается",+ "tracing.capabilitySummary.unsupported": "Не поддерживается: {{count}}",+ "tracing.captureAgent": "Собирать внутренние операции Agent",+ "tracing.captureAgentDescription": "Отправлять внутренние вызовы моделей и инструментов Agent",+ "tracing.captureContent": "Собирать содержимое",+ "tracing.captureContentDescription": "Отправлять входные и выходные данные каждого запуска",+ "tracing.captureTitle": "Сбор данных Agent","tracing.config": "Настройка","tracing.configProvider.clientId": "Идентификатор клиента OAuth","tracing.configProvider.clientSecret": "Секрет клиента OAuth",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "Введите ваш {{key}}","tracing.configProvider.project": "Проект","tracing.configProvider.publicKey": "Публичный ключ",- "tracing.configProvider.removeConfirmContent": "Текущая конфигурация используется, ее удаление отключит функцию трассировки.",+ "tracing.configProvider.removeConfirmContentInUse": "Трассировка будет отключена, а сохранённые учётные данные удалены.",+ "tracing.configProvider.removeConfirmContentNotInUse": "Сохранённые учётные данные будут удалены. Чтобы снова использовать {{key}}, их нужно будет ввести заново.","tracing.configProvider.removeConfirmTitle": "Удалить конфигурацию {{key}}?","tracing.configProvider.secretKey": "Секретный ключ","tracing.configProvider.title": "Настройка ",@@ -265,7 +283,7 @@"tracing.configProvider.username": "Имя пользователя","tracing.configProvider.viewDocsLink": "Посмотреть документацию {{key}}","tracing.configProviderTitle.configured": "Настроено",- "tracing.configProviderTitle.moreProvider": "Больше провайдеров",+ "tracing.configProviderTitle.moreProviders": "Другие поставщики","tracing.configProviderTitle.notConfigured": "Настройте провайдера, чтобы включить трассировку","tracing.databricks.description": "Databricks предлагает полностью управляемый MLflow с сильным управлением и безопасностью для хранения данных трассировки.","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "Пожалуйста, сначала настройте провайдера LLM","tracing.enabled": "В работе","tracing.inUse": "Используется",+ "tracing.inherited.description": "При запуске в этом рабочем процессе Agent использует настройки трассировки рабочего процесса: провайдера, состояние вкл./выкл. и политику сбора. Собственные настройки трассировки Agent здесь не применяются, отдельная настройка узла не нужна.",+ "tracing.inherited.loadFailed": "Не удалось загрузить статус трассировки.",+ "tracing.inherited.notConfigured": "Не настроено",+ "tracing.inherited.off": "Выкл.",+ "tracing.inherited.on": "Вкл.",+ "tracing.inherited.providerDisabled": "{{provider}}: выключено",+ "tracing.inherited.providerEnabled": "{{provider}}: включено",+ "tracing.inherited.settings": "Настроить в рабочем процессе",+ "tracing.inherited.title": "Внешняя трассировка","tracing.langfuse.description": "Трассировка, оценка, управление подсказками и метрики для отладки и улучшения вашего приложения LLM.","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "Универсальная платформа для разработчиков для каждого этапа жизненного цикла приложения на базе LLM.",@@ -283,11 +310,24 @@"tracing.opik.title": "Опик","tracing.phoenix.description": "Открытая и основанная на OpenTelemetry платформа для наблюдаемости, оценки, инженерии подсказок и экспериментов для ваших рабочих процессов и агентов LLM.","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "Только просмотр",+ "tracing.run.accepted": "Отправлено в {{provider}}",+ "tracing.run.failed": "Не удалось отправить в {{provider}}",+ "tracing.run.pending": "Отправка в {{provider}}",+ "tracing.run.title": "Внешняя трассировка",+ "tracing.run.uncertain": "{{provider}} не подтвердил получение",+ "tracing.run.viewProject": "Открыть проект",+ "tracing.run.viewSpan": "Открыть этот узел",+ "tracing.run.viewTrace": "Открыть этот запуск",+ "tracing.supported": "Поддерживается","tracing.tencent.description": "Мониторинг производительности приложений Tencent предоставляет всестороннее отслеживание и многомерный анализ для приложений LLM.",+ "tracing.tencent.endpointHelp": "Скопируйте адрес для своего региона и сети из Tencent Cloud LLM Observability → Приложения → Подключить приложение.",+ "tracing.tencent.serviceNameHelp": "До 63 символов: строчные латинские буквы, цифры и дефисы. Начинайте со строчной буквы, заканчивайте буквой или цифрой.","tracing.tencent.title": "Tencent APM","tracing.title": "Отслеживание производительности приложения","tracing.tracing": "Отслеживание","tracing.tracingDescription": "Запись полного контекста выполнения приложения, включая вызовы LLM, контекст, подсказки, HTTP-запросы и многое другое, на стороннюю платформу трассировки.",+ "tracing.unsupported": "Недоступно","tracing.view": "Просмотр","tracing.weave.description": "Weave — это открытая платформа для оценки, тестирования и мониторинга приложений LLM.","tracing.weave.title": "Ткать",diff --git a/web/i18n/locales/sl-SI/app.json b/web/i18n/locales/sl-SI/app.jsonindex 1ae450506c8..f65bec20f1f 100644--- a/web/i18n/locales/sl-SI/app.json+++ b/web/i18n/locales/sl-SI/app.json@@ -243,10 +243,27 @@"switchTip": "dovolila","switchTipEnd": " preklopa nazaj na Basic Orchestrate.","switchTipStart": "Za vas bo ustvarjena nova kopija aplikacije, ki bo preklopila na Workflow Orchestrate. Nova kopija ne bo ",+ "tracing.agentSpansUnsupported": "{{provider}} še ne podpira popolnih sledi Agent.",+ "tracing.agentTracingUnavailable": "Sledenje Agenta ni na voljo, zato sledi ne bodo vsebovale notranjosti Agenta niti povezav do zagonov.","tracing.aliyun.description": "Popolnoma upravljana in brez vzdrževanja platforma za opazovanje, ki jo zagotavlja Alibaba Cloud, omogoča takojšnje spremljanje, sledenje in ocenjevanje aplikacij Dify.","tracing.aliyun.title": "Oblačni nadzor","tracing.arize.description": "Podjetniško opazovanje LLM, spletno in nespletno vrednotenje, nadzorovanje in eksperimentiranje — s podporo OpenTelemetry. Namenjeno aplikacijam, ki temeljijo na LLM in agentih.","tracing.arize.title": "Arize",+ "tracing.capabilities": "Zmožnosti ponudnika",+ "tracing.capabilitiesLoadFailed": "Zmožnosti ponudnika ni bilo mogoče naložiti.",+ "tracing.capability.agent_spans": "Razponi Agent",+ "tracing.capability.native_cost": "Izvorni stroški",+ "tracing.capability.native_usage": "Izvorna poraba",+ "tracing.capability.session": "Seje",+ "tracing.capability.span_url": "Povezave do razponov",+ "tracing.capability.trace_url": "Povezave do sledi",+ "tracing.capabilitySummary.allSupported": "Vse podprto",+ "tracing.capabilitySummary.unsupported": "Nepodprto: {{count}}",+ "tracing.captureAgent": "Zajemi notranje operacije Agenta",+ "tracing.captureAgentDescription": "Pošlji notranje klice modelov in orodij Agenta",+ "tracing.captureContent": "Zajemi vsebino",+ "tracing.captureContentDescription": "Pošlji vhode in izhode vsakega zagona",+ "tracing.captureTitle": "Zajem podatkov Agent","tracing.config": "Konfiguracija","tracing.configProvider.clientId": "ID odjemalca OAuth","tracing.configProvider.clientSecret": "OAuth skrivnost odjemalca",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "Vnesite vaš {{key}}","tracing.configProvider.project": "Projekt","tracing.configProvider.publicKey": "Javni ključ",- "tracing.configProvider.removeConfirmContent": "Trenutna konfiguracija je v uporabi, odstranitev bo onemogočila funkcijo sledenja.",+ "tracing.configProvider.removeConfirmContentInUse": "Sledenje bo izklopljeno, shranjene poverilnice pa bodo izbrisane.",+ "tracing.configProvider.removeConfirmContentNotInUse": "Shranjene poverilnice bodo izbrisane. Za uporabo {{key}} jih boste morali vnesti znova.","tracing.configProvider.removeConfirmTitle": "Odstraniti konfiguracijo {{key}}?","tracing.configProvider.secretKey": "Skrivni ključ","tracing.configProvider.title": "Konfiguracija",@@ -265,7 +283,7 @@"tracing.configProvider.username": "Uporabniško ime","tracing.configProvider.viewDocsLink": "Ogled dokumentov {{key}}","tracing.configProviderTitle.configured": "Konfigurirano",- "tracing.configProviderTitle.moreProvider": "Več ponudnikov",+ "tracing.configProviderTitle.moreProviders": "Drugi ponudniki","tracing.configProviderTitle.notConfigured": "Konfigurirajte ponudnika za omogočanje sledenja","tracing.databricks.description": "Databricks ponuja popolnoma upravljan MLflow z močnim upravljanjem in varnostjo za shranjevanje podatkov sledenja.","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "Najprej konfigurirajte ponudnika","tracing.enabled": "V storitvi","tracing.inUse": "V uporabi",+ "tracing.inherited.description": "Ko se ta Agent izvaja v tem delovnem toku, uporablja nastavitve sledenja delovnega toka, vključno s ponudnikom, stanjem vklopa/izklopa in pravilnikom zajema. Lastne nastavitve sledenja Agenta tu ne veljajo, vozlišče pa ne potrebuje ločene nastavitve.",+ "tracing.inherited.loadFailed": "Stanja sledenja ni bilo mogoče naložiti.",+ "tracing.inherited.notConfigured": "Ni konfigurirano",+ "tracing.inherited.off": "Izklopljeno",+ "tracing.inherited.on": "Vklopljeno",+ "tracing.inherited.providerDisabled": "{{provider}} izklopljen",+ "tracing.inherited.providerEnabled": "{{provider}} vklopljen",+ "tracing.inherited.settings": "Konfiguriraj v delovnem toku",+ "tracing.inherited.title": "Zunanje sledenje","tracing.langfuse.description": "Sledi, vrednoti, upravlja pozive in meri za odpravljanje napak in izboljšanje vaše aplikacije LLM.","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "Vse-v-enem razvijalska platforma za vsak korak življenjskega cikla aplikacije, ki jo poganja LLM.",@@ -283,11 +310,24 @@"tracing.opik.title": "Opik","tracing.phoenix.description": "Odprtokodna in na OpenTelemetry osnovana platforma za opazovanje, vrednotenje, inženiring pozivov ter eksperimentiranje za vaše LLM poteke dela in agente.","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "Samo za ogled",+ "tracing.run.accepted": "Poslano v {{provider}}",+ "tracing.run.failed": "Pošiljanje v {{provider}} ni uspelo",+ "tracing.run.pending": "Pošiljanje v {{provider}}",+ "tracing.run.title": "Zunanje sledenje",+ "tracing.run.uncertain": "{{provider}} ni potrdil prejema",+ "tracing.run.viewProject": "Odpri projekt",+ "tracing.run.viewSpan": "Ogled tega vozlišča",+ "tracing.run.viewTrace": "Ogled tega zagona",+ "tracing.supported": "Podprto","tracing.tencent.description": "Tencent Application Performance Monitoring zagotavlja celovito sledenje in večdimenzionalno analizo za aplikacije LLM.",+ "tracing.tencent.endpointHelp": "Kopirajte končno točko za svojo regijo in omrežje iz Tencent Cloud LLM Observability → Aplikacije → Poveži aplikacijo.",+ "tracing.tencent.serviceNameHelp": "Največ 63 znakov: male črke, števke in vezaji. Začnite z malo črko in končajte s črko ali števko.","tracing.tencent.title": "Tencent APM","tracing.title": "Sledenje uspešnosti aplikacije","tracing.tracing": "Sledenje","tracing.tracingDescription": "Zajem celotnega konteksta izvajanja aplikacije, vključno s klici LLM, kontekstom, pozivi, zahtevami HTTP in še več, na platformo za sledenje tretje osebe.",+ "tracing.unsupported": "Ni na voljo","tracing.view": "Ogled","tracing.weave.description": "Weave je odprtokodna platforma za vrednotenje, testiranje in spremljanje aplikacij LLM.","tracing.weave.title": "Tkanje",diff --git a/web/i18n/locales/th-TH/app.json b/web/i18n/locales/th-TH/app.jsonindex 853d9482496..c65b9ea99ac 100644--- a/web/i18n/locales/th-TH/app.json+++ b/web/i18n/locales/th-TH/app.json@@ -243,10 +243,27 @@"switchTip": "ไม่อนุญาต","switchTipEnd": "เปลี่ยนกลับเป็น Basic Orchestrate","switchTipStart": "สําเนาโปรเจกต์ใหม่จะถูกสร้างขึ้นสําหรับคุณ และสําเนาใหม่จะเปลี่ยนเป็น Workflow Orchestration",+ "tracing.agentSpansUnsupported": "{{provider}} ยังไม่รองรับการติดตาม Agent แบบสมบูรณ์",+ "tracing.agentTracingUnavailable": "การติดตาม Agent ยังใช้งานไม่ได้ ข้อมูลการติดตามจึงจะไม่รวมกระบวนการภายในของ Agent และลิงก์การทำงาน","tracing.aliyun.description": "แพลตฟอร์มการสังเกตการณ์ที่จัดการโดย Alibaba Cloud ซึ่งไม่ต้องดูแลและบำรุงรักษา ช่วยให้สามารถติดตาม ตรวจสอบ และประเมินแอปพลิเคชัน Dify ได้ทันที","tracing.aliyun.title": "การตรวจสอบคลาวด์","tracing.arize.description": "การสังเกตการณ์ LLM ระดับองค์กร การประเมินออนไลน์และออฟไลน์ การตรวจสอบ และการทดลอง—ขับเคลื่อนโดย OpenTelemetry ออกแบบมาโดยเฉพาะสำหรับแอปพลิเคชันที่ขับเคลื่อนด้วย LLM และตัวแทน","tracing.arize.title": "Arize",+ "tracing.capabilities": "ความสามารถของผู้ให้บริการ",+ "tracing.capabilitiesLoadFailed": "ไม่สามารถโหลดความสามารถของผู้ให้บริการได้",+ "tracing.capability.agent_spans": "สแปน Agent",+ "tracing.capability.native_cost": "ค่าใช้จ่ายดั้งเดิม",+ "tracing.capability.native_usage": "การใช้งานดั้งเดิม",+ "tracing.capability.session": "เซสชัน",+ "tracing.capability.span_url": "ลิงก์สแปน",+ "tracing.capability.trace_url": "ลิงก์เทรซ",+ "tracing.capabilitySummary.allSupported": "รองรับทั้งหมด",+ "tracing.capabilitySummary.unsupported": "ไม่รองรับ {{count}} รายการ",+ "tracing.captureAgent": "เก็บกระบวนการภายใน Agent",+ "tracing.captureAgentDescription": "ส่งการเรียกโมเดลและเครื่องมือภายในของ Agent",+ "tracing.captureContent": "เก็บเนื้อหา",+ "tracing.captureContentDescription": "ส่งอินพุตและเอาต์พุตของแต่ละการทำงาน",+ "tracing.captureTitle": "การเก็บข้อมูล Agent","tracing.config": "กําหนดค่า","tracing.configProvider.clientId": "รหัสลูกค้า OAuth","tracing.configProvider.clientSecret": "รหัสลับของลูกค้า OAuth",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "ป้อน {{key}} ของคุณ","tracing.configProvider.project": "โครงการ","tracing.configProvider.publicKey": "กุญแจสาธารณะ",- "tracing.configProvider.removeConfirmContent": "การกําหนดค่าปัจจุบันกําลังใช้งาน การลบออกจะเป็นการปิดคุณสมบัติการติดตาม",+ "tracing.configProvider.removeConfirmContentInUse": "การติดตามจะถูกปิด และข้อมูลรับรองที่บันทึกไว้จะถูกลบ",+ "tracing.configProvider.removeConfirmContentNotInUse": "ข้อมูลรับรองที่บันทึกไว้จะถูกลบ คุณจะต้องป้อนใหม่อีกครั้งเพื่อใช้ {{key}}","tracing.configProvider.removeConfirmTitle": "ลบการกําหนดค่า {{key}} หรือไม่?","tracing.configProvider.secretKey": "กุญแจลับ","tracing.configProvider.title": "กําหนดค่า",@@ -265,7 +283,7 @@"tracing.configProvider.username": "ชื่อผู้ใช้","tracing.configProvider.viewDocsLink": "ดูเอกสาร {{key}}","tracing.configProviderTitle.configured": "กําหนดค่าแล้ว",- "tracing.configProviderTitle.moreProvider": "ผู้ให้บริการเพิ่มเติม",+ "tracing.configProviderTitle.moreProviders": "ผู้ให้บริการเพิ่มเติม","tracing.configProviderTitle.notConfigured": "ผู้ให้บริการกําหนดค่าเพื่อเปิดใช้งานการติดตาม","tracing.databricks.description": "Databricks ให้บริการ MLflow ที่จัดการแบบเต็มรูปแบบพร้อมการกำกับดูแลและความปลอดภัยที่แข็งแกร่งสำหรับการจัดเก็บข้อมูลการติดตาม","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "โปรดกําหนดค่าผู้ให้บริการก่อน","tracing.enabled": "ให้บริการ","tracing.inUse": "ใช้งาน",+ "tracing.inherited.description": "เมื่อ Agent นี้ทำงานในเวิร์กโฟลว์นี้ จะใช้การตั้งค่าการติดตามของเวิร์กโฟลว์ ได้แก่ ผู้ให้บริการ สถานะเปิด/ปิด และนโยบายการเก็บข้อมูล การตั้งค่าการติดตามของ Agent เองจะไม่มีผลที่นี่ และไม่ต้องตั้งค่าโหนดแยก",+ "tracing.inherited.loadFailed": "ไม่สามารถโหลดสถานะการติดตามได้",+ "tracing.inherited.notConfigured": "ยังไม่ได้กำหนดค่า",+ "tracing.inherited.off": "ปิด",+ "tracing.inherited.on": "เปิด",+ "tracing.inherited.providerDisabled": "{{provider}} ปิดใช้งาน",+ "tracing.inherited.providerEnabled": "{{provider}} เปิดใช้งาน",+ "tracing.inherited.settings": "ตั้งค่าในเวิร์กโฟลว์",+ "tracing.inherited.title": "การติดตามภายนอก","tracing.langfuse.description": "การติดตาม การประเมินการจัดการพร้อมท์ และเมตริกเพื่อแก้ไขข้อบกพร่องและปรับปรุงโปรเจกต์ LLM ของคุณ","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "แพลตฟอร์มนักพัฒนาแบบครบวงจรสําหรับทุกขั้นตอนของ การพัฒนาโปรเจกต์ที่ขับเคลื่อนด้วย LLM",@@ -283,11 +310,24 @@"tracing.opik.title": "โอปิก","tracing.phoenix.description": "แพลตฟอร์มโอเพ่นซอร์สและ OpenTelemetry สำหรับการสังเกตการณ์ การประเมิน วิศวกรรมพรอมต์ และการทดลองสำหรับเวิร์กโฟลว์และตัวแทน LLM ของคุณ","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "ดูได้อย่างเดียว",+ "tracing.run.accepted": "ส่งไปยัง {{provider}} แล้ว",+ "tracing.run.failed": "ส่งไปยัง {{provider}} ไม่สำเร็จ",+ "tracing.run.pending": "กำลังส่งไปยัง {{provider}}",+ "tracing.run.title": "การติดตามภายนอก",+ "tracing.run.uncertain": "{{provider}} ยังไม่ยืนยันการรับ",+ "tracing.run.viewProject": "เปิดโปรเจกต์",+ "tracing.run.viewSpan": "ดูโหนดนี้",+ "tracing.run.viewTrace": "ดูการทำงานครั้งนี้",+ "tracing.supported": "รองรับ","tracing.tencent.description": "การติดตามประสิทธิภาพแอปพลิเคชันของ Tencent มอบการตรวจสอบแบบครบวงจรและการวิเคราะห์หลายมิติสำหรับแอป LLM",+ "tracing.tencent.endpointHelp": "คัดลอกปลายทางสำหรับภูมิภาคและเครือข่ายของคุณจาก Tencent Cloud LLM Observability → แอปพลิเคชัน → เชื่อมต่อแอปพลิเคชัน",+ "tracing.tencent.serviceNameHelp": "ไม่เกิน 63 ตัวอักษร ใช้ตัวอักษรอังกฤษพิมพ์เล็ก ตัวเลข และขีดกลาง เริ่มด้วยตัวพิมพ์เล็กและลงท้ายด้วยตัวอักษรหรือตัวเลข","tracing.tencent.title": "Tencent APM","tracing.title": "การติดตามประสิทธิภาพของโปรเจกต์","tracing.tracing": "ติดตาม","tracing.tracingDescription": "บันทึกบริบททั้งหมดของการดําเนินการของโปรเจกต์ รวมถึงการเรียก LLM, Prompt คําขอ HTTP และอื่นๆไปยังแพลตฟอร์มของของบุคคลที่สาม",+ "tracing.unsupported": "ไม่พร้อมใช้งาน","tracing.view": "มุมมอง","tracing.weave.description": "Weave เป็นแพลตฟอร์มโอเพนซอร์สสำหรับการประเมินผล ทดสอบ และตรวจสอบแอปพลิเคชัน LLM","tracing.weave.title": "ทอ",diff --git a/web/i18n/locales/tr-TR/app.json b/web/i18n/locales/tr-TR/app.jsonindex b743b8bd484..46eb53a0ccc 100644--- a/web/i18n/locales/tr-TR/app.json+++ b/web/i18n/locales/tr-TR/app.json@@ -243,10 +243,27 @@"switchTip": "izin vermeyecek","switchTipEnd": " Temel Orkestrasyona geri dönmek.","switchTipStart": "Sizin için yeni bir uygulama kopyası oluşturulacak ve yeni kopya İş Akışı Orkestrasyonuna geçecektir. Yeni kopya ",+ "tracing.agentSpansUnsupported": "{{provider}} henüz tam Agent izlerini desteklemiyor.",+ "tracing.agentTracingUnavailable": "Agent izleme kullanılamıyor; bu nedenle izler Agent iç ayrıntılarını ve çalıştırma bağlantılarını içermeyecek.","tracing.aliyun.description": "Alibaba Cloud tarafından sağlanan tamamen yönetilen ve bakım gerektirmeyen gözlemleme platformu, Dify uygulamalarının kutudan çıkar çıkmaz izlenmesi, takip edilmesi ve değerlendirilmesine olanak tanır.","tracing.aliyun.title": "Bulut İzleyici","tracing.arize.description": "Kurumsal düzeyde LLM gözlemlenebilirliği, çevrimiçi ve çevrimdışı değerlendirme, izleme ve deneyler — OpenTelemetry ile desteklenmektedir. LLM ve ajan tabanlı uygulamalar için özel olarak tasarlanmıştır.","tracing.arize.title": "Arize",+ "tracing.capabilities": "Sağlayıcı yetenekleri",+ "tracing.capabilitiesLoadFailed": "Sağlayıcı yetenekleri yüklenemedi.",+ "tracing.capability.agent_spans": "Agent spanları",+ "tracing.capability.native_cost": "Yerel maliyet",+ "tracing.capability.native_usage": "Yerel kullanım",+ "tracing.capability.session": "Oturumlar",+ "tracing.capability.span_url": "Span bağlantıları",+ "tracing.capability.trace_url": "İz bağlantıları",+ "tracing.capabilitySummary.allSupported": "Tümü destekleniyor",+ "tracing.capabilitySummary.unsupported": "{{count}} desteklenmiyor",+ "tracing.captureAgent": "Agent iç işlemlerini topla",+ "tracing.captureAgentDescription": "Agent'ın dahili model ve araç çağrılarını gönder",+ "tracing.captureContent": "İçeriği topla",+ "tracing.captureContentDescription": "Her çalıştırmanın girdi ve çıktılarını gönder",+ "tracing.captureTitle": "Agent veri toplama","tracing.config": "Yapılandırma","tracing.configProvider.clientId": "OAuth İstemci Kimliği","tracing.configProvider.clientSecret": "OAuth İstemci Sırrı",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "{{key}} bilgilerinizi girin","tracing.configProvider.project": "Proje","tracing.configProvider.publicKey": "Genel Anahtar",- "tracing.configProvider.removeConfirmContent": "Mevcut yapılandırma kullanımda, kaldırılması İzleme özelliğini kapatacaktır.",+ "tracing.configProvider.removeConfirmContentInUse": "İzleme kapatılacak ve kaydedilen kimlik bilgileri silinecek.",+ "tracing.configProvider.removeConfirmContentNotInUse": "Kaydedilen kimlik bilgileri silinecek. {{key}} kullanmak için bunları yeniden girmeniz gerekecek.","tracing.configProvider.removeConfirmTitle": "{{key}} yapılandırmasını kaldır?","tracing.configProvider.secretKey": "Gizli Anahtar","tracing.configProvider.title": "Yapılandırma",@@ -265,7 +283,7 @@"tracing.configProvider.username": "Kullanıcı Adı","tracing.configProvider.viewDocsLink": "{{key}} dökümanlarını görüntüle","tracing.configProviderTitle.configured": "Yapılandırıldı",- "tracing.configProviderTitle.moreProvider": "Daha Fazla Sağlayıcı",+ "tracing.configProviderTitle.moreProviders": "Diğer sağlayıcılar","tracing.configProviderTitle.notConfigured": "İzlemeyi etkinleştirmek için sağlayıcıyı yapılandırın","tracing.databricks.description": "Databricks, iz veri depolama için güçlü yönetişim ve güvenlik ile tamamen yönetilen MLflow sunar.","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "Lütfen önce sağlayıcıyı yapılandırın","tracing.enabled": "Etkin","tracing.inUse": "Kullanımda",+ "tracing.inherited.description": "Bu Agent bu iş akışında çalıştığında sağlayıcı, açık/kapalı durumu ve toplama politikası dahil iş akışının izleme ayarlarını kullanır. Agent'ın kendi izleme ayarları burada geçerli değildir ve düğüm için ayrı kurulum gerekmez.",+ "tracing.inherited.loadFailed": "İzleme durumu yüklenemedi.",+ "tracing.inherited.notConfigured": "Yapılandırılmadı",+ "tracing.inherited.off": "Kapalı",+ "tracing.inherited.on": "Açık",+ "tracing.inherited.providerDisabled": "{{provider}} devre dışı",+ "tracing.inherited.providerEnabled": "{{provider}} etkin",+ "tracing.inherited.settings": "İş akışında yapılandır",+ "tracing.inherited.title": "Harici izleme","tracing.langfuse.description": "LLM uygulamanızı hata ayıklamak ve geliştirmek için izlemeler, değerlendirmeler, prompt yönetimi ve metrikler.","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "LLM destekli uygulama yaşam döngüsünün her adımı için her şeyi kapsayan bir geliştirici platformu.",@@ -283,11 +310,24 @@"tracing.opik.title": "Opik","tracing.phoenix.description": "LLM iş akışlarınız ve ajanlarınız için açık kaynaklı ve OpenTelemetry tabanlı gözlemlenebilirlik, değerlendirme, istem mühendisliği ve deney platformu.","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "Salt okunur",+ "tracing.run.accepted": "{{provider}} hizmetine gönderildi",+ "tracing.run.failed": "{{provider}} hizmetine gönderilemedi",+ "tracing.run.pending": "{{provider}} hizmetine gönderiliyor",+ "tracing.run.title": "Harici izleme",+ "tracing.run.uncertain": "{{provider}} alındığını onaylamadı",+ "tracing.run.viewProject": "Projeyi aç",+ "tracing.run.viewSpan": "Bu düğümü görüntüle",+ "tracing.run.viewTrace": "Bu çalıştırmayı görüntüle",+ "tracing.supported": "Destekleniyor","tracing.tencent.description": "Tencent Uygulama Performans İzleme, LLM uygulamaları için kapsamlı izleme ve çok boyutlu analiz sağlar.",+ "tracing.tencent.endpointHelp": "Tencent Cloud LLM Observability → Uygulamalar → Uygulama bağla bölümünden bölgenize ve ağınıza uygun uç noktayı kopyalayın.",+ "tracing.tencent.serviceNameHelp": "En fazla 63 karakter: küçük harfler, rakamlar ve tireler. Küçük harfle başlayıp harf veya rakamla bitmelidir.","tracing.tencent.title": "Tencent APM","tracing.title": "Uygulama performansını izleme","tracing.tracing": "İzleme","tracing.tracingDescription": "Uygulama yürütmesinin tam bağlamını, LLM çağrıları, bağlam, promptlar, HTTP istekleri ve daha fazlası dahil olmak üzere üçüncü taraf izleme platformuna yakalama.",+ "tracing.unsupported": "Kullanılamıyor","tracing.view": "Görüntüle","tracing.weave.description": "Weave, LLM uygulamalarını değerlendirmek, test etmek ve izlemek için açık kaynaklı bir platformdur.","tracing.weave.title": "Weave",diff --git a/web/i18n/locales/uk-UA/app.json b/web/i18n/locales/uk-UA/app.jsonindex ab5d46235c5..267fa495062 100644--- a/web/i18n/locales/uk-UA/app.json+++ b/web/i18n/locales/uk-UA/app.json@@ -243,10 +243,27 @@"switchTip": "повернутися","switchTipEnd": " до базової оркестрації.","switchTipStart": "Для вас буде створена нова копія додатка, і нова копія перейде до оркестрації робочого процесу. Нова копія не дозволить ",+ "tracing.agentSpansUnsupported": "{{provider}} поки не підтримує повні трасування Agent.",+ "tracing.agentTracingUnavailable": "Трасування Agent недоступне, тож трасування не міститимуть внутрішніх деталей Agent і посилань на запуски.","tracing.aliyun.description": "Повністю керовані та без обслуговування платформи спостереження, надані Alibaba Cloud, дозволяють миттєвий моніторинг, трасування та оцінку застосувань Dify.","tracing.aliyun.title": "Моніторинг Хмари","tracing.arize.description": "Спостережуваність LLM корпоративного рівня, онлайн та офлайн оцінювання, моніторинг та експерименти—на основі OpenTelemetry. Спеціально розроблено для застосунків на базі LLM та агентів.","tracing.arize.title": "Arize",+ "tracing.capabilities": "Можливості провайдера",+ "tracing.capabilitiesLoadFailed": "Не вдалося завантажити можливості постачальника.",+ "tracing.capability.agent_spans": "Спани Agent",+ "tracing.capability.native_cost": "Нативна вартість",+ "tracing.capability.native_usage": "Нативне використання",+ "tracing.capability.session": "Сеанси",+ "tracing.capability.span_url": "Посилання на спани",+ "tracing.capability.trace_url": "Посилання на траси",+ "tracing.capabilitySummary.allSupported": "Усе підтримується",+ "tracing.capabilitySummary.unsupported": "Не підтримується: {{count}}",+ "tracing.captureAgent": "Збирати внутрішні операції Agent",+ "tracing.captureAgentDescription": "Надсилати внутрішні виклики моделей та інструментів Agent",+ "tracing.captureContent": "Збирати вміст",+ "tracing.captureContentDescription": "Надсилати вхідні та вихідні дані кожного запуску",+ "tracing.captureTitle": "Збір даних Agent","tracing.config": "Налаштувати","tracing.configProvider.clientId": "Ідентифікатор клієнта OAuth","tracing.configProvider.clientSecret": "Секретний ключ клієнта OAuth",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "Введіть ваш {{key}}","tracing.configProvider.project": "Проект","tracing.configProvider.publicKey": "Публічний ключ",- "tracing.configProvider.removeConfirmContent": "Поточне налаштування використовується, його видалення вимкне функцію Відстеження.",+ "tracing.configProvider.removeConfirmContentInUse": "Відстеження буде вимкнено, а збережені облікові дані видалено.",+ "tracing.configProvider.removeConfirmContentNotInUse": "Збережені облікові дані буде видалено. Щоб знову використовувати {{key}}, їх доведеться ввести повторно.","tracing.configProvider.removeConfirmTitle": "Видалити налаштування {{key}}?","tracing.configProvider.secretKey": "Секретний ключ","tracing.configProvider.title": "Налаштувати ",@@ -265,7 +283,7 @@"tracing.configProvider.username": "Ім'я користувача","tracing.configProvider.viewDocsLink": "Переглянути документацію {{key}}","tracing.configProviderTitle.configured": "Налаштовано",- "tracing.configProviderTitle.moreProvider": "Більше провайдерів",+ "tracing.configProviderTitle.moreProviders": "Інші постачальники","tracing.configProviderTitle.notConfigured": "Налаштуйте провайдера для увімкнення відстеження","tracing.databricks.description": "Databricks пропонує повністю керований MLflow з сильною управлінням та безпекою для зберігання даних трасування.","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "Спочатку налаштуйте провайдера","tracing.enabled": "В роботі","tracing.inUse": "Використовується",+ "tracing.inherited.description": "Під час запуску в цьому робочому процесі Agent використовує налаштування трасування робочого процесу: постачальника, стан увімк./вимк. і політику збору. Власні налаштування трасування Agent тут не застосовуються, окреме налаштування вузла не потрібне.",+ "tracing.inherited.loadFailed": "Не вдалося завантажити стан трасування.",+ "tracing.inherited.notConfigured": "Не налаштовано",+ "tracing.inherited.off": "Вимк.",+ "tracing.inherited.on": "Увімк.",+ "tracing.inherited.providerDisabled": "{{provider}}: вимкнено",+ "tracing.inherited.providerEnabled": "{{provider}}: увімкнено",+ "tracing.inherited.settings": "Налаштувати в робочому процесі",+ "tracing.inherited.title": "Зовнішнє трасування","tracing.langfuse.description": "Трасування, оцінки, управління підказками та метрики для налагодження та покращення вашого LLM-додатку.","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "Універсальна платформа розробника для кожного етапу життєвого циклу додатку на основі LLM.",@@ -283,11 +310,24 @@"tracing.opik.title": "Опік","tracing.phoenix.description": "Відкрита та заснована на OpenTelemetry платформа для спостережуваності, оцінювання, інженерії підказок та експериментів для ваших робочих процесів та агентів LLM.","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "Лише перегляд",+ "tracing.run.accepted": "Надіслано до {{provider}}",+ "tracing.run.failed": "Не вдалося надіслати до {{provider}}",+ "tracing.run.pending": "Надсилання до {{provider}}",+ "tracing.run.title": "Зовнішнє трасування",+ "tracing.run.uncertain": "{{provider}} не підтвердив отримання",+ "tracing.run.viewProject": "Відкрити проєкт",+ "tracing.run.viewSpan": "Переглянути цей вузол",+ "tracing.run.viewTrace": "Переглянути цей запуск",+ "tracing.supported": "Підтримується","tracing.tencent.description": "Сервіс моніторингу продуктивності додатків Tencent забезпечує комплексне трасування та багатовимірний аналіз додатків LLM.",+ "tracing.tencent.endpointHelp": "Скопіюйте адресу для свого регіону й мережі з Tencent Cloud LLM Observability → Застосунки → Підключити застосунок.",+ "tracing.tencent.serviceNameHelp": "До 63 символів: малі латинські літери, цифри та дефіси. Починайте з малої літери, завершуйте літерою або цифрою.","tracing.tencent.title": "Tencent APM","tracing.title": "Відстеження продуктивності додатку","tracing.tracing": "Відстеження","tracing.tracingDescription": "Захоплення повного контексту виконання додатку, включаючи виклики LLM, контекст, підказки, HTTP-запити та інше, на сторонню платформу відстеження.",+ "tracing.unsupported": "Недоступно","tracing.view": "Вид","tracing.weave.description": "Weave є платформою з відкритим кодом для оцінки, тестування та моніторингу LLM додатків.","tracing.weave.title": "Ткати",diff --git a/web/i18n/locales/vi-VN/app.json b/web/i18n/locales/vi-VN/app.jsonindex 42eb28e3818..286c5fee75b 100644--- a/web/i18n/locales/vi-VN/app.json+++ b/web/i18n/locales/vi-VN/app.json@@ -243,10 +243,27 @@"switchTip": "không thể","switchTipEnd": " chuyển lại quản lý cơ bản.","switchTipStart": "Một bản sao ứng dụng mới sẽ được tạo và chuyển sang quản lý quy trình. Bản sao mới sẽ ",+ "tracing.agentSpansUnsupported": "{{provider}} chưa hỗ trợ đầy đủ trace của Agent.",+ "tracing.agentTracingUnavailable": "Theo dõi Agent hiện không khả dụng, nên dữ liệu theo dõi sẽ không gồm chi tiết nội bộ Agent và liên kết lần chạy.","tracing.aliyun.description": "Nền tảng quan sát được quản lý hoàn toàn và không cần bảo trì do Alibaba Cloud cung cấp, cho phép giám sát, theo dõi và đánh giá các ứng dụng Dify ngay lập tức.","tracing.aliyun.title": "Giám sát Đám mây","tracing.arize.description": "Khả năng quan sát LLM cấp doanh nghiệp, đánh giá trực tuyến và ngoại tuyến, giám sát và thử nghiệm—được hỗ trợ bởi OpenTelemetry. Được thiết kế đặc biệt cho các ứng dụng dựa trên LLM và tác nhân.","tracing.arize.title": "Arize",+ "tracing.capabilities": "Khả năng của nhà cung cấp",+ "tracing.capabilitiesLoadFailed": "Không thể tải khả năng của nhà cung cấp.",+ "tracing.capability.agent_spans": "Span Agent",+ "tracing.capability.native_cost": "Chi phí gốc",+ "tracing.capability.native_usage": "Mức sử dụng gốc",+ "tracing.capability.session": "Phiên",+ "tracing.capability.span_url": "Liên kết span",+ "tracing.capability.trace_url": "Liên kết trace",+ "tracing.capabilitySummary.allSupported": "Hỗ trợ tất cả",+ "tracing.capabilitySummary.unsupported": "{{count}} không hỗ trợ",+ "tracing.captureAgent": "Thu thập hoạt động nội bộ Agent",+ "tracing.captureAgentDescription": "Gửi các lệnh gọi mô hình và công cụ nội bộ của Agent",+ "tracing.captureContent": "Thu thập nội dung",+ "tracing.captureContentDescription": "Gửi đầu vào và đầu ra của mỗi lần chạy",+ "tracing.captureTitle": "Thu thập dữ liệu Agent","tracing.config": "Cấu hình","tracing.configProvider.clientId": "ID Khách Hàng OAuth","tracing.configProvider.clientSecret": "Bí mật Khách hàng OAuth",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "Nhập {{key}} của bạn","tracing.configProvider.project": "Dự án","tracing.configProvider.publicKey": "Khóa công khai",- "tracing.configProvider.removeConfirmContent": "Cấu hình hiện tại đang được sử dụng, việc xóa nó sẽ tắt tính năng Theo dõi.",+ "tracing.configProvider.removeConfirmContentInUse": "Tính năng theo dõi sẽ bị tắt và thông tin xác thực đã lưu sẽ bị xóa.",+ "tracing.configProvider.removeConfirmContentNotInUse": "Thông tin xác thực đã lưu sẽ bị xóa. Bạn sẽ cần nhập lại để sử dụng {{key}}.","tracing.configProvider.removeConfirmTitle": "Xóa cấu hình {{key}}?","tracing.configProvider.secretKey": "Khóa bí mật","tracing.configProvider.title": "Cấu hình ",@@ -265,7 +283,7 @@"tracing.configProvider.username": "Tên người dùng","tracing.configProvider.viewDocsLink": "Xem tài liệu {{key}}","tracing.configProviderTitle.configured": "Đã cấu hình",- "tracing.configProviderTitle.moreProvider": "Thêm nhà cung cấp",+ "tracing.configProviderTitle.moreProviders": "Nhà cung cấp khác","tracing.configProviderTitle.notConfigured": "Cấu hình nhà cung cấp để bật theo dõi","tracing.databricks.description": "Databricks cung cấp MLflow được quản lý hoàn toàn với quản trị mạnh mẽ và bảo mật để lưu trữ dữ liệu theo dõi.","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "Vui lòng cấu hình nhà cung cấp trước","tracing.enabled": "Đang hoạt động","tracing.inUse": "Đang sử dụng",+ "tracing.inherited.description": "Khi Agent này chạy trong quy trình này, nó dùng cài đặt theo dõi của quy trình, gồm nhà cung cấp, trạng thái bật/tắt và chính sách thu thập. Cài đặt theo dõi riêng của Agent không áp dụng ở đây và nút không cần thiết lập riêng.",+ "tracing.inherited.loadFailed": "Không thể tải trạng thái theo dõi.",+ "tracing.inherited.notConfigured": "Chưa cấu hình",+ "tracing.inherited.off": "Tắt",+ "tracing.inherited.on": "Bật",+ "tracing.inherited.providerDisabled": "{{provider}} đã tắt",+ "tracing.inherited.providerEnabled": "{{provider}} đang bật",+ "tracing.inherited.settings": "Cấu hình trong quy trình",+ "tracing.inherited.title": "Theo dõi bên ngoài","tracing.langfuse.description": "Theo dõi, đánh giá, quản lý lời nhắc và số liệu để gỡ lỗi và cải thiện ứng dụng LLM của bạn.","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "Nền tảng phát triển tất cả trong một cho mọi bước của vòng đời ứng dụng được hỗ trợ bởi LLM.",@@ -283,11 +310,24 @@"tracing.opik.title": "Opik","tracing.phoenix.description": "Nền tảng mã nguồn mở và dựa trên OpenTelemetry cho khả năng quan sát, đánh giá, kỹ thuật prompt và thử nghiệm cho quy trình làm việc và tác nhân LLM của bạn.","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "Chỉ xem",+ "tracing.run.accepted": "Đã gửi tới {{provider}}",+ "tracing.run.failed": "Gửi tới {{provider}} thất bại",+ "tracing.run.pending": "Đang gửi tới {{provider}}",+ "tracing.run.title": "Theo dõi bên ngoài",+ "tracing.run.uncertain": "{{provider}} chưa xác nhận đã nhận",+ "tracing.run.viewProject": "Mở dự án",+ "tracing.run.viewSpan": "Xem nút này",+ "tracing.run.viewTrace": "Xem lần chạy này",+ "tracing.supported": "Hỗ trợ","tracing.tencent.description": "Giám sát hiệu suất ứng dụng của Tencent cung cấp khả năng theo dõi toàn diện và phân tích đa chiều cho các ứng dụng LLM.",+ "tracing.tencent.endpointHelp": "Sao chép điểm cuối cho khu vực và mạng của bạn từ Tencent Cloud LLM Observability → Ứng dụng → Kết nối ứng dụng.",+ "tracing.tencent.serviceNameHelp": "Tối đa 63 ký tự: chữ thường, chữ số và dấu gạch nối. Bắt đầu bằng chữ thường và kết thúc bằng chữ hoặc số.","tracing.tencent.title": "Tencent APM","tracing.title": "Theo dõi hiệu suất ứng dụng","tracing.tracing": "Theo dõi","tracing.tracingDescription": "Ghi lại toàn bộ ngữ cảnh thực thi ứng dụng, bao gồm các cuộc gọi LLM, ngữ cảnh, lời nhắc, yêu cầu HTTP và nhiều hơn nữa, đến một nền tảng theo dõi của bên thứ ba.",+ "tracing.unsupported": "Không khả dụng","tracing.view": "Cảnh","tracing.weave.description": "Weave là một nền tảng mã nguồn mở để đánh giá, thử nghiệm và giám sát các ứng dụng LLM.","tracing.weave.title": "Dệt",diff --git a/web/i18n/locales/zh-Hans/app.json b/web/i18n/locales/zh-Hans/app.jsonindex f75a6207699..150eade1ebf 100644--- a/web/i18n/locales/zh-Hans/app.json+++ b/web/i18n/locales/zh-Hans/app.json@@ -243,10 +243,27 @@"switchTip": "不能够","switchTipEnd": "迁移回基础编排","switchTipStart": "将为您创建一个使用工作流编排的新应用。新应用将",+ "tracing.agentSpansUnsupported": "{{provider}} 暂不支持完整的 Agent 调用链。",+ "tracing.agentTracingUnavailable": "Agent 追踪暂不可用,追踪数据不会包含 Agent 内部过程,也不会生成运行链接。","tracing.aliyun.description": "阿里云提供的全托管免运维可观测平台,一键开启Dify应用的监控追踪和评估","tracing.aliyun.title": "云监控","tracing.arize.description": "企业级LLM可观测性、在线和离线评估、监控和实验平台,基于OpenTelemetry构建,专为LLM和代理驱动的应用程序设计。","tracing.arize.title": "Arize",+ "tracing.capabilities": "供应商能力",+ "tracing.capabilitiesLoadFailed": "无法加载供应商能力。",+ "tracing.capability.agent_spans": "Agent span",+ "tracing.capability.native_cost": "原生费用",+ "tracing.capability.native_usage": "原生用量",+ "tracing.capability.session": "会话",+ "tracing.capability.span_url": "Span 链接",+ "tracing.capability.trace_url": "Trace 链接",+ "tracing.capabilitySummary.allSupported": "全部支持",+ "tracing.capabilitySummary.unsupported": "{{count}} 项不支持",+ "tracing.captureAgent": "采集 Agent 内部过程",+ "tracing.captureAgentDescription": "发送 Agent 内部的模型与工具调用",+ "tracing.captureContent": "采集内容",+ "tracing.captureContentDescription": "发送每次运行的输入和输出",+ "tracing.captureTitle": "Agent 数据采集","tracing.config": "配置","tracing.configProvider.clientId": "OAuth 客户端 ID","tracing.configProvider.clientSecret": "OAuth 客户端密钥",@@ -257,15 +274,16 @@"tracing.configProvider.placeholder": "输入你的{{key}}","tracing.configProvider.project": "项目","tracing.configProvider.publicKey": "公钥",- "tracing.configProvider.removeConfirmContent": "当前配置正在使用中,删除它将关闭追踪功能。",- "tracing.configProvider.removeConfirmTitle": "删除 {{key}} 配置?",+ "tracing.configProvider.removeConfirmContentInUse": "追踪将关闭,已保存的凭据也会被删除。",+ "tracing.configProvider.removeConfirmContentNotInUse": "已保存的凭据将被删除,再次使用 {{key}} 需要重新填写。",+ "tracing.configProvider.removeConfirmTitle": "移除 {{key}} 配置?","tracing.configProvider.secretKey": "密钥","tracing.configProvider.title": "配置 ","tracing.configProvider.trackingUri": "跟踪 URI","tracing.configProvider.username": "用户名","tracing.configProvider.viewDocsLink": "查看 {{key}} 的文档","tracing.configProviderTitle.configured": "已配置",- "tracing.configProviderTitle.moreProvider": "更多提供商",+ "tracing.configProviderTitle.moreProviders": "更多提供商","tracing.configProviderTitle.notConfigured": "配置提供商以启用追踪","tracing.databricks.description": "Databricks提供完全托管的MLflow,具有强大的治理和安全功能,用于存储跟踪数据。","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "请先配置提供商","tracing.enabled": "已启用","tracing.inUse": "使用中",+ "tracing.inherited.description": "此 Agent 在当前 Workflow 中运行时,使用 Workflow 的追踪配置,包括供应商、启停和采集策略。Agent 自身的追踪配置在这里不生效,也无需为节点单独配置。",+ "tracing.inherited.loadFailed": "无法加载追踪状态。",+ "tracing.inherited.notConfigured": "未配置",+ "tracing.inherited.off": "关闭",+ "tracing.inherited.on": "开启",+ "tracing.inherited.providerDisabled": "{{provider}} 已关闭",+ "tracing.inherited.providerEnabled": "{{provider}} 已启用",+ "tracing.inherited.settings": "在 Workflow 中设置",+ "tracing.inherited.title": "外部追踪","tracing.langfuse.description": "跟踪、评估、提示管理和指标,以调试和改进您的 LLM 应用程序。","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "一个全方位的开发者平台,适用于 LLM 驱动应用程序生命周期的每个步骤。",@@ -283,14 +310,27 @@"tracing.opik.title": "Opik","tracing.phoenix.description": "开源且基于OpenTelemetry的可观测性、评估、提示工程和实验平台,适用于您的LLM工作流程和代理。","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "仅查看",+ "tracing.run.accepted": "已发送至 {{provider}}",+ "tracing.run.failed": "发送至 {{provider}} 失败",+ "tracing.run.pending": "正在发送至 {{provider}}",+ "tracing.run.title": "外部追踪",+ "tracing.run.uncertain": "{{provider}} 未确认接收",+ "tracing.run.viewProject": "打开项目",+ "tracing.run.viewSpan": "查看此节点",+ "tracing.run.viewTrace": "查看此次运行",+ "tracing.supported": "支持","tracing.tencent.description": "腾讯云应用性能监控,提供 LLM 应用全链路追踪和多维分析",+ "tracing.tencent.endpointHelp": "从腾讯云 LLM 可观测 → 应用列表 → 接入应用,按实际地域和内外网复制接入点。",+ "tracing.tencent.serviceNameHelp": "最多 63 个字符,仅小写字母、数字和连字符;以小写字母开头,以字母或数字结尾。","tracing.tencent.title": "腾讯云 APM","tracing.title": "追踪应用性能","tracing.tracing": "追踪","tracing.tracingDescription": "捕获应用程序执行的完整上下文,包括 LLM 调用、上下文、提示、HTTP 请求等,发送到第三方跟踪平台。",+ "tracing.unsupported": "不支持","tracing.view": "查看","tracing.weave.description": "Weave 是一个开源平台,用于评估、测试和监控大型语言模型应用程序。",- "tracing.weave.title": "编织",+ "tracing.weave.title": "Weave","typeSelector.advanced": "Chatflow","typeSelector.agent": "Agent","typeSelector.all": "所有类型",diff --git a/web/i18n/locales/zh-Hant/app.json b/web/i18n/locales/zh-Hant/app.jsonindex f1cc73517f7..e3fd2912bec 100644--- a/web/i18n/locales/zh-Hant/app.json+++ b/web/i18n/locales/zh-Hant/app.json@@ -243,10 +243,27 @@"switchTip": "不能夠","switchTipEnd": "遷移回基礎編排","switchTipStart": "將為您建立一個使用工作流編排的新應用。新應用將",+ "tracing.agentSpansUnsupported": "{{provider}} 暫不支援完整的 Agent 呼叫鏈。",+ "tracing.agentTracingUnavailable": "Agent 追蹤暫不可用,追蹤資料不會包含 Agent 內部過程,也不會產生執行連結。","tracing.aliyun.description": "阿里雲提供的完全管理且無需維護的可觀察性平台,支持即時監控、追蹤和評估 Dify 應用程序。","tracing.aliyun.title": "雲端監控","tracing.arize.description": "企業級LLM可觀測性、線上與離線評估、監控和實驗平台,基於OpenTelemetry構建,專為LLM和代理驅動的應用程式設計。","tracing.arize.title": "Arize",+ "tracing.capabilities": "供應商能力",+ "tracing.capabilitiesLoadFailed": "無法載入供應商能力。",+ "tracing.capability.agent_spans": "Agent span",+ "tracing.capability.native_cost": "原生費用",+ "tracing.capability.native_usage": "原生用量",+ "tracing.capability.session": "工作階段",+ "tracing.capability.span_url": "Span 連結",+ "tracing.capability.trace_url": "Trace 連結",+ "tracing.capabilitySummary.allSupported": "全部支援",+ "tracing.capabilitySummary.unsupported": "{{count}} 項不支援",+ "tracing.captureAgent": "擷取 Agent 內部過程",+ "tracing.captureAgentDescription": "傳送 Agent 內部的模型與工具呼叫",+ "tracing.captureContent": "擷取內容",+ "tracing.captureContentDescription": "傳送每次執行的輸入和輸出",+ "tracing.captureTitle": "Agent 資料採集","tracing.config": "配置","tracing.configProvider.clientId": "OAuth 用戶端 ID","tracing.configProvider.clientSecret": "OAuth 用戶端密鑰",@@ -257,7 +274,8 @@"tracing.configProvider.placeholder": "輸入您的{{key}}","tracing.configProvider.project": "專案","tracing.configProvider.publicKey": "公鑰",- "tracing.configProvider.removeConfirmContent": "當前配置正在使用中,移除它將關閉追蹤功能。",+ "tracing.configProvider.removeConfirmContentInUse": "追蹤將關閉,已儲存的憑證也會被刪除。",+ "tracing.configProvider.removeConfirmContentNotInUse": "已儲存的憑證將被刪除,再次使用 {{key}} 需要重新填寫。","tracing.configProvider.removeConfirmTitle": "移除{{key}}配置?","tracing.configProvider.secretKey": "密鑰","tracing.configProvider.title": "配置 ",@@ -265,7 +283,7 @@"tracing.configProvider.username": "使用者名稱","tracing.configProvider.viewDocsLink": "查看{{key}}文件","tracing.configProviderTitle.configured": "已配置",- "tracing.configProviderTitle.moreProvider": "更多提供商",+ "tracing.configProviderTitle.moreProviders": "更多供應商","tracing.configProviderTitle.notConfigured": "配置提供商以啟用追蹤","tracing.databricks.description": "Databricks提供完全託管的MLflow,具有強大的治理和安全功能,用於存儲追蹤數據。","tracing.databricks.title": "Databricks",@@ -273,6 +291,15 @@"tracing.disabledTip": "請先配置提供商","tracing.enabled": "服務中","tracing.inUse": "使用中",+ "tracing.inherited.description": "此 Agent 在目前 Workflow 中執行時,使用 Workflow 的追蹤設定,包括供應商、啟停與採集策略。Agent 本身的追蹤設定在此不生效,也無需為節點另外設定。",+ "tracing.inherited.loadFailed": "無法載入追蹤狀態。",+ "tracing.inherited.notConfigured": "未設定",+ "tracing.inherited.off": "關閉",+ "tracing.inherited.on": "開啟",+ "tracing.inherited.providerDisabled": "{{provider}} 已關閉",+ "tracing.inherited.providerEnabled": "{{provider}} 已啟用",+ "tracing.inherited.settings": "在 Workflow 中設定",+ "tracing.inherited.title": "外部追蹤","tracing.langfuse.description": "追蹤、評估、提示管理和指標,用於調試和改進您的 LLM 應用程式。","tracing.langfuse.title": "Langfuse","tracing.langsmith.description": "一個全方位的開發者平台,用於 LLM 驅動的應用程式生命週期的每個步驟。",@@ -283,11 +310,24 @@"tracing.opik.title": "奧皮克","tracing.phoenix.description": "開源且基於OpenTelemetry的可觀測性、評估、提示工程和實驗平台,適用於您的LLM工作流程和代理。","tracing.phoenix.title": "Phoenix",+ "tracing.readOnly": "僅供檢視",+ "tracing.run.accepted": "已傳送至 {{provider}}",+ "tracing.run.failed": "傳送至 {{provider}} 失敗",+ "tracing.run.pending": "正在傳送至 {{provider}}",+ "tracing.run.title": "外部追蹤",+ "tracing.run.uncertain": "{{provider}} 未確認接收",+ "tracing.run.viewProject": "開啟專案",+ "tracing.run.viewSpan": "檢視此節點",+ "tracing.run.viewTrace": "檢視此次執行",+ "tracing.supported": "支援","tracing.tencent.description": "騰訊應用性能監控為大型語言模型應用提供全面的追蹤和多維分析。",+ "tracing.tencent.endpointHelp": "從騰訊雲 LLM 可觀測 → 應用程式列表 → 接入應用程式,依實際地域及內外網複製接入點。",+ "tracing.tencent.serviceNameHelp": "最多 63 個字元,僅限小寫字母、數字和連字號;以小寫字母開頭,以字母或數字結尾。","tracing.tencent.title": "騰訊 APM","tracing.title": "追蹤應用程式效能","tracing.tracing": "追蹤","tracing.tracingDescription": "捕獲應用程式執行的完整上下文,包括 LLM 調用、上下文、提示、HTTP 請求等,到第三方追蹤平台。",+ "tracing.unsupported": "不支援","tracing.view": "查看","tracing.weave.description": "Weave 是一個開源平台,用於評估、測試和監控大型語言模型應用程序。","tracing.weave.title": "編織",diff --git a/web/i18n/resources.generated.d.ts b/web/i18n/resources.generated.d.tsindex 299f8af23cf..da1f981b528 100644--- a/web/i18n/resources.generated.d.ts+++ b/web/i18n/resources.generated.d.ts@@ -769,10 +769,27 @@ export default interface Resources {switchTip: 'not allow'switchTipEnd: ' switching back to Basic Orchestrate.'switchTipStart: 'A new app copy will be created for you, and the new copy will switch to Workflow Orchestrate. The new copy will '+ 'tracing.agentSpansUnsupported': '{{provider}} does not support full Agent traces yet.'+ 'tracing.agentTracingUnavailable': "Agent tracing isn't available, so traces won't include Agent internals or run links."'tracing.aliyun.description': 'The fully-managed and maintenance-free observability platform provided by Alibaba Cloud, enables out-of-the-box monitoring, tracing, and evaluation of Dify applications.''tracing.aliyun.title': 'Cloud Monitor''tracing.arize.description': 'Enterprise-grade LLM observability, online & offline evaluation, monitoring, and experimentation—powered by OpenTelemetry. Purpose-built for LLM & agent-driven applications.''tracing.arize.title': 'Arize'+ 'tracing.capabilities': 'Provider capabilities'+ 'tracing.capabilitiesLoadFailed': 'Unable to load provider capabilities.'+ 'tracing.capability.agent_spans': 'Agent spans'+ 'tracing.capability.native_cost': 'Native cost'+ 'tracing.capability.native_usage': 'Native usage'+ 'tracing.capability.session': 'Sessions'+ 'tracing.capability.span_url': 'Span links'+ 'tracing.capability.trace_url': 'Trace links'+ 'tracing.capabilitySummary.allSupported': 'All supported'+ 'tracing.capabilitySummary.unsupported': '{{count}} unsupported'+ 'tracing.captureAgent': 'Capture Agent internals'+ 'tracing.captureAgentDescription': "Send the Agent's internal model and tool calls"+ 'tracing.captureContent': 'Capture content'+ 'tracing.captureContentDescription': "Send each run's inputs and outputs"+ 'tracing.captureTitle': 'Agent data capture''tracing.config': 'Config''tracing.configProvider.clientId': 'OAuth Client ID''tracing.configProvider.clientSecret': 'OAuth Client Secret'@@ -783,7 +800,8 @@ export default interface Resources {'tracing.configProvider.placeholder': 'Enter your {{key}}''tracing.configProvider.project': 'Project''tracing.configProvider.publicKey': 'Public Key'- 'tracing.configProvider.removeConfirmContent': 'The current configuration is in use, removing it will turn off the Tracing feature.'+ 'tracing.configProvider.removeConfirmContentInUse': 'Tracing will turn off, and the saved credentials will be deleted.'+ 'tracing.configProvider.removeConfirmContentNotInUse': "The saved credentials will be deleted. You'll need to enter them again to use {{key}}."'tracing.configProvider.removeConfirmTitle': 'Remove {{key}} configuration?''tracing.configProvider.secretKey': 'Secret Key''tracing.configProvider.title': 'Config '@@ -791,7 +809,7 @@ export default interface Resources {'tracing.configProvider.username': 'Username''tracing.configProvider.viewDocsLink': 'View {{key}} docs''tracing.configProviderTitle.configured': 'Configured'- 'tracing.configProviderTitle.moreProvider': 'More Provider'+ 'tracing.configProviderTitle.moreProviders': 'More providers''tracing.configProviderTitle.notConfigured': 'Config provider to enable tracing''tracing.databricks.description': 'Databricks offers fully-managed MLflow with strong governance and security for storing trace data.''tracing.databricks.title': 'Databricks'@@ -799,6 +817,15 @@ export default interface Resources {'tracing.disabledTip': 'Please config provider first''tracing.enabled': 'In Service''tracing.inUse': 'In use'+ 'tracing.inherited.description': "When this Agent runs in this workflow, it uses the workflow's tracing settings, including provider, on/off state, and capture policy. The Agent's own tracing settings don't apply here, and the node needs no separate setup."+ 'tracing.inherited.loadFailed': 'Unable to load tracing status.'+ 'tracing.inherited.notConfigured': 'Not configured'+ 'tracing.inherited.off': 'Off'+ 'tracing.inherited.on': 'On'+ 'tracing.inherited.providerDisabled': '{{provider}} disabled'+ 'tracing.inherited.providerEnabled': '{{provider}} enabled'+ 'tracing.inherited.settings': 'Configure in workflow'+ 'tracing.inherited.title': 'External tracing''tracing.langfuse.description': 'Open-source LLM observability, evaluation, prompt management and metrics to debug and improve your LLM application.''tracing.langfuse.title': 'Langfuse''tracing.langsmith.description': 'An all-in-one developer platform for every step of the LLM-powered application lifecycle.'@@ -809,11 +836,24 @@ export default interface Resources {'tracing.opik.title': 'Opik''tracing.phoenix.description': 'Open-source & OpenTelemetry-based observability, evaluation, prompt engineering and experimentation platform for your LLM workflows and agents.''tracing.phoenix.title': 'Phoenix'+ 'tracing.readOnly': 'View only'+ 'tracing.run.accepted': 'Sent to {{provider}}'+ 'tracing.run.failed': 'Failed to send to {{provider}}'+ 'tracing.run.pending': 'Sending to {{provider}}'+ 'tracing.run.title': 'External tracing'+ 'tracing.run.uncertain': '{{provider}} has not confirmed receipt'+ 'tracing.run.viewProject': 'Open project'+ 'tracing.run.viewSpan': 'View this node'+ 'tracing.run.viewTrace': 'View this run'+ 'tracing.supported': 'Supported''tracing.tencent.description': 'Tencent Application Performance Monitoring provides comprehensive tracing and multi-dimensional analysis for LLM applications.'+ 'tracing.tencent.endpointHelp': 'Copy the endpoint for your region and network from Tencent Cloud LLM Observability → Applications → Connect application.'+ 'tracing.tencent.serviceNameHelp': 'Up to 63 characters: lowercase letters, digits, and hyphens. Start with a lowercase letter and end with a letter or digit.''tracing.tencent.title': 'Tencent APM''tracing.title': 'Tracing app performance''tracing.tracing': 'Tracing''tracing.tracingDescription': 'Capture the full context of app execution, including LLM calls, context, prompts, HTTP requests, and more, to a third-party tracing platform.'+ 'tracing.unsupported': 'Unavailable''tracing.view': 'View''tracing.weave.description': 'Weave is an open-source platform for evaluating, testing, and monitoring LLM applications.''tracing.weave.title': 'Weave'diff --git a/web/service/base.spec.ts b/web/service/base.spec.tsindex c5db6ec69a7..0938c8640c0 100644--- a/web/service/base.spec.ts+++ b/web/service/base.spec.ts@@ -283,7 +283,11 @@ describe('ssePost and sseGet', () => {await ssePost('/chat-messages', { body: { query: 'hello' } }, { onError, onNotifyError })await waitFor(() => {- expect(onError).toHaveBeenCalledWith('Base model not found', 'model_not_found')+ expect(onError).toHaveBeenCalledWith(+ 'Base model not found',+ 'model_not_found',+ expect.objectContaining({ errorCode: 'model_not_found' }),+ )})expect(onNotifyError).toHaveBeenCalledWith('Base model not found', 'model_not_found')expect(toast.error).not.toHaveBeenCalled()@@ -350,7 +354,11 @@ describe('ssePost and sseGet', () => {)await waitFor(() => {- expect(onError).toHaveBeenCalledWith('Error: stream lost', 'stream_read_error')+ expect(onError).toHaveBeenCalledWith(+ 'Error: stream lost',+ 'stream_read_error',+ expect.objectContaining({ errorCode: 'stream_read_error' }),+ )})expect(onCompleted).toHaveBeenCalledWith(true, 'Error: stream lost')expect(toast.error).toHaveBeenCalledWith('Error: stream lost')@@ -378,7 +386,11 @@ describe('ssePost and sseGet', () => {)await waitFor(() => {- expect(onError).toHaveBeenCalledWith('Error: stream lost', 'stream_read_error')+ expect(onError).toHaveBeenCalledWith(+ 'Error: stream lost',+ 'stream_read_error',+ expect.objectContaining({ errorCode: 'stream_read_error' }),+ )})expect(onCompleted).toHaveBeenCalledWith(true, 'Error: stream lost')expect(toast.error).not.toHaveBeenCalled()@@ -410,6 +422,7 @@ describe('ssePost and sseGet', () => {expect(onError).toHaveBeenCalledWith('AbortError: BodyStreamBuffer was aborted','stream_read_error',+ expect.objectContaining({ errorCode: 'stream_read_error' }),)})expect(onCompleted).toHaveBeenCalledWith(true, 'AbortError: BodyStreamBuffer was aborted')diff --git a/web/service/base.ts b/web/service/base.tsindex b3ec52f554d..545fef82dda 100644--- a/web/service/base.ts+++ b/web/service/base.ts@@ -127,7 +127,7 @@ type IOnFile = (file: VisionFile) => voidtype IOnMessageEnd = (messageEnd: MessageEnd) => voidexport type IOnMessageReplace = (messageReplace: MessageReplace) => voidexport type IOnCompleted = (hasError?: boolean, errorMessage?: string) => void-export type IOnError = (msg: string, code?: string) => void+export type IOnError = (msg: string, code?: string, identity?: IOnDataMoreInfo) => voidconst reportStreamResponseError = async (response: Response,@@ -499,8 +499,8 @@ export const handleStream = (const hasErrorStatus = typeof bufferObj.status === 'number' && bufferObj.status >= 400if (bufferObj.event === 'error' || hasErrorStatus || !bufferObj.event) {onData('', false, {- conversationId: undefined,- messageId: '',+ conversationId: bufferObj.conversation_id,+ messageId: bufferObj.message_id ?? '',errorMessage: bufferObj?.message,errorCode: bufferObj?.code,})@@ -826,7 +826,7 @@ export const ssePost = async (res,(str: string, isFirstMessage: boolean, moreInfo: IOnDataMoreInfo) => {if (moreInfo.errorMessage) {- onError?.(moreInfo.errorMessage, moreInfo.errorCode)+ onError?.(moreInfo.errorMessage, moreInfo.errorCode, moreInfo)// These errors can happen when a stream is intentionally stopped or its page is left.if (!silent && shouldNotifyStreamError(moreInfo.errorMessage)) {if (onNotifyError) onNotifyError(moreInfo.errorMessage, moreInfo.errorCode)@@ -995,7 +995,7 @@ export const sseGet = async (res,(str: string, isFirstMessage: boolean, moreInfo: IOnDataMoreInfo) => {if (moreInfo.errorMessage) {- onError?.(moreInfo.errorMessage, moreInfo.errorCode)+ onError?.(moreInfo.errorMessage, moreInfo.errorCode, moreInfo)// These errors can happen when a stream is intentionally stopped or its page is left.if (!silent && shouldNotifyStreamError(moreInfo.errorMessage)) {if (onNotifyError) onNotifyError(moreInfo.errorMessage, moreInfo.errorCode)diff --git a/web/service/console/query-policies.ts b/web/service/console/query-policies.tsindex 15c42d225f6..3119def38c2 100644--- a/web/service/console/query-policies.ts+++ b/web/service/console/query-policies.ts@@ -934,6 +934,13 @@ export function createConsoleQuery(consoleClient: ConsoleClient) {},},byAppId: {+ traceRuns: {+ bySourceKind: {+ bySourceId: {+ get: { queryOptions: { context: { silent: true }, retry: false } },+ },+ },+ },workflowRuns: {tasks: {byTaskId: {@@ -964,13 +971,41 @@ export function createConsoleQuery(consoleClient: ConsoleClient) {trace: {post: {mutationOptions: {- onSettled: (_data, error, variables, _result, context) => {- if (error) return- return context.client.invalidateQueries({- queryKey: consoleQuery.apps.byAppId.trace.get.queryKey({+ onSuccess: (_data, variables, _result, context) => {+ context.client.setQueryData(+ consoleQuery.apps.byAppId.trace.get.queryKey({input: { params: variables.params },}),- })+ {+ ...variables.body,+ capture_content: variables.body.capture_content ?? false,+ capture_agent: variables.body.capture_agent ?? true,+ },+ )+ },+ onSettled: (_data, error, variables, _result, context) => {+ if (error && getHttpErrorStatus(error) !== 409) return+ return Promise.all([+ ...(error+ ? [+ context.client.invalidateQueries({+ queryKey: consoleQuery.apps.byAppId.traceConfig.get.key({+ input: { params: variables.params },+ }),+ }),+ ]+ : []),+ context.client.invalidateQueries({+ queryKey: consoleQuery.apps.byAppId.trace.get.queryKey({+ input: { params: variables.params },+ }),+ }),+ context.client.invalidateQueries({+ queryKey: consoleQuery.apps.byAppId.traceCapabilities.get.key({+ input: { params: variables.params },+ }),+ }),+ ])},},},@@ -979,45 +1014,81 @@ export function createConsoleQuery(consoleClient: ConsoleClient) {post: {mutationOptions: {onSettled: (_data, error, variables, _result, context) => {- if (error) return- return context.client.invalidateQueries({- queryKey: consoleQuery.apps.byAppId.traceConfig.get.queryKey({- input: {- params: variables.params,- query: { tracing_provider: variables.body.tracing_provider },- },+ if (error && getHttpErrorStatus(error) !== 409) return+ return Promise.all([+ context.client.invalidateQueries({+ queryKey: consoleQuery.apps.byAppId.trace.get.queryKey({+ input: { params: variables.params },+ }),}),- })+ context.client.invalidateQueries({+ queryKey: consoleQuery.apps.byAppId.traceConfig.get.queryKey({+ input: {+ params: variables.params,+ query: { tracing_provider: variables.body.tracing_provider },+ },+ }),+ }),+ context.client.invalidateQueries({+ queryKey: consoleQuery.apps.byAppId.traceCapabilities.get.key({+ input: { params: variables.params },+ }),+ }),+ ])},},},patch: {mutationOptions: {onSettled: (_data, error, variables, _result, context) => {- if (error) return- return context.client.invalidateQueries({- queryKey: consoleQuery.apps.byAppId.traceConfig.get.queryKey({- input: {- params: variables.params,- query: { tracing_provider: variables.body.tracing_provider },- },+ if (error && getHttpErrorStatus(error) !== 409) return+ return Promise.all([+ context.client.invalidateQueries({+ queryKey: consoleQuery.apps.byAppId.trace.get.queryKey({+ input: { params: variables.params },+ }),}),- })+ context.client.invalidateQueries({+ queryKey: consoleQuery.apps.byAppId.traceConfig.get.queryKey({+ input: {+ params: variables.params,+ query: { tracing_provider: variables.body.tracing_provider },+ },+ }),+ }),+ context.client.invalidateQueries({+ queryKey: consoleQuery.apps.byAppId.traceCapabilities.get.key({+ input: { params: variables.params },+ }),+ }),+ ])},},},delete: {mutationOptions: {onSettled: (_data, error, variables, _result, context) => {- if (error) return- return context.client.invalidateQueries({- queryKey: consoleQuery.apps.byAppId.traceConfig.get.queryKey({- input: {- params: variables.params,- query: { tracing_provider: variables.query.tracing_provider },- },+ if (error && getHttpErrorStatus(error) !== 409) return+ return Promise.all([+ context.client.invalidateQueries({+ queryKey: consoleQuery.apps.byAppId.trace.get.queryKey({+ input: { params: variables.params },+ }),}),- })+ context.client.invalidateQueries({+ queryKey: consoleQuery.apps.byAppId.traceConfig.get.queryKey({+ input: {+ params: variables.params,+ query: { tracing_provider: variables.query.tracing_provider },+ },+ }),+ }),+ context.client.invalidateQueries({+ queryKey: consoleQuery.apps.byAppId.traceCapabilities.get.key({+ input: { params: variables.params },+ }),+ }),+ ])},},},@@ -1746,6 +1817,127 @@ export function createConsoleQuery(consoleClient: ConsoleClient) {},},byAgentId: {+ trace: {+ post: {+ mutationOptions: {+ onSuccess: (data, variables, _result, context) => {+ context.client.setQueryData(+ consoleQuery.agent.byAgentId.trace.get.queryKey({+ input: { params: variables.params },+ }),+ data,+ )+ },+ onSettled: (_data, error, variables, _result, context) => {+ if (error && getHttpErrorStatus(error) !== 409) return+ return Promise.all([+ ...(error+ ? [+ context.client.invalidateQueries({+ queryKey: consoleQuery.agent.byAgentId.traceConfig.get.key({+ input: { params: variables.params },+ }),+ }),+ ]+ : []),+ context.client.invalidateQueries({+ queryKey: consoleQuery.agent.byAgentId.trace.get.queryKey({+ input: { params: variables.params },+ }),+ }),+ context.client.invalidateQueries({+ queryKey: consoleQuery.agent.byAgentId.traceCapabilities.get.key({+ input: { params: variables.params },+ }),+ }),+ ])+ },+ },+ },+ },+ traceConfig: {+ post: {+ mutationOptions: {+ onSettled: (_data, error, variables, _result, context) => {+ if (error && getHttpErrorStatus(error) !== 409) return+ return Promise.all([+ context.client.invalidateQueries({+ queryKey: consoleQuery.agent.byAgentId.trace.get.queryKey({+ input: { params: variables.params },+ }),+ }),+ context.client.invalidateQueries({+ queryKey: consoleQuery.agent.byAgentId.traceConfig.get.queryKey({+ input: {+ params: variables.params,+ query: { tracing_provider: variables.body.tracing_provider },+ },+ }),+ }),+ context.client.invalidateQueries({+ queryKey: consoleQuery.agent.byAgentId.traceCapabilities.get.key({+ input: { params: variables.params },+ }),+ }),+ ])+ },+ },+ },+ patch: {+ mutationOptions: {+ onSettled: (_data, error, variables, _result, context) => {+ if (error && getHttpErrorStatus(error) !== 409) return+ return Promise.all([+ context.client.invalidateQueries({+ queryKey: consoleQuery.agent.byAgentId.trace.get.queryKey({+ input: { params: variables.params },+ }),+ }),+ context.client.invalidateQueries({+ queryKey: consoleQuery.agent.byAgentId.traceConfig.get.queryKey({+ input: {+ params: variables.params,+ query: { tracing_provider: variables.body.tracing_provider },+ },+ }),+ }),+ context.client.invalidateQueries({+ queryKey: consoleQuery.agent.byAgentId.traceCapabilities.get.key({+ input: { params: variables.params },+ }),+ }),+ ])+ },+ },+ },+ delete: {+ mutationOptions: {+ onSettled: (_data, error, variables, _result, context) => {+ if (error && getHttpErrorStatus(error) !== 409) return+ return Promise.all([+ context.client.invalidateQueries({+ queryKey: consoleQuery.agent.byAgentId.trace.get.queryKey({+ input: { params: variables.params },+ }),+ }),+ context.client.invalidateQueries({+ queryKey: consoleQuery.agent.byAgentId.traceConfig.get.queryKey({+ input: {+ params: variables.params,+ query: { tracing_provider: variables.query.tracing_provider },+ },+ }),+ }),+ context.client.invalidateQueries({+ queryKey: consoleQuery.agent.byAgentId.traceCapabilities.get.key({+ input: { params: variables.params },+ }),+ }),+ ])+ },+ },+ },+ },apiKeys: {post: {mutationOptions: {