-
Notifications
You must be signed in to change notification settings - Fork 530
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
Fix langchain integration #3921
Conversation
* Add optional `parent_span` argument to POTelSpan constructor and fix `start_child` * `run_id` is reused for the top level pipeline in langchain, so make sure to close that span or else we get orphans * Dont't use context manager enter/exit since we're doing manual span management * Set correct statuses while finishing the spans
❌ 253 Tests Failed:
View the top 3 failed tests by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
@@ -291,3 +291,17 @@ def _common_span_transaction_attributes_as_json(self, span): | |||
common_json["tags"] = tags | |||
|
|||
return common_json | |||
|
|||
def _log_debug_info(self): |
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.
this is just a helper for future span processor debugging
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 as far as I can tell, see one comment
def _log_debug_info(self): | ||
# type: () -> None | ||
import pprint | ||
|
||
pprint.pprint( | ||
{ | ||
format_span_id(span_id): [ | ||
(format_span_id(child.context.span_id), child.name) | ||
for child in children | ||
] | ||
for span_id, children in self._children_spans.items() | ||
} | ||
) |
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 to keep this?
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.
Nevermind, I see your comment now. Fine to keep
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.
yes, for now
parent_span
argument toPOTelSpan
constructor and fixstart_child
run_id
is reused for the top level pipeline, so make sure to close that span or else we get orphans