truera / trulens

Evaluation and Tracking for LLM Experiments
https://www.trulens.org/
MIT License
2.17k stars 189 forks source link

span database #1608

Open sfc-gh-pmardziel opened 2 weeks ago

sfc-gh-pmardziel commented 2 weeks ago

Description

- Recognizing spans into the semantic categories not included (but the categories exist). Will bring this in from an old PR next.

- Feedback evaluation not included.

- Collector not included (though started in this PR).

Other details good to know for developers

Please include any other details of this change useful for TruLens developers.

Type of change


[!IMPORTANT] Integrates OpenTelemetry tracing into TruLens with new span management, semantic conventions, and database support.

  • Semantic Conventions:
    • Introduces trulens-semconv package for semantic conventions.
    • Defines SpanAttributes and SpanType in trace.py for span categorization.
  • Span Management:
    • Adds Span, SpanContext, and Tracer classes in otel.py for OTEL compatibility.
    • Implements LiveSpan, RecordingContextSpan, and LiveSpanCall in span.py for live tracing.
    • Implements TracerProvider and Tracer in trace.py for managing spans.
  • Database Integration:
    • Extends database schema with span support in orm.py and sqlalchemy.py.
    • Adds SpanIndex and span-related methods in base.py.
  • Miscellaneous:
    • Updates pyproject.toml to include opentelemetry-api and opentelemetry-sdk.
    • Introduces Collector class in otel.py for OTLP traces collection.

This description was created by Ellipsis for 406059ea942a5642834a3eddf5627bcf87f5c605. It will automatically update as commits are pushed.

review-notebook-app[bot] commented 2 weeks ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB