Skip to content

Add Cohere instrumentation package scaffolding#102

Open
Nik-Reddy wants to merge 2 commits into
open-telemetry:mainfrom
Nik-Reddy:feat/cohere-instrumentation-scaffold
Open

Add Cohere instrumentation package scaffolding#102
Nik-Reddy wants to merge 2 commits into
open-telemetry:mainfrom
Nik-Reddy:feat/cohere-instrumentation-scaffold

Conversation

@Nik-Reddy

@Nik-Reddy Nik-Reddy commented May 31, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a scaffold-only Cohere V2 instrumentation package as PR 1 of 4 tracked in #56. The CohereInstrumentor sets up tracer, logger, and meter providers but does not yet wrap any Cohere client methods.

Ported from open-telemetry/opentelemetry-python-contrib#4418, adapted to the new-repo conventions:

  • Package name: opentelemetry-instrumentation-genai-cohere
  • Import path: opentelemetry.instrumentation.genai.cohere
  • Class: CohereInstrumentor
  • Cohere SDK floor: cohere >= 5.13.0 (V2 GA floor; 5.0.0 lacks ClientV2)
  • Python: 3.10, 3.11, 3.12, 3.13, 3.14
  • OTel pins: opentelemetry-api ~= 1.40, opentelemetry-instrumentation ~= 0.61b0, opentelemetry-semantic-conventions ~= 0.61b0, opentelemetry-util-genai >= 1.0b0.dev

This mirrors the opentelemetry-instrumentation-genai-claude-agent-sdk scaffold shape.

Scope

  • New package skeleton (src/, tests/, examples/, pyproject.toml, README.rst, LICENSE)
  • 7 smoke tests covering instantiation, dependency reporting, instrument/uninstrument cycle, idempotent calls, no-provider fallback, and required-attribute presence
  • Workspace registration: root pyproject.toml, tox.ini, eachdist.ini, uv.lock, and regenerated instrumentation/README.md
  • Example placeholders (examples/manual and examples/zero-code) with explicit scaffold disclaimers per Cohere V2 instrumentation: continue scaffold + chat completions from my previous work opentelemetry-python-contrib#4418 #56
  • Towncrier changelog fragment (.changelog/102.added)

Not in this PR (follow-ups per #56)

  • PR 2: chat completions instrumentation (sync, async, non-streaming)
  • PR 3: streaming
  • PR 4: conformance tests

Validation

  • uv lock succeeds; cohere v7.0.2 added with transitive deps
  • tox -e generate regenerates instrumentation/README.md with the cohere row alphabetically inserted
  • uv run ruff check instrumentation/opentelemetry-instrumentation-genai-cohere/ passes
  • pytest passes 7/7 on both latest and oldest dep sets across the full Python 3.10-3.14 matrix

Closes part of #56.

Copilot AI review requested due to automatic review settings May 31, 2026 09:25
@Nik-Reddy Nik-Reddy requested a review from a team as a code owner May 31, 2026 09:25
@Nik-Reddy Nik-Reddy force-pushed the feat/cohere-instrumentation-scaffold branch 3 times, most recently from 89a48ed to 856791f Compare May 31, 2026 09:42
@Nik-Reddy Nik-Reddy force-pushed the feat/cohere-instrumentation-scaffold branch from 59dbfec to a437ffe Compare June 7, 2026 17:53
@Nik-Reddy

Copy link
Copy Markdown
Contributor Author

@lzchen PR is rebased and all checks are passing now. Could you please merge it when you get a chance? Thanks!

@lzchen

lzchen commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Hi @Nik-Reddy , will have to wait for a maintainer to merge.

@Nik-Reddy Nik-Reddy force-pushed the feat/cohere-instrumentation-scaffold branch from a437ffe to 9515baf Compare June 8, 2026 22:28
@Nik-Reddy

Copy link
Copy Markdown
Contributor Author

@lmolkova all checks are passing. This is the scaffold-only Cohere package PR from the roadmap in #56.

Could you please take a look when you get a chance? Thanks!

@Nik-Reddy Nik-Reddy force-pushed the feat/cohere-instrumentation-scaffold branch from 9a1fc63 to 86218c5 Compare June 14, 2026 09:01
@Nik-Reddy Nik-Reddy force-pushed the feat/cohere-instrumentation-scaffold branch from 86218c5 to 8e48615 Compare June 14, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants