Adds trulens-semconv package to hold tracing attribute names and related. This package intentionally has no dependencies other than otel semconv packages.
Adds span schema as orm classes and span to/of orm methods.
Adds span "semantic categories" for known components like retrievers.
Adds span extensions to db base abstract class and the sqlalchemy implementation for inserting, selecting, deleting spans.
Adds some prototype abstractions to base DB class for pagination and queries.
Extended trulens.core.schema.types with classes organizing types for values we use across python, otel, and sql.
- 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
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to
not work as expected)
[ ] New Tests
[ ] This change includes re-generated golden test results
[ ] This change requires a documentation update
[!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 for 406059ea942a5642834a3eddf5627bcf87f5c605. It will automatically update as commits are pushed.
Description
Adds
trulens-semconv
package to hold tracing attribute names and related. This package intentionally has no dependencies other than otel semconv packages.Adds span schema as orm classes and span to/of orm methods.
Adds span "semantic categories" for known components like retrievers.
Adds span extensions to db base abstract class and the sqlalchemy implementation for inserting, selecting, deleting spans.
Adds some prototype abstractions to base DB class for pagination and queries.
Extended
trulens.core.schema.types
with classes organizing types for values we use across python, otel, and sql.- 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