Monitor Endpoints

Track custom metrics from your deployment endpoints by printing JSON metadata. Valohai automatically collects and visualizes these metrics.

Collect metrics

Print JSON with vh_metadata to log metrics from your endpoint:

import json

print(
    json.dumps(
        {
            "vh_metadata": {
                "accuracy": 0.9247,
                "best_guess": "dog",
                "confidence": 0.87,
            },
        },
    ),
)

Valohai parses this output and makes it available for visualization.

View metrics

Access deployment metrics from your deployment version:

  1. Open the Deployment tab

  2. Select your deployment

  3. Click on a version

  4. View metrics in the Monitoring tab

Available visualizations:

  • Time series charts (metrics over time)

  • Histograms (distribution of values)

  • Request logs (individual predictions)

Common metrics to track

Model performance:

Business metrics:

System metrics:

View endpoint logs

Access full logs for debugging or detailed inspection:

  1. Navigate to your deployment version

  2. Select an endpoint

  3. Click Log tab

  4. Filter by time range or search for specific events


Next: Learn how to troubleshoot failing endpoints.

Last updated

Was this helpful?