Add instrumentation for Cohere (cohere-ai)

Aperta
#24,490 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
68/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
node.js, typescript

Direzione di ricerca

Start with packages/server-utils/src/ai/cohere/ and src/integrations/cohere.ts, then inspect the existing mistral and anthropic integrations for structure and registration through getTracingIntegrations(). Instrument CohereClientV2 and CohereClient chat(), chatStream(), embed(), and rerank(), including streaming, with the listed gen_ai attributes and token usage; done means native Cohere coverage is available through the runtime re-exports.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Feature javascript Node.js Spans

Add native gen-AI instrumentation for the Cohere Node SDK, cohere-ai (repo).

Coverage status

  • @ai-sdk/cohere (Vercel AI SDK provider, ~3.2M/mo) is already covered by proxy through our vercel-ai integration.
  • The native cohere-ai SDK is not covered. This issue tracks that path.

Relevance (npm)

  • cohere-ai: ~1.9M downloads/month (~20.3M last year) — roughly flat-to-modest growth. Cohere is a notable enterprise/RAG-focused provider (chat, embeddings, and rerank), and rerank in particular has no equivalent in the providers we instrument today.

Rough scope

  • Add instrumentation logic under packages/server-utils/src/ai/cohere/ and wire it up via src/integrations/cohere.ts, registered in getTracingIntegrations(); runtime packages re-export from @sentry/server-utils.
  • Instrument CohereClientV2 (and legacy CohereClient): chat() / chatStream(), embed(), and rerank(), including streaming.
  • Emit gen_ai.* spans per the span attribute conventions (gen_ai.provider.name = cohere, request/response model, token usage, finish reasons).
  • Cohere is not OpenAI wire-compatible, so it needs bespoke instrumentation (like mistral/anthropic), not the openai-compatible shim.
Lingua principale
TypeScript
Stelle
8.7k
Fork
1.9k
Merge medio
1g 18h
PR unite (30g)
543

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/sentry-javascript

Tutte le issue di getsentry/sentry-javascript

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.