Skip to content

Guardrails Observability 2nd Pass #986

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

Merged
merged 22 commits into from
Aug 7, 2024
Merged

Guardrails Observability 2nd Pass #986

merged 22 commits into from
Aug 7, 2024

Conversation

CalebCourier
Copy link
Collaborator

@CalebCourier CalebCourier commented Aug 2, 2024

This PR adds an additional span at the Guard level and instruments additional span attributes on all spans collected including the OpenInference format.

We also have some commented out anomaly detection attributes. These are commented out because, with the current implementation, it would require shipping the all-MiniLM-L6-v2 model with the core package. We should look at other ways to support this or use a setting to turn it on or off.

There are also some minor refactors in this PR to avoid circular dependencies.

[EDIT]
In testing I noticed that if we called the default tracer methods (default_otlp_tracer or default_otel_collector_tracer) multiple times without refreshing the environment (like running the same notebook cell twice), duplicate span processors would be added to the TracerProvider causing duplicate spans in the output. We get around this by using a singleton pattern for now. I don't think this approach is perfect either since it essentially forces the use of only one resource, but advanced users can work around that by instantiating their own TracerProvider instead of using our lazy defaults.

@CalebCourier CalebCourier marked this pull request as ready for review August 5, 2024 17:04
@zsimjee zsimjee added this to the v0.5.4 Release Tracker milestone Aug 7, 2024
@zsimjee zsimjee merged commit 7cfa146 into main Aug 7, 2024
12 checks passed
@zsimjee zsimjee deleted the anomaly-observability branch August 7, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants