Skip to content

Cloud Run Jobs produce logs with incorrect resource type (not supported?) #1514

Closed
@kberezin-nshl

Description

@kberezin-nshl

Problem

Cloud Run Jobs environment and resource type detection is not supported by MonitoredResourceUtil and MetadataLoader

Steps to reproduce

Use the library's default configuration with Cloud Run Jobs.

Expected result

System out produces log entries with the following resource section:

resource: {
   labels: {
      job_name: "migrations"
      location: "us-central1"
      project_id: "prj-my-project"
   }
   type: "cloud_run_job"
}

Actual result

... whereas logs produced by the library have the following:

resource: {
   labels: {
      project_id: "prj-my-project"
   }
   type: "global"
}

what makes them invisible from Cloud Run Job's execution Logs UI, and you can only see them if you go to log explorer and filter out by "global" resource type.

Metadata

Metadata

Assignees

Labels

api: loggingIssues related to the googleapis/java-logging API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions