diff --git a/app/(protected)/project/[project_id]/annotations/annotations.tsx b/app/(protected)/project/[project_id]/annotations/annotations.tsx index 8061f241..78c9d47e 100644 --- a/app/(protected)/project/[project_id]/annotations/annotations.tsx +++ b/app/(protected)/project/[project_id]/annotations/annotations.tsx @@ -68,28 +68,22 @@ export default function Annotations({ email }: { email: string }) { const filters = { filters: [ { - operation: "OR", + operation: "AND", filters: [ - { - key: "llm.prompts", - operation: "NOT_EQUALS", - value: "", - type: "attribute", - }, { key: "name", operation: "EQUALS", value: "gen_ai.content.completion", type: "event", }, + { + key: "status_code", + operation: "EQUALS", + value: "STATUS_CODE_OK", + type: "property", + }, ], }, - { - key: "status_code", - operation: "EQUALS", - value: "OK", - type: "property", - }, ], operation: "AND", }; diff --git a/components/shared/vendor-metadata.tsx b/components/shared/vendor-metadata.tsx index 98c23fca..3656e20e 100644 --- a/components/shared/vendor-metadata.tsx +++ b/components/shared/vendor-metadata.tsx @@ -146,6 +146,10 @@ export function vendorColor(vendor: string) { return "bg-black"; } + if (vendor.includes("mongodb")) { + return "bg-green-200"; + } + return "bg-gray-800"; } @@ -487,6 +491,22 @@ export function VendorLogo({ ); } + if (vendor.includes("mongodb")) { + const color = vendorColor("mongodb"); + return ( + MongoDB Logo + ); + } + return (
= ({ color = "bg-slate-500"; else if (span.name.includes("litellm") || serviceName.includes("litellm")) color = "bg-blue-500"; + else if (span.name.includes("mongodb") || serviceName.includes("mongodb")) + color = "bg-green-500"; const fillColor = color.replace("bg-", "fill-"); const vendor = getVendorFromSpan(span as any); diff --git a/lib/utils.ts b/lib/utils.ts index 6268ae84..750792a8 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -576,6 +576,10 @@ export function calculatePriceFromUsage( costTable = ANTHROPIC_PRICING[cmodel]; } else if (model.includes("command")) { costTable = COHERE_PRICING[model]; + } else if (model.includes("gemini")) { + costTable = GEMINI_PRICING[model]; + } else if (model.includes("grok")) { + costTable = XAI_PRICING[model]; } } else if (vendor === "openai") { // check if model is present as key in OPENAI_PRICING @@ -827,6 +831,8 @@ export function getVendorFromSpan(span: Span): string { vendor = "embedchain"; } else if (span.name.includes("litellm") || serviceName.includes("litellm")) { vendor = "litellm"; + } else if (span.name.includes("mongodb") || serviceName.includes("mongodb")) { + vendor = "mongodb"; } return vendor; } diff --git a/public/mongodb.png b/public/mongodb.png new file mode 100644 index 00000000..29281346 Binary files /dev/null and b/public/mongodb.png differ