Skip to content

Always use GenAI new semconv if instrumentors support#764

Merged
tammy-baylis-swi merged 2 commits into
mainfrom
always-gen-ai-latest-semconv
May 1, 2026
Merged

Always use GenAI new semconv if instrumentors support#764
tammy-baylis-swi merged 2 commits into
mainfrom
always-gen-ai-latest-semconv

Conversation

@tammy-baylis-swi
Copy link
Copy Markdown
Contributor

Hardcode APM to always use GenAI new semconv. If a loaded instrumentor supports the config, then new attributes will be used instead of deprecated. Example: gen_ai.input.messages, gen_ai.output.messages, instead of the old gen_ai.user.message etc.

Copilot AI review requested due to automatic review settings April 30, 2026 21:57
@tammy-baylis-swi tammy-baylis-swi requested review from a team as code owners April 30, 2026 21:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the SolarWinds OpenTelemetry distro defaults to always opt into the latest GenAI semantic conventions (when supported by installed instrumentors) by extending the OTEL_SEMCONV_STABILITY_OPT_IN value.

Changes:

  • Extend SolarWindsDistro.get_semconv_opt_in() to include gen_ai_latest_experimental.
  • Ensure _configure() sets OTEL_SEMCONV_STABILITY_OPT_IN using the updated opt-in string.
  • Update unit tests to assert the new semconv opt-in value.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
solarwinds_apm/distro.py Updates the semconv opt-in string returned by get_semconv_opt_in() (and thus set during distro configuration).
tests/unit/test_distro.py Updates expected environment variable values and the get_semconv_opt_in() unit test to match the new opt-in string.

Comment thread solarwinds_apm/distro.py
…erimental

Agent-Logs-Url: https://github.com/solarwinds/apm-python/sessions/9b74a7bf-b2bb-486c-abd0-a7d469990d54

Co-authored-by: tammy-baylis-swi <96076570+tammy-baylis-swi@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@cheempz cheempz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tammy-baylis-swi tammy-baylis-swi merged commit fd36858 into main May 1, 2026
64 checks passed
@tammy-baylis-swi tammy-baylis-swi deleted the always-gen-ai-latest-semconv branch May 1, 2026 16:32
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.

4 participants