LogoLogo
WebsiteSlack
0.29
0.29
  • Get started
  • Clients
    • Install
    • CLI commands
    • Python API
    • Environments
    • Telemetry
    • Uninstall
  • Workloads
    • Realtime APIs
      • Example
      • Predictor
      • Configuration
      • Models
      • Parallelism
      • Server-side batching
      • Autoscaling
      • Statuses
      • Metrics
      • Multi-model
        • Example
        • Configuration
        • Caching
      • Traffic Splitter
        • Example
        • Configuration
      • Troubleshooting
    • Batch APIs
      • Example
      • Predictor
      • Configuration
      • Jobs
      • Statuses
    • Task APIs
      • Example
      • Definition
      • Configuration
      • Jobs
      • Statuses
    • Dependencies
      • Example
      • Python packages
      • System packages
      • Custom images
  • Clusters
    • Cortex Cloud on AWS
      • Install
      • Update
      • Security
      • Logging
      • Spot instances
      • Networking
        • Custom domain
        • HTTPS (via API Gateway)
        • VPC peering
      • Setting up kubectl
      • Uninstall
    • Cortex Cloud on GCP
      • Install
      • Logging
      • Credentials
      • Setting up kubectl
      • Uninstall
    • Cortex Core on Kubernetes
      • Install
      • Uninstall
    • Private Docker registry
Powered by GitBook
On this page
  1. Clusters
  2. Cortex Cloud on GCP

Logging

PreviousInstallNextCredentials

Last updated 4 years ago

By default, logs will be pushed to using fluent-bit. API logs are tagged with labels to help with log aggregation and filtering. Below are some sample Stackdriver queries:

RealtimeAPI:

resource.type="k8s_container"
resource.labels.cluster_name="<INSERT CLUSTER NAME>"
jsonPayload.labels.apiKind="RealtimeAPI"
jsonPayload.labels.apiName="<INSERT API NAME>"

TaskAPI:

resource.type="k8s_container"
resource.labels.cluster_name="<INSERT CLUSTER NAME>"
jsonPayload.labels.apiKind="TaskAPI"
jsonPayload.labels.apiName="<INSERT API NAME>"
jsonPayload.labels.jobID="<INSERT JOB ID>"

Please make sure to navigate to the project containing your cluster and adjust the time range accordingly before running queries.

Structured logging

You can use Cortex's logger in your Python code to log in JSON, which will enrich your logs with Cortex's metadata, and enable you to add custom metadata to the logs. See the structured logging docs for and APIs.

StackDriver
Task
Realtime