Skip to content

Commit

Permalink
Merge branch 'main' into helm-chart-tagged-6.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorwhitney authored Nov 20, 2024
2 parents 5cc23aa + 9decb65 commit ca558cc
Show file tree
Hide file tree
Showing 663 changed files with 46,266 additions and 19,190 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
id: go
- uses: actions/checkout@v4
- name: Lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
version: v1.61.0
args: --timeout=5m
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
".": "3.2.1",
".": "3.3.0",
"operator": "0.7.1"
}
227 changes: 225 additions & 2 deletions CHANGELOG.md

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions clients/pkg/promtail/targets/file/filetarget.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"sync"
"time"

"github.com/bmatcuk/doublestar"
"github.com/bmatcuk/doublestar/v4"
"github.com/fsnotify/fsnotify"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
Expand Down Expand Up @@ -246,7 +246,8 @@ func (t *FileTarget) sync() error {
matches = []string{t.path}
} else {
// Gets current list of files to tail.
matches, err = doublestar.Glob(t.path)
matches, err = doublestar.FilepathGlob(t.path)

if err != nil {
return errors.Wrap(err, "filetarget.sync.filepath.Glob")
}
Expand All @@ -255,7 +256,8 @@ func (t *FileTarget) sync() error {
if fi, err := os.Stat(t.pathExclude); err == nil && !fi.IsDir() {
matchesExcluded = []string{t.pathExclude}
} else {
matchesExcluded, err = doublestar.Glob(t.pathExclude)
matchesExcluded, err = doublestar.FilepathGlob(t.pathExclude)

if err != nil {
return errors.Wrap(err, "filetarget.sync.filepathexclude.Glob")
}
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/promtail/targets/file/filetargetmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"sync"

"github.com/bmatcuk/doublestar"
"github.com/bmatcuk/doublestar/v4"
"github.com/fsnotify/fsnotify"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
Expand Down
1 change: 1 addition & 0 deletions docs/sources/release-notes/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ weight: 100
Release notes for Loki are in the CHANGELOG for the release and
listed here by version number.

- [V3.3 release notes](https://grafana.com/docs/loki/<LOKI_VERSION>/release-notes/v3-3/)
- [V3.2 release notes](https://grafana.com/docs/loki/<LOKI_VERSION>/release-notes/v3-2/)
- [V3.1 release notes](https://grafana.com/docs/loki/<LOKI_VERSION>/release-notes/v3-1/)
- [V3.0 release notes](https://grafana.com/docs/loki/<LOKI_VERSION>/release-notes/v3-0/)
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/release-notes/v2-3.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: V2.3
description: Version 2.3 release notes
weight: 99
weight: 900
---

# V2.3
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/release-notes/v2-4.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: V2.4
description: Version 2.4 release notes
weight: 88
weight: 850
---

# V2.4
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/release-notes/v2-5.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: V2.5
description: Version 2.5 release notes
weight: 77
weight: 800
---

# V2.5
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/release-notes/v2-6.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: V2.6
description: Version 2.6 release notes
weight: 66
weight: 750
---

# V2.6
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/release-notes/v2-7.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: V2.7
description: Version 2.7 release notes
weight: 60
weight: 700
---

# V2.7
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/release-notes/v2-8.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: V2.8
description: Version 2.8 release notes
weight: 55
weight: 650
---

# V2.8
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/release-notes/v2-9.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: V2.9
description: Version 2.9 release notes
weight: 50
weight: 600
---

# V2.9
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/release-notes/v3-0.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: v3.0
description: Version 3.0 release notes.
weight: 30
weight: 550
---

# v3.0
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/release-notes/v3-1.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: v3.1
description: Version 3.1 release notes.
weight: 20
weight: 500
---

# v3.1
Expand Down
2 changes: 1 addition & 1 deletion docs/sources/release-notes/v3-2.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: v3.2
description: Version 3.2 release notes.
weight: 10
weight: 450
---

# v3.2
Expand Down
208 changes: 208 additions & 0 deletions docs/sources/release-notes/v3-3.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible
github.com/aws/aws-sdk-go v1.55.5
github.com/baidubce/bce-sdk-go v0.9.200
github.com/bmatcuk/doublestar v1.3.4
github.com/bmatcuk/doublestar/v4 v4.7.1
github.com/c2h5oh/datasize v0.0.0-20231215233829-aa82cc1e6500
github.com/cespare/xxhash/v2 v2.3.0
github.com/containerd/fifo v1.1.0
Expand Down Expand Up @@ -90,7 +90,7 @@ require (
github.com/segmentio/fasthash v1.0.3
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546
github.com/sony/gobreaker v0.5.0
github.com/sony/gobreaker/v2 v2.0.0
github.com/spf13/afero v1.11.0
github.com/stretchr/testify v1.9.0
github.com/uber/jaeger-client-go v2.30.0+incompatible
Expand Down Expand Up @@ -164,7 +164,7 @@ require (
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.1 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1 // indirect
github.com/dlclark/regexp2 v1.4.0 // indirect
github.com/dlclark/regexp2 v1.11.0 // indirect
github.com/ebitengine/purego v0.8.1 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
Expand Down Expand Up @@ -215,7 +215,7 @@ require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.3.0 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/alecthomas/chroma v0.10.0
github.com/alecthomas/chroma/v2 v2.14.0
github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 // indirect
github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a // indirect
github.com/armon/go-metrics v0.4.1 // indirect
Expand Down
20 changes: 14 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -915,10 +915,14 @@ github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm
github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk=
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM=
github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek=
github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s=
github.com/alecthomas/assert/v2 v2.7.0 h1:QtqSACNS3tF7oasA8CU6A6sXZSBDqnm7RfpLl9bZqbE=
github.com/alecthomas/assert/v2 v2.7.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/chroma/v2 v2.14.0 h1:R3+wzpnUArGcQz7fCETQBzO5n9IMNi13iIs46aU4V9E=
github.com/alecthomas/chroma/v2 v2.14.0/go.mod h1:QolEbTfmUHIMVpBqxeDnNBj2uoeI4EbYP4i6n68SG4I=
github.com/alecthomas/kingpin/v2 v2.4.0 h1:f48lwail6p8zpO1bC4TxtqACaGqHYA22qkHjHpqDjYY=
github.com/alecthomas/kingpin/v2 v2.4.0/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE=
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
Expand Down Expand Up @@ -1026,8 +1030,8 @@ github.com/bitly/go-hostpool v0.1.0 h1:XKmsF6k5el6xHG3WPJ8U0Ku/ye7njX7W81Ng7O2io
github.com/bitly/go-hostpool v0.1.0/go.mod h1:4gOCgp6+NZnVqlKyZ/iBZFTAJKembaVENUpMkpg42fw=
github.com/bluele/gcache v0.0.2 h1:WcbfdXICg7G/DGBh1PFfcirkWOQV+v077yF1pSy3DGw=
github.com/bluele/gcache v0.0.2/go.mod h1:m15KV+ECjptwSPxKhOhQoAFQVtUFjTVkc3H8o0t/fp0=
github.com/bmatcuk/doublestar v1.3.4 h1:gPypJ5xD31uhX6Tf54sDPUOBXTqKH4c9aPY66CyQrS0=
github.com/bmatcuk/doublestar v1.3.4/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE=
github.com/bmatcuk/doublestar/v4 v4.7.1 h1:fdDeAqgT47acgwd9bd9HxJRDmc9UAmPpc+2m0CXv75Q=
github.com/bmatcuk/doublestar/v4 v4.7.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
Expand Down Expand Up @@ -1163,8 +1167,8 @@ github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi
github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE=
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E=
github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/dnaeon/go-vcr v0.0.0-20180814043457-aafff18a5cc2/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
github.com/docker/distribution v2.6.0-rc.1.0.20170726174610-edc3ab29cdff+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
Expand Down Expand Up @@ -1934,6 +1938,8 @@ github.com/heroku/x v0.4.0 h1:Bd8DERAUIrxqQ8p2TAXEoUYIFHCvpP4UJYp1+o7KoPQ=
github.com/heroku/x v0.4.0/go.mod h1:3Ji2zMA37qO4BK/4yzXvjlDIUdeXJvArUm2PB0ZEW5g=
github.com/hetznercloud/hcloud-go/v2 v2.10.2 h1:9gyTUPhfNbfbS40Spgij5mV5k37bOZgt8iHKCbfGs5I=
github.com/hetznercloud/hcloud-go/v2 v2.10.2/go.mod h1:xQ+8KhIS62W0D78Dpi57jsufWh844gUw1az5OUvaeq8=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
Expand Down Expand Up @@ -2534,6 +2540,8 @@ github.com/soniah/gosnmp v1.25.0/go.mod h1:8YvfZxH388NIIw2A+X5z2Oh97VcNhtmxDLt5Q
github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
github.com/sony/gobreaker v0.5.0 h1:dRCvqm0P490vZPmy7ppEk2qCnCieBooFJ+YoXGYB+yg=
github.com/sony/gobreaker v0.5.0/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
github.com/sony/gobreaker/v2 v2.0.0 h1:23AaR4JQ65y4rz8JWMzgXw2gKOykZ/qfqYunll4OwJ4=
github.com/sony/gobreaker/v2 v2.0.0/go.mod h1:8JnRUz80DJ1/ne8M8v7nmTs2713i58nIt4s7XcGe/DI=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
Expand Down
25 changes: 13 additions & 12 deletions pkg/bloombuild/builder/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package builder
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"

"github.com/grafana/loki/v3/pkg/util/constants"
)

const (
metricsNamespace = "loki"
metricsSubsystem = "bloombuilder"

statusSuccess = "success"
Expand Down Expand Up @@ -34,32 +35,32 @@ type Metrics struct {
func NewMetrics(r prometheus.Registerer) *Metrics {
return &Metrics{
running: promauto.With(r).NewGauge(prometheus.GaugeOpts{
Namespace: metricsNamespace,
Namespace: constants.Loki,
Subsystem: metricsSubsystem,
Name: "running",
Help: "Value will be 1 if the bloom builder is currently running on this instance",
}),
processingTask: promauto.With(r).NewGauge(prometheus.GaugeOpts{
Namespace: metricsNamespace,
Namespace: constants.Loki,
Subsystem: metricsSubsystem,
Name: "processing_task",
Help: "Value will be 1 if the bloom builder is currently processing a task",
}),

taskStarted: promauto.With(r).NewCounter(prometheus.CounterOpts{
Namespace: metricsNamespace,
Namespace: constants.Loki,
Subsystem: metricsSubsystem,
Name: "task_started_total",
Help: "Total number of task started",
}),
taskCompleted: promauto.With(r).NewCounterVec(prometheus.CounterOpts{
Namespace: metricsNamespace,
Namespace: constants.Loki,
Subsystem: metricsSubsystem,
Name: "task_completed_total",
Help: "Total number of task completed",
}, []string{"status"}),
taskDuration: promauto.With(r).NewHistogramVec(prometheus.HistogramOpts{
Namespace: metricsNamespace,
Namespace: constants.Loki,
Subsystem: metricsSubsystem,
Name: "task_duration_seconds",
Help: "Time spent processing a task.",
Expand All @@ -73,34 +74,34 @@ func NewMetrics(r prometheus.Registerer) *Metrics {
}, []string{"status"}),

blocksReused: promauto.With(r).NewCounter(prometheus.CounterOpts{
Namespace: metricsNamespace,
Namespace: constants.Loki,
Subsystem: metricsSubsystem,
Name: "blocks_reused_total",
Help: "Number of overlapping bloom blocks reused when creating new blocks",
}),
blocksCreated: promauto.With(r).NewCounter(prometheus.CounterOpts{
Namespace: metricsNamespace,
Namespace: constants.Loki,
Subsystem: metricsSubsystem,
Name: "blocks_created_total",
Help: "Number of blocks created",
}),
metasCreated: promauto.With(r).NewCounter(prometheus.CounterOpts{
Namespace: metricsNamespace,
Namespace: constants.Loki,
Subsystem: metricsSubsystem,
Name: "metas_created_total",
Help: "Number of metas created",
}),

seriesPerTask: promauto.With(r).NewHistogram(prometheus.HistogramOpts{
Namespace: metricsNamespace,
Namespace: constants.Loki,
Subsystem: metricsSubsystem,
Name: "series_per_task",
Help: "Number of series during task processing. Includes series which copied from other blocks and don't need to be indexed",
// Up to 10M series per tenant, way more than what we expect given our max_global_streams_per_user limits
Buckets: prometheus.ExponentialBucketsRange(1, 10e6, 10),
}),
bytesPerTask: promauto.With(r).NewHistogram(prometheus.HistogramOpts{
Namespace: metricsNamespace,
Namespace: constants.Loki,
Subsystem: metricsSubsystem,
Name: "bytes_per_task",
Help: "Number of source bytes from chunks added during a task processing.",
Expand All @@ -109,7 +110,7 @@ func NewMetrics(r prometheus.Registerer) *Metrics {
}),

chunkSize: promauto.With(r).NewHistogram(prometheus.HistogramOpts{
Namespace: metricsNamespace,
Namespace: constants.Loki,
Subsystem: metricsSubsystem,
Name: "chunk_series_size",
Help: "Uncompressed size of chunks in a series",
Expand Down
Loading

0 comments on commit ca558cc

Please sign in to comment.