getsentry / getsentry/sentry-python

feat(cohere): Instrument `ClientV2` methods

Aperta
#5,844 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Improvement Python Spans
Lingua principale
Python
Stelle
2.2k
Fork
669
Merge medio
1g 1h
PR unite (30g)
213

Descrizione

The Cohere V2 client (`cohere.ClientV2`) exists but its methods are not patched. The current integration only patches `BaseCohere` and `Client`. If `ClientV2` doesn't inherit from `BaseCohere`, calls through the V2 client go completely unmonitored.

Need to verify the inheritance chain and patch accordingly.

**Acceptance criteria:**

* `ClientV2.chat`, `embed`, and other relevant methods emit spans
* Follows `gen_ai.*` attribute conventions (not deprecated `ai.*`)
* Sets `gen_ai.system = "cohere"`

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.