googleapis / googleapis/google-cloud-go

logging: cloud run worker pool logs detectResource doesn't

Open
#13,460 0 comments 1 reaction 1 assignee Claimed by @gkevinzheng View on GitHub
api: logging triage me
Dominant language
Go
Stars
4.5k
Forks
1.6k
Avg merge
1d 13h
Merged PRs (30d)
109

Description

## Is your feature request related to a problem? Please describe.

I use Cloud run worker pools, and use `logger.Log(entry)` function to send logs to GCP. Then, notice that the logs doesn't show in observability-logs page (see attached image)

The logs view use these as filter.
```
resource.type = "cloud_run_worker_pool"
resource.labels.worker_pool_name = "application1"
resource.labels.location = "europe-west2"
```

Then, I found logs in logs explorer, with the following attributes.

```json
{
"textPayload": "logging message",
"insertId": "p059yafd82rdk",
"resource": {
"type": "project",
"labels": {
"project_id": "this-is-project-id"
}
},
"timestamp": "2025-12-10T05:49:44.257670713Z",
"severity": "DEBUG",
"logName": "projects/this-is-project-id/logs/application1",
"receiveTimestamp": "2025-12-10T05:49:45.274706140Z"
}
```

So, it missed some labels.

## Describe the solution you'd like
Update detectResource to support Cloud run worker pools.
https://github.com/googleapis/google-cloud-go/blob/f857a3998c672192d1cedda0059f3a8506fcd33d/logging/resource.go#L256

## Describe alternatives you've considered
N/A

## Additional context
Image

Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.