In this document, interpret a.b.{x,y} as a.b.x and a.b.y.
Log labels
Log data that Google Cloud infrastructure writes can store application information in the
following LogEntry fields:
apphubapphubDestinationapphubSource
Typically, the apphub field is populated. The other fields are populated only when
the log entry records edge-like data, such as with VPC Flow Logs. Each of these fields store
an AppHub object,
which can list labels for an application, a service, and a workload.
The following illustrates the format of the apphub field:
apphub: {
application: {
container: "projects/my-project"
id: "my-app"
location: "my-app-location"
}
workload: {
criticalityType: "MEDIUM"
environmentType: "STAGING"
id: "my-workload-id"
}
}
Metric labels
Metric data from Google Cloud infrastructure includes the following metadata labels:
metadata.system_labels.apphub_application_{container,id,location}metadata.system_labels.apphub_{workload,service}_{criticality_type,environment_type,id}
Metric data from instrumentation you added to your applications can include the following metric labels:
metric.labels.apphub_application_{container,id,location}metric.labels.apphub_workload_{criticality_type,environment_type,id}
Trace resource attributes
Trace spans generated by instrumentation you added to your applications can include the following resource attributes:
gcp.apphub.application.{container,id,location}gcp.apphub.{workload,service}.{criticality_type,environment_type,id}
Alerting policy labels
Service and workload labels aren't automatically attached to alerting policies. However, you can associate an alerting policy with a specific workload or service by attaching labels with the following keys to the alerting policy:
apphub_application_locationapphub_application_idapphub_service_idorapphub_workload_id
When an alerting policy includes the previous keys, incidents for the policy are shown on the Application Monitoring dashboards.
For more information, see Associate an alerting policy with a service or workload.