Skip to content

Logging with google-cloud-logging-logback on K8S: resources.labels are empty #2912

Description

@yanns

I'm trying the used structured logging with google-cloud-logging-logback on Kubernetes.
Most of the resource labels are empty, except project_id and zone:

 resource: {
  labels: {
   cluster_name: ""    
   container_name: ""    
   instance_id: ""    
   namespace_id: ""    
   pod_id: ""    
   project_id: "<project ID>"    
   zone: "<zone>"    
  }
  type: "container"   
 }

I guess the reason for this is that only project_id and zone are configured for resource of type container:

https://github.com/GoogleCloudPlatform/google-cloud-java/blob/937e49d7159c9327255e167f6339c51bb7372c37/google-cloud-logging/src/main/java/com/google/cloud/logging/MonitoredResourceUtil.java#L95

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: loggingIssues related to the Cloud Logging API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Sponsor
    SponsoredKunjungi sekarang
    Promo