-
Notifications
You must be signed in to change notification settings - Fork 846
GenAI utils: Add server address, port and additional metric attributes to LLM invocation #4069
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?
GenAI utils: Add server address, port and additional metric attributes to LLM invocation #4069
Conversation
util/opentelemetry-util-genai/src/opentelemetry/util/genai/metrics.py
Outdated
Show resolved
Hide resolved
util/opentelemetry-util-genai/src/opentelemetry/util/genai/metrics.py
Outdated
Show resolved
Hide resolved
util/opentelemetry-util-genai/src/opentelemetry/util/genai/metrics.py
Outdated
Show resolved
Hide resolved
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.
Looks good to me! I will admit the first docstring in types.py is a little confusing i.e. saying metric_attributes won't be set on metrics, though I understand it. Also, do we not intend to set server_address or server_port for spans or events based on the second docstring?
Edit: SIG, yes, no address or port for spans, only metrics
keith-decker
left a comment
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.
LGTM
Adding
server.addressandserver.port(recommended attributes) and ability to provide additional attributes for metrics (needed for OpenAI)