-
Notifications
You must be signed in to change notification settings - Fork 197
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
[PLACEHOLDER] Otel-like tracing #1346
base: main
Are you sure you want to change the base?
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@@ -0,0 +1,146 @@ | |||
{ |
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.
Line #12. # Install zipkin python package:
Possible to show this with the standard opentelemetry collector instead of zipkin? https://opentelemetry.io/docs/collector/quick-start/
Reply via ReviewNB
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.
You mean the toy collector that merely outputs the spans to stdout which they show being sent to a text file in that example?
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.
Yeah, maybe in addition? Want to show more clearly what the spans look like.
Unrelatedly, how easy is it for someone to choose a different exporter? Should we show this for 2-3 of the most popular ones?
@@ -0,0 +1,146 @@ | |||
{ |
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.
Line #1. # Nested context managers.
what is the point of showing this nested context manager? what functionality is displayed?
Reply via ReviewNB
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.
It was for testing but I see that if this is a generic export example, a more interesting/more relevant recording is warranted. Will work on that.
@@ -0,0 +1,146 @@ | |||
{ |
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.
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.
The spans that were recorded during the invocations above.
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.
Would be good to keep output for this cell to show what the spans look like
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.
Need to figure out how to keep outputs in notebooks as the recent packaging change clears all notebook outputs.
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.
For docs at least.
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.
Ohh, looks like the clearing is done in the pre-commit hooks.
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.
@sfc-gh-chu : Is there a way to prevent the notebook output to be cleared during pre-commit or doc generation?
Is the addition of span types, where we can realize the benefit of easier selectors, planned for a future change? |
Placeholder. Splitting off into smaller pieces:
Experimental settings flags: experimental flags #1427
OTEL tracing behind experimental flag: OTEL import/export #1485
Description
Adds
trulens.core.preview
to manage preview/experimental feature flags.Enables otel-like tracing of spans if the appropriate flag is set.
*** Refactored a lot of imports in terms of module imports to avoid circular import issue. ***
Other details good to know for developers
As part of this PR, I had to convert a lot of imports of values to imports of modules instead to help alleviate circular import issues. That is, instead of
Were converted to
Following usage of
Tru
was in terms ofmod_tru.Tru
. This was already called out in our style guide (https://google.github.io/styleguide/pyguide.html#22-imports) but needs to be taken up more now as packaging/moduling is becoming more complex.Type of change
not work as expected)