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
Copy link
Copy Markdown
Contributor

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

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 work from 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 2 times, most recently from ffb9258 to 89a48ed Compare May 31, 2026 09:40
Adds a scaffold-only Cohere V2 instrumentation package as PR 1 of 4
tracked in open-telemetry#56. The CohereInstrumentor sets up tracer, logger, and
meter providers but does not yet wrap any Cohere client methods.
Chat completions, streaming, and conformance tests land in follow-up
PRs per the staged roadmap in open-telemetry#56.

Ported from open-telemetry/opentelemetry-python-contrib#4418, adapted
to the new-repo conventions (opentelemetry-instrumentation-genai-cohere
package name and opentelemetry.instrumentation.genai.cohere import path)
mirroring the opentelemetry-instrumentation-genai-claude-agent-sdk
scaffold shape.
@Nik-Reddy Nik-Reddy force-pushed the feat/cohere-instrumentation-scaffold branch from 89a48ed to 856791f Compare May 31, 2026 09:42
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.

2 participants