Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions apps/docs/components/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6823,6 +6823,29 @@ export function SixtyfourIcon(props: SVGProps<SVGSVGElement>) {
)
}

export function SimTriggerIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg
{...props}
viewBox='0 0 222 222'
fill='none'
xmlns='http://www.w3.org/2000/svg'
aria-hidden='true'
>
<path
fillRule='evenodd'
clipRule='evenodd'
d='M107.822 93.76C107.822 97.35 106.403 100.792 103.884 103.328L103.523 103.692C101.006 106.236 97.59 107.658 94.02 107.658H13.45C6.02 107.658 0 113.718 0 121.191V208.332C0 215.806 6.02 221.866 13.45 221.866H99.96C107.383 221.866 113.4 215.806 113.4 208.332V126.745C113.4 123.419 114.71 120.228 117.047 117.874C119.377 115.527 122.546 114.207 125.849 114.207H207.777C215.198 114.207 221.214 108.148 221.214 100.674V13.53C221.214 6.06 215.198 0 207.777 0H121.26C113.839 0 107.822 6.06 107.822 13.53V93.76ZM134.078 18.55H194.952C199.289 18.55 202.796 22.09 202.796 26.45V87.76C202.796 92.12 199.289 95.66 194.952 95.66H134.078C129.748 95.66 126.233 92.12 126.233 87.76V26.45C126.233 22.09 129.748 18.55 134.078 18.55Z'
fill='currentColor'
/>
<path
d='M207.878 129.57H143.554C135.756 129.57 129.434 135.937 129.434 143.791V207.784C129.434 215.638 135.756 222.005 143.554 222.005H207.878C215.677 222.005 221.999 215.638 221.999 207.784V143.791C221.999 135.937 215.677 129.57 207.878 129.57Z'
fill='currentColor'
/>
</svg>
)
}

export function SimilarwebIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg
Expand Down
2 changes: 2 additions & 0 deletions apps/docs/components/ui/icon-mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ import {
ServiceNowIcon,
ShopifyIcon,
SimilarwebIcon,
SimTriggerIcon,
SixtyfourIcon,
SlackIcon,
SQSIcon,
Expand Down Expand Up @@ -405,6 +406,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
sharepoint: MicrosoftSharepointIcon,
sharepoint_v2: MicrosoftSharepointIcon,
shopify: ShopifyIcon,
sim_workspace_event: SimTriggerIcon,
similarweb: SimilarwebIcon,
sixtyfour: SixtyfourIcon,
slack: SlackIcon,
Expand Down
57 changes: 57 additions & 0 deletions apps/docs/content/docs/en/blocks/logs.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Logs
---

import { Callout } from 'fumadocs-ui/components/callout'
import { Tab, Tabs } from 'fumadocs-ui/components/tabs'
import { FAQ } from '@/components/ui/faq'

The Logs block queries workflow run logs in the current workspace and fetches full details for individual runs — the same data you see on the Logs page, available to your workflows.

## Operations

<Tabs items={['Query Logs', 'Get Run Details']}>
<Tab>
<p>Find runs matching a set of filters. Returns only the matching <strong>run IDs</strong>, ordered newest-first by default.</p>
<ul className="list-disc space-y-1 pl-6">
<li><strong>Workflows</strong>: select specific workflows, or leave empty for all (comma-separated IDs in advanced mode)</li>
<li><strong>Status</strong>: info, error, running, pending, cancelled (empty for all)</li>
<li><strong>Time Range</strong>: presets from the past 30 minutes to the past 30 days, or explicit ISO start/end dates in advanced mode</li>
<li><strong>Cost</strong>: compare run cost against a credit threshold (e.g. ≥ 10 credits)</li>
<li><strong>Duration</strong>: compare run duration against a millisecond threshold</li>
<li><strong>Limit</strong>: maximum run IDs to return (default 100, max 200)</li>
</ul>
</Tab>
<Tab>
<p>Fetch everything about a single run by its run ID:</p>
<ul className="list-disc space-y-1 pl-6">
<li><strong>runId</strong>, <strong>workflowId</strong>, <strong>workflowName</strong></li>
<li><strong>status</strong>, <strong>trigger</strong>, <strong>startedAt</strong>, <strong>durationMs</strong></li>
<li><strong>cost</strong>: run cost in credits</li>
<li><strong>traceSpans</strong>: the full trace — per-block inputs, outputs, timings, and tool calls</li>
<li><strong>finalOutput</strong>: the run's final output</li>
</ul>
</Tab>
</Tabs>

## Typical Pattern

Query for the runs you care about, then loop over the returned IDs and fetch details for each:

1. **Query Logs** with `Status: error` and `Time Range: Past 24 hours` → `<logs1.runIds>`
2. Loop over the IDs and call **Get Run Details** → inspect `<logs2.traceSpans>` to find the failing block
3. Act on it — post a summary to Slack, file a ticket, or feed the trace to an Agent block for diagnosis

This pairs naturally with the [Sim trigger](/triggers/sim): the trigger hands you the `runId` that fired the event, and Get Run Details gives you the full trace.

<Callout type="info">
The block always operates on the current workspace. Costs are denominated in credits, both for
the cost filter and the cost output.
</Callout>

<FAQ items={[
{ question: "Why does Query Logs only return run IDs?", answer: "To keep payloads small and predictable. Run summaries can be large — fetch only the runs you actually need with Get Run Details." },
{ question: "Can I query logs from another workspace?", answer: "No. The block is scoped to the workspace the workflow lives in." },
{ question: "What are trace spans?", answer: "The execution trace for a run: every block that ran, its inputs and outputs, timings, and any tool calls — the same data shown in the Logs page trace view." },
{ question: "How far back can I query?", answer: "As far as your plan's log retention. Free plans retain logs for 7 days; paid plans retain them indefinitely." },
]} />
2 changes: 2 additions & 0 deletions apps/docs/content/docs/en/blocks/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
"api",
"condition",
"credential",
"enrichment",
"evaluator",
"function",
"guardrails",
"human-in-the-loop",
"knowledge",
"logs",
"loop",
"parallel",
"response",
Expand Down
Loading