Observability Auditor - Location Tracking
The Observability Auditor (lucid-observability-auditor) provides comprehensive LLM observability including location verification, telemetry collection, and TEE-signed traces.
π‘οΈ Use Case
- Data Residency: Enforce compliance with US/EU data sovereignty laws by tracking the TEE's hardware-anchored location.
- Geofencing: Monitor and record the geographical context of model inference.
- Audit Trail: Generate cryptographically signed evidence of where inference occurred.
π Implementation
This auditor tracks location data in the Request phase and emits signed measurements.
import os
from lucid_sdk import create_auditor, Proceed, Deny
builder = create_auditor(auditor_id="lucid-observability-auditor")
REQUIRED_REGION = os.getenv("REQUIRED_JURISDICTION", "US")
@builder.on_request
def track_location(data: dict, config: dict = None, lucid_context: dict = None):
# The SDK's underlying LucidClient communicates with 'Landmark' nodes
# to verify the hardware's physical proximity and jurisdiction.
# Get location context from the TEE environment
current_region = os.getenv("NODE_REGION", "US")
latitude = float(os.getenv("NODE_LATITUDE", "37.7749"))
longitude = float(os.getenv("NODE_LONGITUDE", "-122.4194"))
# Record location in the measurement
return Proceed(
jurisdiction=current_region,
latitude=latitude,
longitude=longitude,
location_verified=True
)
auditor = builder.build()
βΈοΈ Deployment Configuration
Add this to your auditors.yaml. Notice the use of environment variables to configure tracking options.
chain:
- name: lucid-observability-auditor
image: "lucid-observability-auditor:latest"
script: lucid-observability-auditor/main.py
port: 8092
env:
TRACE_SAMPLING_RATE: "1.0"
ENABLE_COST_TRACKING: "true"
VERIFIER_URL: "http://verifier-service:8000"
π Behavior
- Passive Monitoring: The auditor never blocks requests - it only records measurements.
- Location Tracking: Records the jurisdiction and coordinates where inference occurs.
- Attestation: These measurements are signed by the TEE hardware and sent to the Lucid Verifier.
- AI Passport: The final passport includes location verification assertions.