-
Notifications
You must be signed in to change notification settings - Fork 768
Add gen_ai_latest_experimental
to the Sem Conv stability flag. Add ContentCapturingMode
enum
#3716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
For some reason |
opentelemetry-instrumentation/src/opentelemetry/instrumentation/_semconv.py
Show resolved
Hide resolved
opentelemetry-instrumentation/src/opentelemetry/instrumentation/_semconv.py
Outdated
Show resolved
Hide resolved
what are you getting on your end? Installing ruff==0.6.9 and running it in opentelemetry-util-genai it returns me:
|
…n/_semconv.py Co-authored-by: Emídio Neto <[email protected]>
When I run tox -e ruff (from the root directory if that matters), it doesn't format the files in genai-utils when it clearly should |
util/opentelemetry-util-genai/src/opentelemetry/util/genai/utils.py
Outdated
Show resolved
Hide resolved
util/opentelemetry-util-genai/src/opentelemetry/util/genai/utils.py
Outdated
Show resolved
Hide resolved
…ls.py Co-authored-by: Riccardo Magliocchetti <[email protected]>
@@ -173,6 +174,7 @@ class _StabilityMode(Enum): | |||
HTTP_DUP = "http/dup" | |||
DATABASE = "database" | |||
DATABASE_DUP = "database/dup" | |||
GEN_AI_LATEST = "gen_ai_latest_experimental" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason not to spell it as is so there is no hypothetical conflict with future stable flags?
GEN_AI_LATEST = "gen_ai_latest_experimental" | |
GEN_AI_LATEST_EXPERIMENTAL = "gen_ai_latest_experimental" |
try: | ||
return ContentCapturingMode[envvar.upper()] | ||
except KeyError: | ||
raise RuntimeError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want instrumentations to handle it? IMHO, all instrumentations should 1) write a warning 2) continue with default value. So it could make sense to do it in the helper method so it's consistent and none of them need to think about it.
Description
Add
gen_ai_latest_experimental
to the Sem Conv stability env var.Add
ContentCapturingMode
enum which will get it's value from theOTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT
env varType of change
Please delete options that are not relevant.
How Has This Been Tested?
Unit tests
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.