diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f46c0c168..6ce02f9fac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re ### Fixed - [#3257](https://github.com/thanos-io/thanos/pull/3257) Ruler: Prevent Ruler from crashing when using default DNS to lookup hosts that results in "No such hosts" errors. +- [#3331](https://github.com/thanos-io/thanos/pull/3331) Disable Azure blob exception logging ## [v0.16.0](https://github.com/thanos-io/thanos/releases) - Release in progress diff --git a/go.mod b/go.mod index 87554f58f9..78c2d54090 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/thanos-io/thanos require ( cloud.google.com/go v0.56.0 cloud.google.com/go/storage v1.6.0 + github.com/Azure/azure-pipeline-go v0.2.2 github.com/Azure/azure-storage-blob-go v0.8.0 github.com/NYTimes/gziphandler v1.1.1 github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d diff --git a/pkg/objstore/azure/helpers.go b/pkg/objstore/azure/helpers.go index 0189a49acf..a372878ac9 100644 --- a/pkg/objstore/azure/helpers.go +++ b/pkg/objstore/azure/helpers.go @@ -10,6 +10,7 @@ import ( "regexp" "time" + "github.com/Azure/azure-pipeline-go/pipeline" blob "github.com/Azure/azure-storage-blob-go/azblob" ) @@ -34,6 +35,14 @@ func getContainerURL(ctx context.Context, conf Config) (blob.ContainerURL, error p := blob.NewPipeline(c, blob.PipelineOptions{ Retry: retryOptions, Telemetry: blob.TelemetryOptions{Value: "Thanos"}, + RequestLog: blob.RequestLogOptions{ + // Log a warning if an operation takes longer than the specified duration. + // (-1=no logging; 0=default 3s threshold) + LogWarningIfTryOverThreshold: -1, + }, + Log: pipeline.LogOptions{ + ShouldLog: nil, + }, }) u, err := url.Parse(fmt.Sprintf("https://%s.%s", conf.StorageAccountName, conf.Endpoint)) if err != nil {