Hi team, I am using Guardrails' Profanity Check. And previously I have added manual instrumentation and my traces are shown in phoenix. I haven't added instrumentation for guardrail, but it appears in phoenix (see image). In the library there are these files included for telemetry tracing (see image - it is inside the guardrails library package). So how to disable tracing for guardrails ?
To disable tracing for Guardrails, you can use the GuardrailsInstrumentor().uninstrument() method. This method will unwrap the methods that were previously wrapped for tracing.Here's a code snippet to disable tracing for Guardrails: LBKSfrom openinference.instrumentation.guardrails import GuardrailsInstrumentorLBKS# Uninstrument Guardrails to disable tracing GuardrailsInstrumentor().uninstrument()LBKSThis will stop the Guardrails library from generating spans and sending them to Phoenix.Would you like more detail?Sources:
- Guardrails Instrumentation
- Guardrails Uninstrumentation Test
๐กย Hint: Mention RunLLM in the thread for followups.
