mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
feat(ui): add tracing setup card
This commit is contained in:
parent
d989f93144
commit
387c53aaef
1 changed files with 33 additions and 0 deletions
|
|
@ -0,0 +1,33 @@
|
|||
"use client";
|
||||
|
||||
import { Info } from "lucide-react";
|
||||
|
||||
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
|
||||
|
||||
export const TRACING_SETUP_SNIPPET = `# proxy config
|
||||
general_settings:
|
||||
tracing:
|
||||
store: clickhouse # + CLICKHOUSE_URL env var
|
||||
# your agent app
|
||||
export LANGSMITH_TRACING=true LANGSMITH_TRACING_MODE=otel
|
||||
export OTEL_EXPORTER_OTLP_ENDPOINT=<proxy url>
|
||||
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer <litellm key>"`;
|
||||
|
||||
/** Shown when GET /v1/traces answers 501 (agent tracing not configured on this proxy). */
|
||||
export function TracingSetupCard({ detail }: { detail?: string }) {
|
||||
return (
|
||||
<Alert className="mb-4" data-testid="tracing-setup-card">
|
||||
<Info />
|
||||
<AlertTitle>Agent tracing is not enabled</AlertTitle>
|
||||
<AlertDescription>
|
||||
<p>
|
||||
Point your agent's OpenTelemetry exporter at this proxy to see agent runs here, joined to their LLM
|
||||
request logs.{detail ? ` (${detail})` : ""}
|
||||
</p>
|
||||
<pre className="mt-2 w-full overflow-x-auto rounded-md border bg-muted px-3 py-2 font-mono text-xs text-foreground">
|
||||
{TRACING_SETUP_SNIPPET}
|
||||
</pre>
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue