Skip to main content

Monitoring and Logging

Health checks

To verify that a container is up and running, check whether the gRPC port 8080 is responsive. The container implements the gRPC Health Check protocol, making it straightforward to configure monitoring probes.

Kubernetes probe configuration

startupProbe:
grpc:
port: 8080
periodSeconds: 1
failureThreshold: 30
livenessProbe:
grpc:
port: 8080
periodSeconds: 10

Logging

The container generates structured logs and prints them to STDOUT in JSON format. Example log entry:

{
"severity": "INFO",
"time": "2024-07-18T11:34:35.716694158Z",
"spans": [
{
"name": "grpc::verification::authenticity::perform_authenticity_verification",
"fields": {}
}
],
"fields": {
"message": "verification performed",
"verification": "AuthenticityVerification { metadata: AuthenticityVerificationMetadata { model: \"default/v7\", score: Some(0.02593305), subscores: AuthenticitySubscores { synthesis: Some(0.02593305), replay: Some(0.9999031) } }, chunks: \"REDACTED\" }"
}
}

Logs can be ingested into a cloud provider or a dedicated log platform:

Platform TypeExamples
Cloud providersAWS CloudWatch, Azure Monitor, Google Cloud Logging
Log platformsSplunk, ELK Stack, Datadog