Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore(ui): add header tooltips to traces and generations (#2765)

Marc Klingen85d92daafd7f
diff --git a/web/src/components/layouts/doc-popup.tsx b/web/src/components/layouts/doc-popup.tsx
index d92dc2dd24..08ff851d84 100644
--- a/web/src/components/layouts/doc-popup.tsx
+++ b/web/src/components/layouts/doc-popup.tsx
@@ -6,7 +6,6 @@ import {
import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture";
import { cn } from "@/src/utils/tailwind";
import { HelpCircle, Info } from "lucide-react";
-import Link from "next/link";
export type DocPopupProps = {
description: React.ReactNode;
@@ -45,36 +44,26 @@ export default function DocPopup({
className={cn("mx-1", href ? "cursor-pointer" : "cursor-default")}
asChild
>
- {href ? (
- <Link
- href={href}
- rel="noopener"
- target="_blank"
- className="inline-block whitespace-nowrap text-muted-foreground sm:pl-0"
- onClick={() => {
- capture("help_popup:href_clicked", {
- href: href,
- description: description,
- });
- }}
- >
+ <div
+ className="inline-block whitespace-nowrap text-muted-foreground sm:pl-0"
+ onClick={(e) => {
+ if (!href) return;
+ e.preventDefault();
+ e.stopPropagation();
+ window.open(href, "_blank");
+ capture("help_popup:href_clicked", {
+ href: href,
+ description: description,
+ });
+ }}
+ >
+ {
{
- {
- question: <HelpCircle className={sizes[size]} />,
- info: <Info className={sizes[size]} />,
- }[style]
- }
- </Link>
- ) : (
- <div className="inline-block whitespace-nowrap text-muted-foreground sm:pl-0">
- {
- {
- question: <HelpCircle className={sizes[size]} />,
- info: <Info className={sizes[size]} />,
- }[style]
- }
- </div>
- )}
+ question: <HelpCircle className={sizes[size]} />,
+ info: <Info className={sizes[size]} />,
+ }[style]
+ }
+ </div>
</HoverCardTrigger>
<HoverCardContent>
{typeof description === "string" ? (
diff --git a/web/src/components/table/use-cases/generations.tsx b/web/src/components/table/use-cases/generations.tsx
index 30d224b03d..bda7fa8d72 100644
--- a/web/src/components/table/use-cases/generations.tsx
+++ b/web/src/components/table/use-cases/generations.tsx
@@ -319,6 +319,11 @@ export default function GenerationsTable({
accessorKey: "scores",
id: "scores",
header: "Scores",
+ headerTooltip: {
+ description:
+ "Scores are used to evaluate the quality of the trace. They can be automated, based on user feedback, or manually annotated. See docs to learn more.",
+ href: "https://langfuse.com/docs/scores",
+ },
cell: ({ row }) => {
const values: ScoreSimplified[] | undefined = row.getValue("scores");
return (
@@ -412,6 +417,11 @@ export default function GenerationsTable({
accessorKey: "level",
id: "level",
header: "Level",
+ headerTooltip: {
+ description:
+ "Use You can differentiate the importance of observations with the level attribute to control the verbosity of your traces and highlight errors and warnings.",
+ href: "https://langfuse.com/docs/tracing-features/log-levels",
+ },
enableHiding: true,
cell({ row }) {
const value: ObservationLevel | undefined = row.getValue("level");
@@ -433,6 +443,11 @@ export default function GenerationsTable({
accessorKey: "statusMessage",
header: "Status Message",
id: "statusMessage",
+ headerTooltip: {
+ description:
+ "Use a statusMessage to e.g. provide additional information on a status such as level=ERROR.",
+ href: "https://langfuse.com/docs/tracing-features/log-levels",
+ },
enableHiding: true,
defaultHidden: true,
},
@@ -554,6 +569,10 @@ export default function GenerationsTable({
{
accessorKey: "metadata",
header: "Metadata",
+ headerTooltip: {
+ description: "Add metadata to traces to track additional information.",
+ href: "https://langfuse.com/docs/tracing-features/metadata",
+ },
cell: ({ row }) => {
const observationId: string = row.getValue("id");
const traceId: string = row.getValue("traceId");
@@ -573,6 +592,10 @@ export default function GenerationsTable({
accessorKey: "version",
id: "version",
header: "Version",
+ headerTooltip: {
+ description: "Track changes via the version tag.",
+ href: "https://langfuse.com/docs/experimentation",
+ },
enableHiding: true,
enableSorting: true,
},
@@ -580,6 +603,10 @@ export default function GenerationsTable({
accessorKey: "promptName",
id: "promptName",
header: "Prompt",
+ headerTooltip: {
+ description: "Link to prompt version in Langfuse prompt management.",
+ href: "https://langfuse.com/docs/prompts",
+ },
enableHiding: true,
enableSorting: true,
cell: ({ row }) => {
diff --git a/web/src/components/table/use-cases/traces.tsx b/web/src/components/table/use-cases/traces.tsx
index 83b1ada1f3..c804cc702e 100644
--- a/web/src/components/table/use-cases/traces.tsx
+++ b/web/src/components/table/use-cases/traces.tsx
@@ -286,8 +286,12 @@ export default function TracesTable({
},
{
accessorKey: "userId",
- header: "User ID",
+ header: "User",
id: "userId",
+ headerTooltip: {
+ description: "Add `userId` to traces to track users.",
+ href: "https://langfuse.com/docs/tracing-features/users",
+ },
cell: ({ row }) => {
const value: TracesTableRow["userId"] = row.getValue("userId");
return value && typeof value === "string" ? (
@@ -305,7 +309,11 @@ export default function TracesTable({
accessorKey: "sessionId",
enableColumnFilter: !omittedFilter.find((f) => f === "sessionId"),
id: "sessionId",
- header: "Session ID",
+ header: "Session",
+ headerTooltip: {
+ description: "Add `sessionId` to traces to track sessions.",
+ href: "https://langfuse.com/docs/tracing-features/sessions",
+ },
cell: ({ row }) => {
const value: TracesTableRow["sessionId"] = row.getValue("sessionId");
return value && typeof value === "string" ? (
@@ -449,6 +457,11 @@ export default function TracesTable({
accessorKey: "scores",
id: "scores",
header: "Scores",
+ headerTooltip: {
+ description:
+ "Scores are used to evaluate the quality of the trace. They can be automated, based on user feedback, or manually annotated. See docs to learn more.",
+ href: "https://langfuse.com/docs/scores",
+ },
enableColumnFilter: !omittedFilter.find((f) => f === "scores"),
cell: ({ row }) => {
const values: TracesTableRow["scores"] = row.getValue("scores");
@@ -493,6 +506,10 @@ export default function TracesTable({
{
accessorKey: "metadata",
header: "Metadata",
+ headerTooltip: {
+ description: "Add metadata to traces to track additional information.",
+ href: "https://langfuse.com/docs/tracing-features/metadata",
+ },
cell: ({ row }) => {
const traceId: TracesTableRow["id"] = row.getValue("id");
return (
@@ -539,6 +556,10 @@ export default function TracesTable({
accessorKey: "version",
id: "version",
header: "Version",
+ headerTooltip: {
+ description: "Track changes via the version tag.",
+ href: "https://langfuse.com/docs/experimentation",
+ },
enableHiding: true,
enableSorting: true,
defaultHidden: true,
@@ -547,6 +568,10 @@ export default function TracesTable({
accessorKey: "release",
id: "release",
header: "Release",
+ headerTooltip: {
+ description: "Track changes to your application via the release tag.",
+ href: "https://langfuse.com/docs/experimentation",
+ },
enableHiding: true,
enableSorting: true,
defaultHidden: true,
@@ -555,6 +580,10 @@ export default function TracesTable({
accessorKey: "tags",
id: "tags",
header: "Tags",
+ headerTooltip: {
+ description: "Group traces with tags.",
+ href: "https://langfuse.com/docs/tracing-features/tags",
+ },
cell: ({ row }) => {
const tags: TracesTableRow["tags"] = row.getValue("tags");
const traceId: TracesTableRow["id"] = row.getValue("id");