-
Notifications
You must be signed in to change notification settings - Fork 12
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
Update key for session context field in attributes #34
Conversation
tests/langchain_chat_sample.py
Outdated
@@ -154,7 +154,7 @@ def format_docs(docs): | |||
# "status_code": "UNSET" | |||
# }, | |||
# "attributes": { | |||
# "workflow_context_properties.session_id": "0x4fa6d91d1f2a4bdbb7a1287d90ec4a16", | |||
# "context.session_id": "0x4fa6d91d1f2a4bdbb7a1287d90ec4a16", |
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.
as context is a first class object in telemetry, it can confuse the users as json path to fetch would be context.<property name>
.My suggestion would be to use either 'invocation' or not to add any prefix
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.
- from perspective of capturing and querying these attributes in prompt API, should be fine either way
- if the span of these attributes is fixed, like root span for eg, it would be easier for prompt API implementation
- since these attributes are inserted in all spans, including root span, so prompt API implementation should be fine
- some prefix might be helpful to determine if the attribute came from framework vs custom attribute inserted by user, though not sure if this is needed
- some possible prefix alternatives could be: state, session, trace
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.
changed to session.{property_name}
Signed-off-by: Kshitiz Vijayvargiya <kshitiz.vijayvargiya@okahu.ai>
Signed-off-by: Kshitiz Vijayvargiya <kshitiz.vijayvargiya@okahu.ai>
7a5f4ec
to
6033fe0
Compare
Proposed changes
The key for persisting sessions in attributes has been simplified as discussed in #25
Types of changes
Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...