Skip to Content
Deploying ApplicationsApplication Logs

Application Logs

Managed clusters through Portal

Open the logs link for a deployment stage in your application’s detail view. Choose the cluster if the stage has multiple eligible clusters. Portal opens Grafana Explore with the Loki data source and the stage namespace selected. You can also select Open Grafana in a cluster’s observability component and choose Loki in Explore.

Use a namespace selector to find your application’s logs:

{namespace="APP_NAMESPACE"}

Add a text filter to narrow the result:

{namespace="APP_NAMESPACE"} |= "error"

Every Context member can query all telemetry in its eligible clusters. The initial namespace filter is editable; it is not an application permission. This browser route requires a ready managed observability add-on and VPN connector, but no cluster ingress or local port-forward. See Access cluster Grafana through Portal for prerequisites and troubleshooting.

Legacy Cloud Logging installations

The following instructions apply to the predecessor Cloud Logging data source. The managed-cluster add-on uses Loki instead.

Open Grafana for your environment.

Go to Explore

Set datasource to Cloud Logging

Select:

  • Log Bucket: _Default
  • View: _AllLogs

Queries

Get all logs for a given namespace

resource.type="k8s_container" resource.labels.namespace_name="platform-ingress"

Get all logs for a given container

resource.type="k8s_container" resource.labels.namespace_name="platform-ingress" resource.labels.container_name="traefik"