-
Notifications
You must be signed in to change notification settings - Fork 829
Add support for emitting inference events and enrich message types #3994
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?
Add support for emitting inference events and enrich message types #3994
Conversation
|
Typecheck failure is not related to this PR, so it may be ignored. cc @aabmass |
Change-Id: I8fd0b896fc103a986f78c7351ce627611e545a62 Co-developed-by: Cursor <noreply@cursor.com>
Change-Id: I5c4c93613e3e1084245b7298955a08cbc7c9708d Co-developed-by: Cursor <noreply@cursor.com>
Change-Id: If34cfce0e7eb130db6a1e8e30a5f4be7c215285f Co-developed-by: Cursor <noreply@cursor.com>
Change-Id: I847f75259e01729db88129a44b241afb0ea2aca4 Co-developed-by: Cursor <noreply@cursor.com>
Change-Id: I818a042d275d3c8e3348647d73e34560e7d92f54 Co-developed-by: Cursor <noreply@cursor.com>
fbce5a2 to
1d312c5
Compare
Change-Id: I40b8e01bbe4fa9c182e99085a7c71d4536042247 Co-developed-by: Cursor <noreply@cursor.com>
Change-Id: Ie07c495002143fb2f0cf88033206290eb85386ad Co-developed-by: Cursor <noreply@cursor.com>
util/opentelemetry-util-genai/src/opentelemetry/util/genai/span_utils.py
Show resolved
Hide resolved
util/opentelemetry-util-genai/src/opentelemetry/util/genai/span_utils.py
Outdated
Show resolved
Hide resolved
util/opentelemetry-util-genai/src/opentelemetry/util/genai/span_utils.py
Show resolved
Hide resolved
|
I think changing some of the apply attributes methods to output a dictionary instead of attaching the attributes for events sake is ok, though making the methods llm specific will lead to a lot of overlapping code overtime if more genai types are implemented in the future. More so applies to methods like _apply_common_span_attributes, _apply_finish_attributes, etc, which could take different genai type invocations. |
@JWinermaSplunk Thanks for your suggestions! We do need to classify the attributes for common, inference, agent and so on to reuse them as much as possible. However, I don't want to involve many features in this PR because that means we'd better refactor the design of Could you please create another issue to mark this proposal? I believe @keith-decker and @aabmass would also be interested in this. |
Change-Id: I1da48b52b76042a9efd124057681f579cc93fb6e Co-developed-by: Cursor <noreply@cursor.com>
Description
gen_ai.system_instructionsattributes for inference span or events.span_utils.pyfor more brief implementation.Reasoning,Blob,File,Urimessage types.Fixes #3065
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.