You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running log analysis shows that we can reduce number of log streams by dropping labels (reducing cardinality)
Label Name Unique Values Found In Streams
pod 14446 51201
unit 3775 10728
job 3756 89362
service_name 3595 89362
container 3585 51201
filename 1873 26083
namespace 151 51322
app_kubernetes_io_name 99 7737
instance 83 38161
__time_shard__ 49 55674
__stream_shard__ 3 1687
stream 2 51201
cluster 1 89362
flags 1 51201
This PR will remove filename as a label from log lines produced by the worker-nodes job.
The result will be less log streams produced because of lower cardinality and avoid issues hitting limit on number of streams in our Grafana instances which in turn caused loss in logs as mentioned in this incident https://dfdsit.statuspage.io/incidents/cq7qmzhv4j4v?utm_source=slack
This is awesome. Be aware that moving labels into to the log payload breaks things like structured logging among other things and impact the way you would write queries. I think we should consider if filename information should be kept at all?
a lot has slipped into the PR because of the fix to the Update CRDs and render helm templates workflow permission 🫠
samidbb
changed the title
remove filename as a unique label from grafana logs
drop filename label from grafana logs (worker-nodes logs)
Sep 16, 2026
samidbb
changed the title
drop filename label from grafana logs (worker-nodes logs)
Drop filename label from grafana logs (worker-nodes logs)
Sep 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Running log analysis shows that we can reduce number of log streams by dropping labels (reducing cardinality)
This PR will remove filename as a label from log lines produced by the worker-nodes job.
The result will be less log streams produced because of lower cardinality and avoid issues hitting limit on number of streams in our Grafana instances which in turn caused loss in logs as mentioned in this incident https://dfdsit.statuspage.io/incidents/cq7qmzhv4j4v?utm_source=slack
The effect in this PR tested using sandbox and Grafana test instance https://dfdsqa.grafana.net/explore?schemaVersion=1&panes=%7B%22lmf%22:%7B%22datasource%22:%22grafanacloud-logs%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bcluster%3D%5C%22cargo%5C%22,%20job%3D%5C%22integrations%2Fkubernetes%2Fworker-node%5C%22%7D%20%7C%3D%20%60%60%20%7C%20unpack%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22grafanacloud-logs%22%7D,%22editorMode%22:%22code%22,%22direction%22:%22backward%22%7D%5D,%22range%22:%7B%22from%22:%22now-15m%22,%22to%22:%22now%22%7D,%22panelsState%22:%7B%22logs%22:%7B%22sortOrder%22:%22Descending%22,%22visualisationType%22:%22table%22,%22displayedFields%22:%5B%22Time%22,%22detected_level%22,%22___LOG_LINE_BODY___%22,%22job%22,%22instance%22,%22filename%22%5D%7D%7D,%22compact%22:false%7D%7D