-
Notifications
You must be signed in to change notification settings - Fork 211
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
Adding span for invoke agent #1900
base: main
Are you sure you want to change the base?
Conversation
@gyliu513 this needs rebase after the experimental -> development rename |
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, just a few minor comments
1af7a29
to
b704514
Compare
@lmolkova I think I have addressed all comments here, can you help review again? Thanks! |
docs/gen-ai/gen-ai-agent-spans.md
Outdated
|
||
The `gen_ai.operation.name` SHOULD be `invoke_agent`. | ||
|
||
The **span name** SHOULD be `invoke_agent {gen_ai.agent.name}`. |
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.
since gen_ai.agent.name
is rarely available for remote agents, I think we need to change it to
The **span name** SHOULD be `invoke_agent {gen_ai.agent.name}`. | |
The **span name** SHOULD be `invoke_agent {gen_ai.agent.name}` if `gen_ai.agent.name` is readily available. When `gen_ai.agent.name` is not available, it SHOULD be `invoke_agent`. |
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.
Done
ea49e28
to
ef12e19
Compare
docs/gen-ai/gen-ai-agent-spans.md
Outdated
@@ -47,22 +48,120 @@ Semantic conventions for individual GenAI systems and frameworks MAY specify dif | |||
|---|---|---|---|---|---| | |||
| [`gen_ai.operation.name`](/docs/attributes-registry/gen-ai.md) | string | The name of the operation being performed. [1] | `chat`; `text_completion`; `embeddings` | `Required` |  | | |||
| [`gen_ai.system`](/docs/attributes-registry/gen-ai.md) | string | The Generative AI product as identified by the client or server instrumentation. [2] | `openai` | `Required` |  | | |||
| [`error.type`](/docs/attributes-registry/error.md) | string | Describes a class of error the operation ended with. [3] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | `Conditionally Required` if the operation ended in an error |  | |
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.
is this intentional?
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.
added back
| [`server.port`](/docs/attributes-registry/server.md) | int | GenAI server port. [4] | `80`; `8080`; `443` | `Conditionally Required` If `server.address` is set. |  | | ||
| [`gen_ai.request.encoding_formats`](/docs/attributes-registry/gen-ai.md) | string[] | The encoding formats requested in an embeddings operation, if specified. [5] | `["base64"]`; `["float", "binary"]` | `Recommended` |  | | ||
| [`gen_ai.request.frequency_penalty`](/docs/attributes-registry/gen-ai.md) | double | The frequency penalty setting for the GenAI request. | `0.1` | `Recommended` |  | | ||
| [`gen_ai.request.max_tokens`](/docs/attributes-registry/gen-ai.md) | int | The maximum number of tokens the model generates for a request. | `100` | `Recommended` |  | |
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.
I don't think this attribute (or gen_ai.request.choice.count
) applies to create_agent span - it seems one of the latest commits has added a lot of common attributes that aren't relevant on create_agent
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.
When create agent, some request parameters can be specified, and gen_ai.request.choice.count
is just one of the parameter for request, can you elaborate more why this cannot apply to agent creation?
Signed-off-by: Guangya Liu <gyliu@ibm.com>
@lmolkova can you help review this again? The major change is in https://github.com/open-telemetry/semantic-conventions/pull/1900/files#diff-5183ed68de81fe666274b64e46e9c3f9fc6ea6c358abd6f9b3b3f9cb3f1c7a13 and other files are auto generated, thanks! |
Fixes #1842 #1924
Changes
Please provide a brief description of the changes here.
Note: if the PR is touching an area that is not listed in the existing areas, or the area does not have sufficient domain experts coverage, the PR might be tagged as experts needed and move slowly until experts are identified.
Merge requirement checklist
[chore]