Add instrumentation for Cohere (cohere-ai)

オープン
#24,490 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
68/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
node.js, typescript

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
TypeScript
スター
8.7k
フォーク
1.9k
平均マージ
1日 18時間
マージ済み PR(30日)
543

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

getsentry/sentry-javascript のほかの issue

getsentry/sentry-javascript の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。