If you’re experiencing excessive logging for single LLM interactions, you can use the suppress_instrumentation
function to temporarily disable all future instrumentation.
from atla_insights import suppress_instrumentation
# This will suppress all future instrumentation
suppress_instrumentation()
Once you run this command, it will suppress all future instrumentation, which should reduce the volume of records being logged.
Conditional instrumentation
You can also conditionally suppress instrumentation based on your application logic:
from atla_insights import suppress_instrumentation
import os
# Only suppress in development
if os.getenv("ENVIRONMENT") == "development":
suppress_instrumentation()
Context-specific suppression
For more granular control, you might want to suppress instrumentation around specific operations:
from atla_insights import suppress_instrumentation, configure
def batch_process_data(data_items):
# Suppress instrumentation for batch operations
suppress_instrumentation()
for item in data_items:
process_item(item) # This won't be traced
# Re-enable for other operations
configure(token="<YOUR_TOKEN>") # Re-configure to re-enable
suppress_instrumentation()
disables all future instrumentation globally. Make sure this is the behavior you want, or consider using sampling or conditional logic instead.
Re-enabling Instrumentation
To re-enable instrumentation after suppressing it, simply reconfigure Atla:
from atla_insights import configure
# Re-enable instrumentation
configure(token="<YOUR_ATLA_INSIGHTS_TOKEN>")