// @bun
import m from"@contractspec/lib.ui-link";import{ChevronRight as v}from"lucide-react";import{jsx as t,jsxs as r}from"react/jsx-runtime";function k(){return r("div",{className:"space-y-8",children:[r("div",{className:"space-y-4",children:[t("h1",{className:"font-bold text-4xl",children:"MCP Adapters"}),r("p",{className:"text-muted-foreground",children:["The ",t("strong",{children:"Model Context Protocol (MCP)"})," is an open standard for connecting AI models to external tools and data sources. ContractSpec provides MCP adapters that allow you to expose your capabilities as MCP tools and consume external MCP servers as capabilities."]})]}),r("div",{className:"space-y-4",children:[t("h2",{className:"font-bold text-2xl",children:"Why MCP integration matters"}),t("p",{className:"text-muted-foreground",children:"AI agents need access to real-world tools and data to be useful. MCP provides a standardized way to expose these capabilities. By integrating ContractSpec with MCP, you can:"}),r("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[t("li",{children:"Let AI agents invoke your ContractSpec capabilities safely and securely"}),t("li",{children:"Use external MCP servers (databases, APIs, search engines) as capability providers in your workflows"}),t("li",{children:"Build AI-powered features without writing custom integration code"}),t("li",{children:"Enforce policies on AI agent actions just like any other user"})]})]}),r("div",{className:"space-y-4",children:[t("h2",{className:"font-bold text-2xl",children:"Exposing capabilities as MCP tools"}),r("p",{className:"text-muted-foreground",children:["Any"," ",t(m,{href:"/docs/specs/capabilities",className:"text-violet-400 hover:text-violet-300",children:"CapabilitySpec"})," ","can be automatically exposed as an MCP tool. ContractSpec generates:"]}),r("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[t("li",{children:"A tool schema describing the capability's inputs, outputs, and purpose"}),t("li",{children:"An MCP server endpoint that AI agents can connect to"}),t("li",{children:"Policy enforcement ensuring agents can only invoke capabilities they're authorized to use"}),t("li",{children:"Audit logging of all agent actions for compliance and debugging"})]})]}),r("div",{className:"space-y-4",children:[t("h2",{className:"font-bold text-2xl",children:"Example: Exposing a capability"}),t("p",{className:"text-muted-foreground",children:"Here's how to expose ContractSpec operations as MCP tools:"}),t("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:t("pre",{children:`import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import { createMcpServer } from '@contractspec/lib.contracts-runtime-server-mcp/provider-mcp';
import { registry, resources, prompts } from './lib/registry';

const server = new McpServer({
  name: 'my-app-mcp',
  version: '1.0.0',
});

createMcpServer(server, registry, resources, prompts, {
  toolCtx: () => ({ actor: 'ai-agent' }),
  promptCtx: () => ({ userId: null, orgId: null }),
  resourceCtx: () => ({ userId: null, orgId: null }),
});

const transport = new StdioServerTransport();
await server.connect(transport);`})}),t("p",{className:"text-muted-foreground",children:"AI agents can now discover and invoke your operations through the MCP protocol. ContractSpec handles authentication, authorization, and execution automatically via the `OperationSpecRegistry`."})]}),r("div",{className:"space-y-4",children:[t("h2",{className:"font-bold text-2xl",children:"Consuming external MCP servers"}),t("p",{className:"text-muted-foreground",children:"You can integrate external MCP servers into your workflows. Define an integration spec and use it in your operations:"}),t("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:t("pre",{children:`import { defineIntegration } from '@contractspec/lib.contracts-integrations';
import { SchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';

const SearchProductsIntegration = defineIntegration({
  meta: {
    key: 'products.search',
    version: '1.0.0',
    category: 'mcp',
    description: 'Search products via external MCP server',
  },
  connection: {
    serverUrl: 'https://api.example.com/mcp',
    toolName: 'search_products',
  },
  io: {
    input: new SchemaModel({
      name: 'SearchProductsInput',
      fields: {
        query: { type: ScalarTypeEnum.String(), isOptional: false },
        category: { type: ScalarTypeEnum.String(), isOptional: true },
      },
    }),
    output: new SchemaModel({
      name: 'ProductResults',
      fields: {
        products: { type: ScalarTypeEnum.JSON(), isOptional: false, isArray: true },
      },
    }),
  },
});`})})]}),r("div",{className:"space-y-4",children:[t("h2",{className:"font-bold text-2xl",children:"Policy enforcement for AI agents"}),r("p",{className:"text-muted-foreground",children:["AI agents are treated like any other actor in ContractSpec. They must authenticate, and all their actions are subject to"," ",t(m,{href:"/docs/specs/policy",className:"text-violet-400 hover:text-violet-300",children:"PolicySpecs"}),". You can define specific policies in TypeScript:"]}),t("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:t("pre",{children:`import { definePolicy } from '@contractspec/lib.contracts-spec';

export const AIAgentRestrictions = definePolicy({
  meta: {
    key: 'ai.agent.restrictions',
    version: '1.0.0',
    description: 'Restrict AI agent actions',
  },
  rules: [
    {
      id: 'agents-read-only',
      effect: 'DENY',
      condition: (ctx) => ctx.actor === 'ai-agent' && ctx.action === 'write',
    },
    {
      id: 'agents-require-approval',
      effect: 'DENY',
      condition: (ctx, spec) => 
        ctx.actor === 'ai-agent' && 
        spec.policy.escalate === 'human_review' &&
        !ctx.approvalGranted,
    },
  ],
});`})})]}),r("div",{className:"space-y-4",children:[t("h2",{className:"font-bold text-2xl",children:"Human-in-the-loop workflows"}),t("p",{className:"text-muted-foreground",children:"For sensitive operations, you can require human approval before an AI agent can proceed. ContractSpec provides built-in approval workflows:"}),r("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[t("li",{children:"Agent requests permission to invoke a capability"}),t("li",{children:"Request is sent to designated approvers (via email, Slack, etc.)"}),t("li",{children:"Approver reviews the request and approves or denies it"}),t("li",{children:"Agent receives the decision and can proceed if approved"})]}),r("p",{className:"text-muted-foreground",children:["All approval decisions are logged in the"," ",t(m,{href:"/docs/safety/auditing",className:"text-violet-400 hover:text-violet-300",children:"audit log"}),"."]})]}),r("div",{className:"space-y-4",children:[t("h2",{className:"font-bold text-2xl",children:"Best practices"}),r("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[t("li",{children:"Start with read-only capabilities for AI agents\u2014only grant write access when necessary."}),t("li",{children:"Use human-in-the-loop approval for any capability that modifies critical data or triggers financial transactions."}),t("li",{children:"Set rate limits to prevent runaway agents from overwhelming your system."}),t("li",{children:"Provide clear, detailed descriptions for each capability so agents know when to use them."}),t("li",{children:"Monitor agent actions closely in production and adjust policies as needed."}),t("li",{children:"Test agent integrations thoroughly with realistic scenarios before deploying."})]})]}),r("div",{className:"flex items-center gap-4 pt-4",children:[t(m,{href:"/docs/advanced/renderers",className:"btn-ghost",children:"Previous: Custom Renderers"}),r(m,{href:"/docs/advanced/telemetry",className:"btn-primary",children:["Next: Telemetry ",t(v,{size:16})]})]})]})}import f from"@contractspec/lib.ui-link";import{jsx as a,jsxs as c}from"react/jsx-runtime";function A(){return c("div",{className:"space-y-8",children:[c("div",{className:"space-y-4",children:[a("h1",{className:"font-bold text-4xl",children:"Overlay Editor"}),a("p",{className:"text-lg text-muted-foreground",children:"A Next.js app (`@contractspec/app.overlay-editor`) that lets tenant admins tweak field visibility, labels, and ordering, then sign OverlaySpecs."})]}),c("div",{className:"space-y-4",children:[a("h2",{className:"font-bold text-2xl",children:"Features"}),c("ul",{className:"list-disc space-y-2 pl-6",children:[a("li",{children:"Toggle visibility and rename labels without touching code."}),a("li",{children:"Move fields up/down to define the overlay order."}),a("li",{children:"Preview JSON output powered by `@contractspec/lib.overlay-engine`."}),a("li",{children:"Server action for PEM signing (Ed25519/RSA-PSS)."})]}),c("p",{children:["Project path: ",a("code",{children:"packages/apps/overlay-editor"})]})]}),c("div",{className:"space-y-4",children:[a("h2",{className:"font-bold text-2xl",children:"Provisioning flow"}),c("ol",{className:"list-decimal space-y-2 pl-6",children:[c("li",{children:["Clone the repo and run ",a("code",{children:"bun dev"})," inside the app."]}),a("li",{children:"Use the UI to craft the overlay for a tenant."}),a("li",{children:"Paste the tenant's PEM private key (stored in Vault/KMS)."}),a("li",{children:"Click \u201CSign overlay\u201D to get the final JSON payload."}),a("li",{children:"Persist in the `Overlay` table and register with `OverlayRegistry`."})]}),c("p",{children:["See also:"," ",a(f,{href:"/docs/ops/tenant-customization",className:"text-violet-400 underline",children:"Tenant customization runbook"}),"."]})]})]})}import h from"@contractspec/lib.ui-link";import{ChevronRight as y}from"lucide-react";import{jsx as i,jsxs as s}from"react/jsx-runtime";function E(){return s("div",{className:"space-y-8",children:[s("div",{className:"space-y-2",children:[i("h1",{className:"font-bold text-4xl",children:"Custom Renderers"}),i("p",{className:"text-lg text-muted-foreground",children:"ContractSpec ships with React and React Native renderers. You can build custom renderers for any framework."})]}),s("div",{className:"space-y-6",children:[s("div",{className:"space-y-3",children:[i("h2",{className:"font-bold text-2xl",children:"Overview"}),s("p",{className:"text-muted-foreground",children:["The presentation runtime libraries (",i("code",{children:"@contractspec/lib.presentation-runtime-react"})," and",i("code",{children:"@contractspec/lib.presentation-runtime-react-native"}),") provide hooks and components to render ContractSpec-defined UI like workflows and data views. You can extend these or create custom implementations for other frameworks."]})]}),s("div",{className:"space-y-3",children:[i("h2",{className:"font-bold text-2xl",children:"Using the React Renderer"}),i("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:i("pre",{children:`import { useWorkflow, WorkflowStepRenderer } from '@contractspec/lib.presentation-runtime-react';
import { MyWorkflowSpec } from './specs';

export function WorkflowPage() {
  const workflow = useWorkflow(MyWorkflowSpec);

  return (
    <div>
      <h1>{workflow.currentStep.title}</h1>
      <WorkflowStepRenderer workflow={workflow} />
      <button onClick={workflow.next} disabled={!workflow.canProceed}>
        Next
      </button>
    </div>
  );
}`})})]}),s("div",{className:"space-y-3",children:[i("h2",{className:"font-bold text-2xl",children:"Custom Platform Support"}),i("p",{className:"text-muted-foreground",children:"To support a new platform (e.g., Vue, Svelte), you would:"}),s("ol",{className:"list-inside list-decimal space-y-2 text-muted-foreground",children:[s("li",{children:["Implement the core workflow state machine (from"," ",i("code",{children:"@contractspec/lib.presentation-runtime-core"}),")"]}),i("li",{children:"Create framework-specific hooks/components for step rendering"}),i("li",{children:"Handle validation and submission via the ContractSpec I/O schemas"})]})]}),i("div",{className:"flex items-center gap-4 pt-4",children:s(h,{href:"/docs",className:"btn-primary",children:["Back to docs ",i(y,{size:16})]})})]})]})}import{jsx as l,jsxs as p}from"react/jsx-runtime";function q(){return p("div",{className:"space-y-8",children:[p("div",{className:"space-y-4",children:[l("h1",{className:"font-bold text-4xl",children:"Spec Experiments"}),l("p",{className:"text-lg text-muted-foreground",children:"Run controlled experiments on ContractSpec operations, gradually shift traffic, and roll back automatically when guardrails trip."})]}),p("div",{className:"space-y-3",children:[l("h2",{className:"font-bold text-2xl",children:"Define control + variants"}),l("pre",{className:"rounded-lg border bg-muted p-4 text-sm",children:`import { SpecExperimentRegistry } from '@contractspec/lib.growth/spec-experiments';

const registry = new SpecExperimentRegistry().register({
  target: { name: 'billing.createInvoice', version: 4 },
  experiment: {
    key: 'billing.createInvoice.evolution',
    version: '1.0.0',
    goal: 'Reduce PO validation failures',
    primaryMetric: 'latency_ms',
    variants: [
      { id: 'control' },
      { id: 'po-required', description: 'Force PO field', weight: 1 },
    ],
  },
  control: BillingCreateInvoiceV4,
  variants: [
    { id: 'po-required', spec: BillingCreateInvoiceForAcme },
  ],
  rolloutStages: [0.01, 0.1, 0.5, 1],
  guardrails: { errorRateThreshold: 0.02, latencyP99ThresholdMs: 500 },
});`})]}),p("div",{className:"space-y-3",children:[l("h2",{className:"font-bold text-2xl",children:"Attach to runtime"}),l("pre",{className:"rounded-lg border bg-muted p-4 text-sm",children:`import { createSpecVariantResolver } from '@contractspec/lib.growth/spec-experiments';

adapterContext.specVariantResolver = createSpecVariantResolver({
  adapter,
  resolveUserId: (ctx) => ctx.userId ?? ctx.organizationId ?? 'anon',
});`})]}),p("div",{className:"space-y-3",children:[l("h2",{className:"font-bold text-2xl",children:"Track outcomes + auto-rollback"}),l("pre",{className:"rounded-lg border bg-muted p-4 text-sm",children:`import {
  SpecExperimentAnalyzer,
  SpecExperimentController,
} from '@contractspec/lib.growth/spec-experiments';

const analyzer = new SpecExperimentAnalyzer(tracker);
const controller = new SpecExperimentController({
  registry,
  analyzer,
  onRollback: (target, evaluation) => notifyOps(target, evaluation.reasons),
});`})]}),l("div",{className:"grid gap-4 md:grid-cols-2",children:[{title:"Deterministic bucketing",description:"ExperimentRunner reuses the same hashing logic as growth experiments\u2014every user sticks to a variant."},{title:"Multi-stage rollouts",description:"Use `rolloutStages` to shift 1% \u2192 10% \u2192 50% \u2192 100%. Guardrails trigger rollbacks automatically."}].map((u)=>p("div",{className:"card-subtle space-y-2 p-4",children:[l("h3",{className:"font-semibold text-lg",children:u.title}),l("p",{className:"text-muted-foreground text-sm",children:u.description})]},u.title))})]})}import g from"@contractspec/lib.ui-link";import{ChevronRight as b}from"lucide-react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function _(){return o("div",{className:"space-y-8",children:[o("div",{className:"space-y-4",children:[e("h1",{className:"font-bold text-4xl",children:"Telemetry"}),o("p",{className:"text-muted-foreground",children:["A ",e("strong",{children:"TelemetrySpec"})," defines what metrics, logs, and traces to collect for observability. ContractSpec automatically instruments your application based on these specs, ensuring you have the visibility you need to monitor, debug, and optimize your system."]})]}),o("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Why telemetry matters"}),e("p",{className:"text-muted-foreground",children:"You can't fix what you can't see. Telemetry provides visibility into how your application is performing, where errors are occurring, and how users are interacting with your system. Without proper instrumentation, you're flying blind in production."}),e("p",{className:"text-muted-foreground",children:"ContractSpec takes a spec-first approach to telemetry: you declare what you want to observe, and runtime adapters instrument operations automatically. This ensures consistent, comprehensive coverage without manual effort."})]}),o("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Three pillars of observability"}),o("div",{className:"space-y-3",children:[o("div",{children:[e("h3",{className:"font-semibold text-lg",children:"Metrics"}),e("p",{className:"text-muted-foreground",children:"Numerical measurements collected over time. Examples: request count, error rate, latency percentiles, active users, queue depth. Metrics are cheap to collect and store, making them ideal for high-level monitoring and alerting."})]}),o("div",{children:[e("h3",{className:"font-semibold text-lg",children:"Logs"}),e("p",{className:"text-muted-foreground",children:'Timestamped text records of events. Examples: "User 123 logged in", "Payment failed for order 456", "Database connection pool exhausted". Logs provide detailed context for debugging specific issues.'})]}),o("div",{children:[e("h3",{className:"font-semibold text-lg",children:"Traces"}),e("p",{className:"text-muted-foreground",children:"Records of requests as they flow through your system. A trace shows the complete path of a request\u2014which services it touched, how long each step took, and where errors occurred. Traces are essential for debugging distributed systems."})]})]})]}),o("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Example TelemetrySpec"}),e("p",{className:"text-muted-foreground",children:"Here's how telemetry is configured in TypeScript:"}),e("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:e("pre",{children:`import { defineTelemetry } from '@contractspec/lib.contracts-spec/telemetry';

export const OrderProcessingTelemetry = defineTelemetry({
  meta: {
    key: 'order.processing.observability',
    version: '1.0.0',
  },
  metrics: [
    {
      name: 'orders_created_total',
      type: 'counter',
      description: 'Total number of orders created',
      labels: ['status', 'payment_method'],
    },
    {
      name: 'order_processing_duration_seconds',
      type: 'histogram',
      description: 'Time to process an order',
      buckets: [0.1, 0.5, 1.0, 2.0, 5.0, 10.0],
      labels: ['status'],
    },
  ],
  traces: [
    {
      operation: 'createOrder',
      sampleRate: 1.0, // Trace 100% of requests
      includeInputs: true,
      includeOutputs: true,
      redactFields: ['creditCard', 'ssn'],
    },
    {
      operation: 'processPayment',
      sampleRate: 0.1, // Trace 10% of requests
      includeInputs: false, // Don't log payment details
    },
  ],
  alerts: [
    {
      name: 'high-error-rate',
      condition: 'error_rate > 0.05',
      duration: '5m',
      severity: 'critical',
      notify: ['pagerduty', 'slack'],
    },
  ],
});`})})]}),o("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Automatic instrumentation"}),e("p",{className:"text-muted-foreground",children:"ContractSpec automatically instruments:"}),o("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[o("li",{children:[e("strong",{children:"All operations"})," \u2013 Request count, latency, error rate per Command/Query"]}),o("li",{children:[e("strong",{children:"All workflows"})," \u2013 Step execution time, retry counts, compensation events"]}),o("li",{children:[e("strong",{children:"All data views"})," \u2013 Query execution time, result set size"]}),o("li",{children:[e("strong",{children:"All policy decisions"})," \u2013 Decision time, permit/deny ratio"]}),o("li",{children:[e("strong",{children:"System resources"})," \u2013 CPU, memory, disk, network usage"]})]}),e("p",{className:"text-muted-foreground",children:"You don't need to add instrumentation code manually\u2014the runtime handles it based on your specs."})]}),o("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Integration with observability platforms"}),e("p",{className:"text-muted-foreground",children:"ContractSpec supports multiple observability backends:"}),o("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[o("li",{children:[e("strong",{children:"Prometheus"})," \u2013 For metrics collection and alerting"]}),o("li",{children:[e("strong",{children:"Grafana"})," \u2013 For dashboards and visualization"]}),o("li",{children:[e("strong",{children:"Jaeger / Tempo"})," \u2013 For distributed tracing"]}),o("li",{children:[e("strong",{children:"Loki"})," \u2013 For log aggregation"]}),o("li",{children:[e("strong",{children:"Datadog"})," \u2013 All-in-one observability platform"]}),o("li",{children:[e("strong",{children:"New Relic"})," \u2013 Application performance monitoring"]}),o("li",{children:[e("strong",{children:"Honeycomb"})," \u2013 Observability for complex systems"]})]}),e("p",{className:"text-muted-foreground",children:"You can configure multiple backends and send telemetry to all of them simultaneously."})]}),o("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Sampling and performance"}),e("p",{className:"text-muted-foreground",children:"Collecting telemetry has a cost\u2014CPU, memory, network bandwidth, and storage. ContractSpec provides several mechanisms to control overhead:"}),o("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[o("li",{children:[e("strong",{children:"Sampling"})," \u2013 Trace only a percentage of requests (e.g., 10%)"]}),o("li",{children:[e("strong",{children:"Adaptive sampling"})," \u2013 Automatically reduce sampling rate under high load"]}),o("li",{children:[e("strong",{children:"Tail-based sampling"})," \u2013 Keep traces for failed requests, sample successful ones"]}),o("li",{children:[e("strong",{children:"Field redaction"})," \u2013 Remove sensitive data from traces and logs"]}),o("li",{children:[e("strong",{children:"Aggregation"})," \u2013 Pre-aggregate metrics before sending to reduce network traffic"]})]})]}),o("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Best practices"}),o("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[e("li",{children:"Start with high-level metrics (request rate, error rate, latency) and add more detailed instrumentation as needed."}),e("li",{children:"Use structured logging\u2014log events with structured fields, not free-form text."}),e("li",{children:"Set up alerts for critical metrics so you're notified when things go wrong."}),e("li",{children:"Use traces to debug complex issues\u2014they show the complete picture of a request."}),e("li",{children:"Redact sensitive data from logs and traces to comply with privacy regulations."}),e("li",{children:"Review dashboards regularly to understand normal behavior\u2014this makes anomalies easier to spot."}),e("li",{children:"Use sampling to control costs, but always trace errors and slow requests."})]})]}),o("div",{className:"flex items-center gap-4 pt-4",children:[e(g,{href:"/docs/advanced/mcp",className:"btn-ghost",children:"Previous: MCP Adapters"}),o(g,{href:"/docs/comparison",className:"btn-primary",children:["Next: Comparison ",e(b,{size:16})]})]})]})}import{jsx as n,jsxs as d}from"react/jsx-runtime";function B(){return d("div",{className:"space-y-8",children:[d("div",{className:"space-y-4",children:[n("h1",{className:"font-bold text-4xl",children:"Workflow Monitoring"}),n("p",{className:"text-lg text-muted-foreground",children:"Production workflows need robust observability. ContractSpec provides SLA monitoring, distributed tracing, and audit logging out of the box."})]}),d("div",{className:"space-y-4",children:[n("h2",{className:"font-bold text-2xl",children:"SLA Monitoring"}),d("p",{children:["Use the ",n("code",{children:"SLAMonitor"})," to detect when workflows or individual steps exceed their budgeted duration."]}),n("pre",{className:"rounded-lg border bg-muted p-4 text-sm",children:`import { SLAMonitor } from '@contractspec/lib.contracts-spec/workflow/sla-monitor';

const monitor = new SLAMonitor((event, payload) => {
  if (event === 'workflow.sla_breach') {
    console.error('SLA Breach!', payload);
    // Send to PagerDuty / Slack
  }
});

// Check periodically
monitor.check(currentState, workflowSpec);`})]}),d("div",{className:"space-y-4",children:[n("h2",{className:"font-bold text-2xl",children:"Telemetry & Tracing"}),n("p",{children:"Workflows automatically generate OpenTelemetry spans for:"}),d("ul",{className:"list-disc space-y-2 pl-6",children:[n("li",{children:"Overall workflow execution"}),n("li",{children:"Individual steps"}),n("li",{children:"Retries and compensation"})]}),n("p",{children:"Configure your OpenTelemetry exporter to send traces to Jaeger, Datadog, or Honeycomb."})]}),d("div",{className:"space-y-4",children:[n("h2",{className:"font-bold text-2xl",children:"Dashboarding"}),d("p",{children:["You can build a custom dashboard using ",n("code",{children:"DataViews"})," over your workflow state database. See the DataViews tutorial for how to visualize ",n("code",{children:"WorkflowState"})," records."]})]})]})}export{B as AdvancedWorkflowMonitoringPage,_ as AdvancedTelemetryPage,q as AdvancedSpecExperimentsPage,E as AdvancedRenderersPage,A as AdvancedOverlayEditorPage,k as AdvancedMCPPage};
