Skip to content
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

[DRAFT] otel-like recording #1168

Draft
wants to merge 39 commits into
base: main
Choose a base branch
from
Draft

[DRAFT] otel-like recording #1168

wants to merge 39 commits into from

Conversation

piotrm0
Copy link
Contributor

@piotrm0 piotrm0 commented May 31, 2024

This work has moved to another PR: #1346 . Keeping this around until the new PR is merged.

Other details that are good to know but need not be announced:

  • Changed implementation of recording to resemble that of OpenTelemetry. This is to make further work on otel compatibility easier. Wrapped functions now produce spans but do not serialize anything. Serialization is done only after a recording context is closed.
  • Reconstructs Records from spans collected in the process of executing a recording context. These records are available in the recording context as before and sent to the same places as before (i.e. to database, for feedback evaluation).
  • EXPERIMENTAL: Added Tru class argument otel_exporter to specify where to export spans. If specified, the spans that make up a record will be exported there whenever a record is created (upon recording context closure).
  • Removed ComponentView and related code as that is not being used and is being replaced by spans in the feature/traces work.
  • Factored out function wrapping that was done in trulens_eval.instruments (for tracing) and in trulens_eval.feedback.provider.endpoint.base (for cost tracking) into a common solution found in a new utility module trulens_eval.utils.wrap.
  • Adjusted EndpointCallback used for cost tracking to extent the generalized callable wrapping callbacks found in the new wrap module.
  • Updated existing endpoints to use the new cost tracking methodology.

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label May 31, 2024
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants