-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Bug Report
Describe the bug
The generated entries have logName fields like projects/exampleproject/logs/kube.var.log.containers.podname-5c9f6998f8-8sx9v_more-info-9b4cee7c11d8c2b1f8b8f168a9a71f546762ce3be9fa2a5b8a05b97c193287e9.log.
When creating logs-based metrics this causes high cardinality time-series.
https://cloud.google.com/logging/docs/logs-based-metrics/troubleshooting?_gl=1*yngloj*_ga*MjAwMzQwMDA4LjE3Mzc2MjQ0Nzk.*_ga_WH2QY8WWF5*MTczNzcwNTI2OS42LjEuMTczNzcwODY2OC4xNy4wLjA.#too-many-time-series
For quite a few services we just see logName: "projects/intrinsic-integration-tests/logs/stdout".
Documentaiton for log_key_name (https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver) links to
https://github.com/fluent/fluent-bit-docs/blob/master/pipeline/outputs/stackdriver_special_fields.md#log-entry-fields, but that does not explain how the value for logNam is determined nor how it can be configured.
Your Environment
- Version used: 3.2.4
- Configuration: https://github.com/googlecloudrobotics/core/blob/main/src/app_charts/base/fluent-bit-values.yaml
- Environment name and version (e.g. Kubernetes? What version?): GKE + kubeadm
- Operating System and version: COS (container optimized os)
Additional context
We're defining logs-based metrics to understand which container log how much. Having variance in the logName causes the metric to fail.