Repository navigation
Deprecate GenericPart and stop emitting it from instrumentations - #936
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The targeted removals match the documented scope, preserve public compatibility, and update regression expectations without identified blocking issues.
No open issues 🎉
What changed in this PR
Deprecates GenericPart in the shared GenAI utility and stops emitting type-only placeholders from Anthropic, Bedrock, and Google GenAI instrumentations.
Changes:
- Retains
GenericPartin public unions for backward compatibility. - Drops previously placeholder-only content and updates regression assertions.
- Aligns changelogs and contributor guidance with the deprecation.
| File | Description |
|---|---|
util/opentelemetry-util-genai/src/opentelemetry/util/genai/types.py |
Documents deprecation; preserves unions. |
util/opentelemetry-util-genai/.changelog/936.deprecated |
Announces deprecation. |
instrumentation/opentelemetry-instrumentation-google-genai/tests/interactions/test_parser.py |
Expects unsupported inputs to be dropped. |
instrumentation/opentelemetry-instrumentation-google-genai/tests/generate_content/test_message.py |
Expects text-only system instructions. |
instrumentation/opentelemetry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai/message.py |
Removes system-instruction placeholders. |
instrumentation/opentelemetry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai/interactions.py |
Removes unsupported-input placeholders. |
instrumentation/opentelemetry-instrumentation-google-genai/.changelog/936.changed |
Records capture changes. |
instrumentation/opentelemetry-instrumentation-genai-bedrock/tests/test_converse.py |
Updates dropped-content expectations. |
instrumentation/opentelemetry-instrumentation-genai-bedrock/src/opentelemetry/instrumentation/genai/bedrock/extractors.py |
Removes unmapped-content placeholders. |
instrumentation/opentelemetry-instrumentation-genai-bedrock/.changelog/936.changed |
Records capture changes. |
instrumentation/opentelemetry-instrumentation-genai-anthropic/tests/test_messages_extractors.py |
Checks dropping without consuming content. |
instrumentation/opentelemetry-instrumentation-genai-anthropic/tests/test_iterator_transparency.py |
Updates file-backed capture expectations. |
instrumentation/opentelemetry-instrumentation-genai-anthropic/src/opentelemetry/instrumentation/genai/anthropic/utils.py |
Drops placeholders without reading sources. |
instrumentation/opentelemetry-instrumentation-genai-anthropic/.changelog/936.changed |
Records capture changes. |
AGENTS.md |
Adds guidance against deprecated usage. |
.github/skills/write-conformance-tests/SKILL.md |
Removes generic-part mapping guidance. |
.github/skills/migrate-from-openinference/SKILL.md |
Updates migration mapping guidance. |
.github/instructions/instrumentation.instructions.md |
Adds deprecated-usage review guidance. |
Review effort: Balanced
Pull request dashboard statusMerged · refreshed 2026-10-21 05:00 UTC Status above doesn't look right?
|
eternalcuriouslearner
approved these changes
Oct 21, 2026
lmolkova
force-pushed
the
deprecate-generic-part
branch
from
October 21, 2026 04:28
f6f9f3d to
6ff3b7a
Compare
6 of 7 tasks
# Conflicts: # instrumentation/opentelemetry-instrumentation-google-genai/tests/generate_content/test_message.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deprecates
GenericPartinopentelemetry-util-genaiand removes its usage from the Anthropic, Bedrock and Google GenAI instrumentations.Semconv defines
GenericPartso the JSON schema can accept future and custom part types. Instrumentations used it as a type-only placeholder that carries no content. Content should map to a specific part type or be dropped.AGENTS.md, the review instructions and the skills are updated to match.Known gaps:
GenericPartstays in theMessagePartandSystemInstructionPartunions for backward compatibility.video/audio/guardContentblocks, Google GenAI non-text system instruction parts.