From 45bfcef7e21a7641513800475875ae3510947ebe Mon Sep 17 00:00:00 2001 From: Frederik Enste Date: Thu, 24 Oct 2024 09:41:19 +0200 Subject: [PATCH 1/7] otelzap: Add caller and stacktrace to attributes if present (#6268) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Adds caller information to the `log.Record` if the logger was created with `AddCaller()`. * Adds stack trace to the `log.Record` if the logger was created with `AddStacktrace(level)`. --------- Co-authored-by: Damien Mathieu <42@dmathieu.com> Co-authored-by: Robert PajÄ…k --- CHANGELOG.md | 1 + bridges/otelzap/core.go | 11 +++++++++ bridges/otelzap/core_test.go | 45 ++++++++++++++++++++++++++++++++++++ bridges/otelzap/go.mod | 2 +- 4 files changed, 58 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b5c995c081..301e53afdc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm For example, `[]string{"foo", "bar"}` attribute value is now transformed to `log.SliceValue(log.StringValue("foo"), log.StringValue("bar"))` instead of `log.String("[foo bar"])`. (#6254) - Add the `WithSource` option to the `go.opentelemetry.io/contrib/bridges/otelslog` log bridge to set the `code.*` attributes in the log record that includes the source location where the record was emitted. (#6253) - Add `ContextWithStartTime` and `StartTimeFromContext` to `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp`, which allows setting the start time using go context. (#6137) +- Set the `code.*` attributes in `go.opentelemetry.io/contrib/bridges/otelzap` if the `zap.Logger` was created with the `AddCaller` or `AddStacktrace` option. (#6268) ### Fixed diff --git a/bridges/otelzap/core.go b/bridges/otelzap/core.go index 4e222e37a6a..f2c25569152 100644 --- a/bridges/otelzap/core.go +++ b/bridges/otelzap/core.go @@ -41,6 +41,7 @@ import ( "go.opentelemetry.io/otel/log" "go.opentelemetry.io/otel/log/global" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" ) type config struct { @@ -200,6 +201,16 @@ func (o *Core) Write(ent zapcore.Entry, fields []zapcore.Field) error { r.SetSeverityText(ent.Level.String()) r.AddAttributes(o.attr...) + if ent.Caller.Defined { + r.AddAttributes( + log.String(string(semconv.CodeFilepathKey), ent.Caller.File), + log.Int(string(semconv.CodeLineNumberKey), ent.Caller.Line), + log.String(string(semconv.CodeFunctionKey), ent.Caller.Function), + ) + } + if ent.Stack != "" { + r.AddAttributes(log.String(string(semconv.CodeStacktraceKey), ent.Stack)) + } if len(fields) > 0 { ctx, attrbuf := convertField(fields) if ctx != nil { diff --git a/bridges/otelzap/core_test.go b/bridges/otelzap/core_test.go index 0d00794b409..bcd7130b714 100644 --- a/bridges/otelzap/core_test.go +++ b/bridges/otelzap/core_test.go @@ -17,6 +17,7 @@ import ( "go.opentelemetry.io/otel/log" "go.opentelemetry.io/otel/log/global" "go.opentelemetry.io/otel/log/logtest" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" ) var ( @@ -164,6 +165,50 @@ func TestCoreEnabled(t *testing.T) { assert.Equal(t, zap.InfoLevel.String(), got.SeverityText()) } +func TestCoreWithCaller(t *testing.T) { + rec := logtest.NewRecorder() + zc := NewCore(loggerName, WithLoggerProvider(rec)) + logger := zap.New(zc, zap.AddCaller()) + + logger.Info(testMessage) + got := rec.Result()[0].Records[0] + assert.Equal(t, testMessage, got.Body().AsString()) + assert.Equal(t, log.SeverityInfo, got.Severity()) + assert.Equal(t, zap.InfoLevel.String(), got.SeverityText()) + assert.Equal(t, 3, got.AttributesLen()) + got.WalkAttributes(func(kv log.KeyValue) bool { + switch kv.Key { + case string(semconv.CodeFilepathKey): + assert.Contains(t, kv.Value.AsString(), "core_test.go") + case string(semconv.CodeLineNumberKey): + assert.Positive(t, kv.Value.AsInt64()) + case string(semconv.CodeFunctionKey): + assert.Contains(t, kv.Value.AsString(), "TestCoreWithCaller") + default: + assert.Fail(t, "unexpected attribute key", kv.Key) + } + return true + }) +} + +func TestCoreWithStacktrace(t *testing.T) { + rec := logtest.NewRecorder() + zc := NewCore(loggerName, WithLoggerProvider(rec)) + logger := zap.New(zc, zap.AddStacktrace(zapcore.ErrorLevel)) + + logger.Error(testMessage) + got := rec.Result()[0].Records[0] + assert.Equal(t, testMessage, got.Body().AsString()) + assert.Equal(t, log.SeverityError, got.Severity()) + assert.Equal(t, zap.ErrorLevel.String(), got.SeverityText()) + assert.Equal(t, 1, got.AttributesLen()) + got.WalkAttributes(func(kv log.KeyValue) bool { + assert.Equal(t, string(semconv.CodeStacktraceKey), kv.Key) + assert.NotEmpty(t, kv.Value.AsString()) + return true + }) +} + func TestNewCoreConfiguration(t *testing.T) { t.Run("Default", func(t *testing.T) { r := logtest.NewRecorder() diff --git a/bridges/otelzap/go.mod b/bridges/otelzap/go.mod index abea363927a..68da34e7733 100644 --- a/bridges/otelzap/go.mod +++ b/bridges/otelzap/go.mod @@ -4,6 +4,7 @@ go 1.22 require ( github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/otel v1.31.0 go.opentelemetry.io/otel/log v0.7.0 go.uber.org/zap v1.27.0 ) @@ -13,7 +14,6 @@ require ( github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/otel v1.31.0 // indirect go.opentelemetry.io/otel/metric v1.31.0 // indirect go.opentelemetry.io/otel/trace v1.31.0 // indirect go.uber.org/multierr v1.11.0 // indirect From 4f837fe996b3dd0e663088d0ff9e3ca4da0989bf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 09:52:28 +0200 Subject: [PATCH 2/7] chore(deps): update otel/opentelemetry-collector-contrib docker tag to v0.112.0 (#6274) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Update | Change | |---|---|---| | [otel/opentelemetry-collector-contrib](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases) | minor | `0.111.0` -> `0.112.0` | --- ### Release Notes
open-telemetry/opentelemetry-collector-releases (otel/opentelemetry-collector-contrib) ### [`v0.112.0`](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/releases/tag/v0.112.0) [Compare Source](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/compare/v0.111.0...v0.112.0) Check the [v0.112.0 contrib changelog](https://redirect.github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.112.0) and the [v0.112.0 core changelog](https://redirect.github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.112.0) for changelogs on specific components. #### Changelog - [`e4e8f94`](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/commit/e4e8f94ae7dd3c0f8c63663fd10d5347010b9d58) \[chore] Prepare v0.112.0 release ([#​705](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/issues/705)) - [`240fd27`](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/commit/240fd27a9792869db62fa62d9ddf4bc14136c9d0) Add Google Cloud Monitoring receiver to contrib distribution ([#​699](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/issues/699)) - [`ba44d42`](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/commit/ba44d428bfc3328b4948f74653313d66140c93ed) Update manifest with new alpha components ([#​704](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/issues/704)) - [`8bef0bf`](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/commit/8bef0bfc6bb2c73b8d69dca60471caf7addee4e2) fix: add missing http ports to dockerfile expose statements ([#​702](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/issues/702)) - [`b07732c`](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/commit/b07732ce90ff422bcc67cd2dff388cf0dd1e2f54) Bump anchore/sbom-action from 0.17.3 to 0.17.4 ([#​700](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/issues/700)) - [`226dd5d`](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/commit/226dd5dfd9d9397c3bb88d1b7ea0f5e525fd7b06) \[enhancement] Add OCB docker image release ([#​671](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/issues/671)) - [`38ce901`](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/commit/38ce9018acb651a477a3f1e51f46ae33796f987c) Bump actions/upload-artifact from 4.4.0 to 4.4.3 ([#​695](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/issues/695)) - [`60b1d38`](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/commit/60b1d3850c71bbd9ce134ca73e6da2cf38b2cfb3) Bump anchore/sbom-action from 0.17.2 to 0.17.3 ([#​696](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/issues/696)) - [`13edbb7`](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/commit/13edbb72dcde8c28aa5a223d27c7f31fb21b74bd) Bump actions/checkout from 4.2.0 to 4.2.1 ([#​694](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/issues/694)) - [`3b59b8c`](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/commit/3b59b8c54de6ae9a760986d2781023c502d855db) Added a step to tidy go.mod files ([#​687](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/issues/687)) - [`d745106`](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/commit/d745106e8ddf096a9afed7f228fdbd567d5b4167) \[chore] Update goreleaser used in CI to v2.3.2 ([#​689](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/issues/689)) - [`1d10b81`](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/commit/1d10b81ed3dbe155e928e157cfbcdc0bc407e929) Bump github.com/goreleaser/goreleaser-pro/v2 from 2.2.0-pro to 2.3.2-pro ([#​672](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/issues/672)) - [`7a0e2c0`](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/commit/7a0e2c0d9e8fd459fd2fc1e72380dd2d04164af3) Bump docker/setup-buildx-action from 3.6.1 to 3.7.1 ([#​690](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/issues/690)) - [`adc2e29`](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/commit/adc2e29367182be5ba362cae9f6410ff505952dc) Bump sigstore/cosign-installer from 3.6.0 to 3.7.0 ([#​691](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/issues/691)) - [`7c1c3a9`](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/commit/7c1c3a96e0712da87a11fe6caf29056c8f8f91fb) remove unmaintained component ([#​686](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/issues/686)) - [`16ccd56`](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/commit/16ccd56cad06681c548dc195b7dabf9c140d928f) \[chore] refactor(contrib): remove replace directive for `go-ieproxy` package ([#​678](https://redirect.github.com/open-telemetry/opentelemetry-collector-releases/issues/678))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-go-contrib). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- examples/otel-collector/docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/otel-collector/docker-compose.yaml b/examples/otel-collector/docker-compose.yaml index b2e90eb9342..7bc2f858926 100644 --- a/examples/otel-collector/docker-compose.yaml +++ b/examples/otel-collector/docker-compose.yaml @@ -3,7 +3,7 @@ services: otel-collector: - image: otel/opentelemetry-collector-contrib:0.111.0 + image: otel/opentelemetry-collector-contrib:0.112.0 command: ["--config=/etc/otel-collector.yaml"] volumes: - ./otel-collector.yaml:/etc/otel-collector.yaml From 8f5ee6d3eeb10f9cfd2aa1cc40f4ca9dea517223 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 10:06:30 +0200 Subject: [PATCH 3/7] chore(deps): update kubernetes packages to v0.31.2 (#6273) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [k8s.io/api](https://redirect.github.com/kubernetes/api) | `v0.31.1` -> `v0.31.2` | [![age](https://developer.mend.io/api/mc/badges/age/go/k8s.io%2fapi/v0.31.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/k8s.io%2fapi/v0.31.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/k8s.io%2fapi/v0.31.1/v0.31.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/k8s.io%2fapi/v0.31.1/v0.31.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [k8s.io/apimachinery](https://redirect.github.com/kubernetes/apimachinery) | `v0.31.1` -> `v0.31.2` | [![age](https://developer.mend.io/api/mc/badges/age/go/k8s.io%2fapimachinery/v0.31.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/k8s.io%2fapimachinery/v0.31.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/k8s.io%2fapimachinery/v0.31.1/v0.31.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/k8s.io%2fapimachinery/v0.31.1/v0.31.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [k8s.io/client-go](https://redirect.github.com/kubernetes/client-go) | `v0.31.1` -> `v0.31.2` | [![age](https://developer.mend.io/api/mc/badges/age/go/k8s.io%2fclient-go/v0.31.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/k8s.io%2fclient-go/v0.31.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/k8s.io%2fclient-go/v0.31.1/v0.31.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/k8s.io%2fclient-go/v0.31.1/v0.31.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
kubernetes/api (k8s.io/api) ### [`v0.31.2`](https://redirect.github.com/kubernetes/api/compare/v0.31.1...v0.31.2) [Compare Source](https://redirect.github.com/kubernetes/api/compare/v0.31.1...v0.31.2)
kubernetes/apimachinery (k8s.io/apimachinery) ### [`v0.31.2`](https://redirect.github.com/kubernetes/apimachinery/compare/v0.31.1...v0.31.2) [Compare Source](https://redirect.github.com/kubernetes/apimachinery/compare/v0.31.1...v0.31.2)
kubernetes/client-go (k8s.io/client-go) ### [`v0.31.2`](https://redirect.github.com/kubernetes/client-go/compare/v0.31.1...v0.31.2) [Compare Source](https://redirect.github.com/kubernetes/client-go/compare/v0.31.1...v0.31.2)
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-go-contrib). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- detectors/aws/eks/go.mod | 6 +++--- detectors/aws/eks/go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/detectors/aws/eks/go.mod b/detectors/aws/eks/go.mod index d0c141bd79c..7b02c05d37d 100644 --- a/detectors/aws/eks/go.mod +++ b/detectors/aws/eks/go.mod @@ -6,8 +6,8 @@ require ( github.com/stretchr/testify v1.9.0 go.opentelemetry.io/otel v1.31.0 go.opentelemetry.io/otel/sdk v1.31.0 - k8s.io/apimachinery v0.31.1 - k8s.io/client-go v0.31.1 + k8s.io/apimachinery v0.31.2 + k8s.io/client-go v0.31.2 ) require ( @@ -46,7 +46,7 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.31.1 // indirect + k8s.io/api v0.31.2 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20241009091222-67ed5848f094 // indirect k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 // indirect diff --git a/detectors/aws/eks/go.sum b/detectors/aws/eks/go.sum index 79ab391d45d..168d79a9d0c 100644 --- a/detectors/aws/eks/go.sum +++ b/detectors/aws/eks/go.sum @@ -134,12 +134,12 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= -k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= -k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= -k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= -k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= +k8s.io/api v0.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= +k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= +k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= +k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= +k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20241009091222-67ed5848f094 h1:MErs8YA0abvOqJ8gIupA1Tz6PKXYUw34XsGlA7uSL1k= From c0c1667bbe27211fdb6b20ff36e11a1edab95c0c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 12:48:24 -0700 Subject: [PATCH 4/7] chore(deps): update module github.com/prometheus/common to v0.60.1 (#6275) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/prometheus/common](https://redirect.github.com/prometheus/common) | `v0.60.0` -> `v0.60.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.60.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.60.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.60.0/v0.60.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.60.0/v0.60.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
prometheus/common (github.com/prometheus/common) ### [`v0.60.1`](https://redirect.github.com/prometheus/common/releases/tag/v0.60.1) [Compare Source](https://redirect.github.com/prometheus/common/compare/v0.60.0...v0.60.1) ##### What's Changed - promslog: Only log basename, not full path by [@​roidelapluie](https://redirect.github.com/roidelapluie) in [https://github.com/prometheus/common/pull/705](https://redirect.github.com/prometheus/common/pull/705) - Reload certificates even when no CA is used by [@​roidelapluie](https://redirect.github.com/roidelapluie) in [https://github.com/prometheus/common/pull/707](https://redirect.github.com/prometheus/common/pull/707) - Synchronize common files from prometheus/prometheus by [@​prombot](https://redirect.github.com/prombot) in [https://github.com/prometheus/common/pull/701](https://redirect.github.com/prometheus/common/pull/701) **Full Changelog**: https://github.com/prometheus/common/compare/v0.60.0...v0.60.1
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-go-contrib). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- bridges/prometheus/go.mod | 2 +- bridges/prometheus/go.sum | 4 ++-- config/go.mod | 2 +- config/go.sum | 4 ++-- examples/prometheus/go.mod | 2 +- examples/prometheus/go.sum | 4 ++-- exporters/autoexport/go.mod | 2 +- exporters/autoexport/go.sum | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bridges/prometheus/go.mod b/bridges/prometheus/go.mod index 27c689568ad..ca3f673cd83 100644 --- a/bridges/prometheus/go.mod +++ b/bridges/prometheus/go.mod @@ -21,7 +21,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/common v0.60.0 // indirect + github.com/prometheus/common v0.60.1 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/rogpeppe/go-internal v1.13.1 // indirect go.opentelemetry.io/otel/metric v1.31.0 // indirect diff --git a/bridges/prometheus/go.sum b/bridges/prometheus/go.sum index 96eb7480697..52b9843911a 100644 --- a/bridges/prometheus/go.sum +++ b/bridges/prometheus/go.sum @@ -28,8 +28,8 @@ github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+ github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= -github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= +github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc= +github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= diff --git a/config/go.mod b/config/go.mod index eb9b4ef4fd1..428f9ba56bb 100644 --- a/config/go.mod +++ b/config/go.mod @@ -37,7 +37,7 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.60.0 // indirect + github.com/prometheus/common v0.60.1 // indirect github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect diff --git a/config/go.sum b/config/go.sum index a2cf7147d1c..68285f78541 100644 --- a/config/go.sum +++ b/config/go.sum @@ -33,8 +33,8 @@ github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+ github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= -github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= +github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc= +github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= diff --git a/examples/prometheus/go.mod b/examples/prometheus/go.mod index 8dd904e8c82..29d4e2c6dd6 100644 --- a/examples/prometheus/go.mod +++ b/examples/prometheus/go.mod @@ -19,7 +19,7 @@ require ( github.com/klauspost/compress v1.17.11 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.60.0 // indirect + github.com/prometheus/common v0.60.1 // indirect github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/otel/sdk v1.31.0 // indirect go.opentelemetry.io/otel/trace v1.31.0 // indirect diff --git a/examples/prometheus/go.sum b/examples/prometheus/go.sum index 0161fc6daea..4c63403f64b 100644 --- a/examples/prometheus/go.sum +++ b/examples/prometheus/go.sum @@ -25,8 +25,8 @@ github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+ github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= -github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= +github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc= +github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= diff --git a/exporters/autoexport/go.mod b/exporters/autoexport/go.mod index 16cd3afc0d2..0244c0d92b9 100644 --- a/exporters/autoexport/go.mod +++ b/exporters/autoexport/go.mod @@ -39,7 +39,7 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.60.0 // indirect + github.com/prometheus/common v0.60.1 // indirect github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/otel/log v0.7.0 // indirect go.opentelemetry.io/otel/metric v1.31.0 // indirect diff --git a/exporters/autoexport/go.sum b/exporters/autoexport/go.sum index 125da9b1865..f4671e30862 100644 --- a/exporters/autoexport/go.sum +++ b/exporters/autoexport/go.sum @@ -33,8 +33,8 @@ github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+ github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= -github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= +github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc= +github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= From 6ed446fdfe89f760c008cfd4ff5732cf4d550631 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 25 Oct 2024 14:16:16 -0700 Subject: [PATCH 5/7] fix(deps): update module github.com/aws/aws-sdk-go-v2/service/s3 to v1.66.1 (#6276) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/aws/aws-sdk-go-v2/service/s3](https://redirect.github.com/aws/aws-sdk-go-v2) | `v1.66.0` -> `v1.66.1` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2faws%2faws-sdk-go-v2%2fservice%2fs3/v1.66.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2faws%2faws-sdk-go-v2%2fservice%2fs3/v1.66.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2faws%2faws-sdk-go-v2%2fservice%2fs3/v1.66.0/v1.66.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2faws%2faws-sdk-go-v2%2fservice%2fs3/v1.66.0/v1.66.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-go-contrib). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .../github.com/aws/aws-lambda-go/otellambda/example/go.mod | 2 +- .../github.com/aws/aws-lambda-go/otellambda/example/go.sum | 4 ++-- .../github.com/aws/aws-sdk-go-v2/otelaws/example/go.mod | 2 +- .../github.com/aws/aws-sdk-go-v2/otelaws/example/go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/instrumentation/github.com/aws/aws-lambda-go/otellambda/example/go.mod b/instrumentation/github.com/aws/aws-lambda-go/otellambda/example/go.mod index e1dc5e821fa..88d13030176 100644 --- a/instrumentation/github.com/aws/aws-lambda-go/otellambda/example/go.mod +++ b/instrumentation/github.com/aws/aws-lambda-go/otellambda/example/go.mod @@ -12,7 +12,7 @@ replace ( require ( github.com/aws/aws-lambda-go v1.47.0 github.com/aws/aws-sdk-go-v2/config v1.28.0 - github.com/aws/aws-sdk-go-v2/service/s3 v1.66.0 + github.com/aws/aws-sdk-go-v2/service/s3 v1.66.1 go.opentelemetry.io/contrib/detectors/aws/lambda v0.56.0 go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-lambda-go/otellambda v0.56.0 go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.56.0 diff --git a/instrumentation/github.com/aws/aws-lambda-go/otellambda/example/go.sum b/instrumentation/github.com/aws/aws-lambda-go/otellambda/example/go.sum index 01f1de32e4f..7ee8205266e 100644 --- a/instrumentation/github.com/aws/aws-lambda-go/otellambda/example/go.sum +++ b/instrumentation/github.com/aws/aws-lambda-go/otellambda/example/go.sum @@ -30,8 +30,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 h1:s7NA1SOw8 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2/go.mod h1:fnjjWyAW/Pj5HYOxl9LJqWtEwS7W2qgcRLWP+uWbss0= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.2 h1:t7iUP9+4wdc5lt3E41huP+GvQZJD38WLsgVp4iOtAjg= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.2/go.mod h1:/niFCtmuQNxqx9v8WAPq5qh7EH25U4BF6tjoyq9bObM= -github.com/aws/aws-sdk-go-v2/service/s3 v1.66.0 h1:xA6XhTF7PE89BCNHJbQi8VvPzcgMtmGC5dr8S8N7lHk= -github.com/aws/aws-sdk-go-v2/service/s3 v1.66.0/go.mod h1:cB6oAuus7YXRZhWCc1wIwPywwZ1XwweNp2TVAEGYeB8= +github.com/aws/aws-sdk-go-v2/service/s3 v1.66.1 h1:MkQ4unegQEStiQYmfFj+Aq5uTp265ncSmm0XTQwDwi0= +github.com/aws/aws-sdk-go-v2/service/s3 v1.66.1/go.mod h1:cB6oAuus7YXRZhWCc1wIwPywwZ1XwweNp2TVAEGYeB8= github.com/aws/aws-sdk-go-v2/service/sqs v1.36.2 h1:kmbcoWgbzfh5a6rvfjOnfHSGEqD13qu1GfTPRZqg0FI= github.com/aws/aws-sdk-go-v2/service/sqs v1.36.2/go.mod h1:/UPx74a3M0WYeT2yLQYG/qHhkPlPXd6TsppfGgy2COk= github.com/aws/aws-sdk-go-v2/service/sso v1.24.2 h1:bSYXVyUzoTHoKalBmwaZxs97HU9DWWI3ehHSAMa7xOk= diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/example/go.mod b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/example/go.mod index 5267aa94af5..682c4699395 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/example/go.mod +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/example/go.mod @@ -8,7 +8,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.32.2 github.com/aws/aws-sdk-go-v2/config v1.28.0 github.com/aws/aws-sdk-go-v2/service/dynamodb v1.36.2 - github.com/aws/aws-sdk-go-v2/service/s3 v1.66.0 + github.com/aws/aws-sdk-go-v2/service/s3 v1.66.1 go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.56.0 go.opentelemetry.io/otel v1.31.0 go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/example/go.sum b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/example/go.sum index 80ed795b998..f14d00d7805 100644 --- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/example/go.sum +++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/example/go.sum @@ -28,8 +28,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 h1:s7NA1SOw8 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2/go.mod h1:fnjjWyAW/Pj5HYOxl9LJqWtEwS7W2qgcRLWP+uWbss0= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.2 h1:t7iUP9+4wdc5lt3E41huP+GvQZJD38WLsgVp4iOtAjg= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.2/go.mod h1:/niFCtmuQNxqx9v8WAPq5qh7EH25U4BF6tjoyq9bObM= -github.com/aws/aws-sdk-go-v2/service/s3 v1.66.0 h1:xA6XhTF7PE89BCNHJbQi8VvPzcgMtmGC5dr8S8N7lHk= -github.com/aws/aws-sdk-go-v2/service/s3 v1.66.0/go.mod h1:cB6oAuus7YXRZhWCc1wIwPywwZ1XwweNp2TVAEGYeB8= +github.com/aws/aws-sdk-go-v2/service/s3 v1.66.1 h1:MkQ4unegQEStiQYmfFj+Aq5uTp265ncSmm0XTQwDwi0= +github.com/aws/aws-sdk-go-v2/service/s3 v1.66.1/go.mod h1:cB6oAuus7YXRZhWCc1wIwPywwZ1XwweNp2TVAEGYeB8= github.com/aws/aws-sdk-go-v2/service/sqs v1.36.2 h1:kmbcoWgbzfh5a6rvfjOnfHSGEqD13qu1GfTPRZqg0FI= github.com/aws/aws-sdk-go-v2/service/sqs v1.36.2/go.mod h1:/UPx74a3M0WYeT2yLQYG/qHhkPlPXd6TsppfGgy2COk= github.com/aws/aws-sdk-go-v2/service/sso v1.24.2 h1:bSYXVyUzoTHoKalBmwaZxs97HU9DWWI3ehHSAMa7xOk= From f3c51a19bfde47bc3ae1f20bd0704be93b277809 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 27 Oct 2024 08:40:51 -0700 Subject: [PATCH 6/7] fix(deps): update module github.com/atombender/go-jsonschema to v0.17.0 (#6278) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/atombender/go-jsonschema](https://redirect.github.com/atombender/go-jsonschema) | `v0.16.0` -> `v0.17.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fatombender%2fgo-jsonschema/v0.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fatombender%2fgo-jsonschema/v0.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fatombender%2fgo-jsonschema/v0.16.0/v0.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fatombender%2fgo-jsonschema/v0.16.0/v0.17.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
atombender/go-jsonschema (github.com/atombender/go-jsonschema) ### [`v0.17.0`](https://redirect.github.com/omissis/go-jsonschema/releases/tag/v0.17.0) [Compare Source](https://redirect.github.com/atombender/go-jsonschema/compare/v0.16.0...v0.17.0) #### Highlights - Implement pattern validation for strings - Implement numeric validation - Introduce unmarshalling for additional properties - Update go to 1.22.8 in ci and dev - Allow CustomNameTypes to specify nillability #### What's Changed - chore(deps): update actions/checkout digest to [`1d96c77`](https://redirect.github.com/atombender/go-jsonschema/commit/1d96c77) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/219](https://redirect.github.com/omissis/go-jsonschema/pull/219) - chore(deps): update actions/checkout digest to [`0ad4b8f`](https://redirect.github.com/atombender/go-jsonschema/commit/0ad4b8f) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/221](https://redirect.github.com/omissis/go-jsonschema/pull/221) - Allow `CustomNameType`s to specify nillability by [@​andrew-farries](https://redirect.github.com/andrew-farries) in [https://github.com/omissis/go-jsonschema/pull/220](https://redirect.github.com/omissis/go-jsonschema/pull/220) - chore(deps): update dependency golangci-lint to v1.58.0 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/222](https://redirect.github.com/omissis/go-jsonschema/pull/222) - fix(deps): update module golang.org/x/exp to v0.0.0-20240506185415-9bf2ced13842 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/223](https://redirect.github.com/omissis/go-jsonschema/pull/223) - chore(deps): update golang docker tag to v1.22.3 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/224](https://redirect.github.com/omissis/go-jsonschema/pull/224) - chore(deps): update actions/checkout digest to [`44c2b7a`](https://redirect.github.com/atombender/go-jsonschema/commit/44c2b7a) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/225](https://redirect.github.com/omissis/go-jsonschema/pull/225) - chore(deps): update dependency golangci-lint to v1.58.1 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/226](https://redirect.github.com/omissis/go-jsonschema/pull/226) - chore(deps): update actions/checkout digest to [`0ad4b8f`](https://redirect.github.com/atombender/go-jsonschema/commit/0ad4b8f) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/227](https://redirect.github.com/omissis/go-jsonschema/pull/227) - chore(deps): update dependency golangci-lint to v1.58.2 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/228](https://redirect.github.com/omissis/go-jsonschema/pull/228) - chore(deps): update actions/checkout digest to [`a5ac7e5`](https://redirect.github.com/atombender/go-jsonschema/commit/a5ac7e5) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/229](https://redirect.github.com/omissis/go-jsonschema/pull/229) - fix(deps): update golang.org/x/exp digest to [`4c93da0`](https://redirect.github.com/atombender/go-jsonschema/commit/4c93da0) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/230](https://redirect.github.com/omissis/go-jsonschema/pull/230) - chore(deps): update dependency golangci-lint to v1.59.0 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/232](https://redirect.github.com/omissis/go-jsonschema/pull/232) - fix(deps): update golang.org/x/exp digest to [`23cca88`](https://redirect.github.com/atombender/go-jsonschema/commit/23cca88) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/233](https://redirect.github.com/omissis/go-jsonschema/pull/233) - fix(deps): update golang.org/x/exp digest to [`404ba88`](https://redirect.github.com/atombender/go-jsonschema/commit/404ba88) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/234](https://redirect.github.com/omissis/go-jsonschema/pull/234) - fix(deps): update golang.org/x/exp digest to [`fd00a4e`](https://redirect.github.com/atombender/go-jsonschema/commit/fd00a4e) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/235](https://redirect.github.com/omissis/go-jsonschema/pull/235) - fix(deps): update golang.org/x/exp digest to [`fc45aab`](https://redirect.github.com/atombender/go-jsonschema/commit/fc45aab) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/236](https://redirect.github.com/omissis/go-jsonschema/pull/236) - chore(deps): update dependency golang to v1.22.4 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/237](https://redirect.github.com/omissis/go-jsonschema/pull/237) - docs: correct `go` version requirement by [@​jamietanna](https://redirect.github.com/jamietanna) in [https://github.com/omissis/go-jsonschema/pull/240](https://redirect.github.com/omissis/go-jsonschema/pull/240) - chore(deps): update goreleaser/goreleaser-action action to v6 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/238](https://redirect.github.com/omissis/go-jsonschema/pull/238) - chore(deps): update dependency golangci-lint to v1.59.1 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/245](https://redirect.github.com/omissis/go-jsonschema/pull/245) - chore(deps): update actions/checkout digest to [`692973e`](https://redirect.github.com/atombender/go-jsonschema/commit/692973e) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/247](https://redirect.github.com/omissis/go-jsonschema/pull/247) - fix(deps): update golang.org/x/exp digest to [`7f521ea`](https://redirect.github.com/atombender/go-jsonschema/commit/7f521ea) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/248](https://redirect.github.com/omissis/go-jsonschema/pull/248) - fix(deps): update module github.com/spf13/cobra to v1.8.1 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/249](https://redirect.github.com/omissis/go-jsonschema/pull/249) - fix(deps): update golang.org/x/exp digest to [`46b0784`](https://redirect.github.com/atombender/go-jsonschema/commit/46b0784) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/252](https://redirect.github.com/omissis/go-jsonschema/pull/252) - chore(deps): update dependency golang to v1.22.5 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/253](https://redirect.github.com/omissis/go-jsonschema/pull/253) - fix(deps): update module github.com/goccy/go-yaml to v1.12.0 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/254](https://redirect.github.com/omissis/go-jsonschema/pull/254) - fix(deps): update golang.org/x/exp digest to [`e3f2596`](https://redirect.github.com/atombender/go-jsonschema/commit/e3f2596) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/255](https://redirect.github.com/omissis/go-jsonschema/pull/255) - fix(deps): update golang.org/x/exp digest to [`8a7402a`](https://redirect.github.com/atombender/go-jsonschema/commit/8a7402a) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/256](https://redirect.github.com/omissis/go-jsonschema/pull/256) - chore(deps): update dependency golang to v1.22.6 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/258](https://redirect.github.com/omissis/go-jsonschema/pull/258) - fix(deps): update golang.org/x/exp digest to [`0cdaa3a`](https://redirect.github.com/atombender/go-jsonschema/commit/0cdaa3a) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/260](https://redirect.github.com/omissis/go-jsonschema/pull/260) - chore(deps): update dependency golang to v1.23.0 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/261](https://redirect.github.com/omissis/go-jsonschema/pull/261) - chore(deps): update dependency golangci-lint to v1.60.0 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/262](https://redirect.github.com/omissis/go-jsonschema/pull/262) - chore(deps): update dependency golangci-lint to v1.60.1 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/263](https://redirect.github.com/omissis/go-jsonschema/pull/263) - chore(deps): update dependency shfmt to v3.9.0 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/265](https://redirect.github.com/omissis/go-jsonschema/pull/265) - chore(deps): update dependency golangci-lint to v1.60.2 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/266](https://redirect.github.com/omissis/go-jsonschema/pull/266) - fix(deps): update golang.org/x/exp digest to [`778ce7b`](https://redirect.github.com/atombender/go-jsonschema/commit/778ce7b) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/267](https://redirect.github.com/omissis/go-jsonschema/pull/267) - fix(deps): update golang.org/x/exp digest to [`9b4947d`](https://redirect.github.com/atombender/go-jsonschema/commit/9b4947d) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/268](https://redirect.github.com/omissis/go-jsonschema/pull/268) - chore(deps): update dependency golangci-lint to v1.60.3 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/269](https://redirect.github.com/omissis/go-jsonschema/pull/269) - fix(deps): update golang.org/x/exp digest to [`e7e105d`](https://redirect.github.com/atombender/go-jsonschema/commit/e7e105d) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/270](https://redirect.github.com/omissis/go-jsonschema/pull/270) - chore(deps): update dependency golang to v1.23.1 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/271](https://redirect.github.com/omissis/go-jsonschema/pull/271) - chore(deps): update dependency golangci-lint to v1.61.0 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/273](https://redirect.github.com/omissis/go-jsonschema/pull/273) - chore: update deps [`2024091`](https://redirect.github.com/atombender/go-jsonschema/commit/20240914) by [@​omissis](https://redirect.github.com/omissis) in [https://github.com/omissis/go-jsonschema/pull/274](https://redirect.github.com/omissis/go-jsonschema/pull/274) - Add pattern, support reference constraints on primitives, and add number/integer constraints by [@​nolag](https://redirect.github.com/nolag) in [https://github.com/omissis/go-jsonschema/pull/264](https://redirect.github.com/omissis/go-jsonschema/pull/264) - fix(deps): update module github.com/stretchr/testify to v1 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/277](https://redirect.github.com/omissis/go-jsonschema/pull/277) - chore(deps): update dependency go to v1.23.2 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/286](https://redirect.github.com/omissis/go-jsonschema/pull/286) - chore(deps): update dependency golang to v1.23.2 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/287](https://redirect.github.com/omissis/go-jsonschema/pull/287) - fix(deps): update golang.org/x/exp digest to [`225e2ab`](https://redirect.github.com/atombender/go-jsonschema/commit/225e2ab) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/289](https://redirect.github.com/omissis/go-jsonschema/pull/289) - chore(deps): update actions/checkout digest to [`eef6144`](https://redirect.github.com/atombender/go-jsonschema/commit/eef6144) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/290](https://redirect.github.com/omissis/go-jsonschema/pull/290) - fix(deps): update golang.org/x/exp digest to [`f66d83c`](https://redirect.github.com/atombender/go-jsonschema/commit/f66d83c) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/292](https://redirect.github.com/omissis/go-jsonschema/pull/292) - chore(deps): update dependency shfmt to v3.10.0 by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/294](https://redirect.github.com/omissis/go-jsonschema/pull/294) - chore(deps): update actions/checkout digest to [`11bd719`](https://redirect.github.com/atombender/go-jsonschema/commit/11bd719) by [@​renovate](https://redirect.github.com/renovate) in [https://github.com/omissis/go-jsonschema/pull/298](https://redirect.github.com/omissis/go-jsonschema/pull/298) - Additional Properties do not get unmarshalled by [@​omissis](https://redirect.github.com/omissis) in [https://github.com/omissis/go-jsonschema/pull/278](https://redirect.github.com/omissis/go-jsonschema/pull/278) - update go to 1.22.8 by [@​omissis](https://redirect.github.com/omissis) in [https://github.com/omissis/go-jsonschema/pull/299](https://redirect.github.com/omissis/go-jsonschema/pull/299) #### New Contributors - [@​andrew-farries](https://redirect.github.com/andrew-farries) made their first contribution in [https://github.com/omissis/go-jsonschema/pull/220](https://redirect.github.com/omissis/go-jsonschema/pull/220) - [@​jamietanna](https://redirect.github.com/jamietanna) made their first contribution in [https://github.com/omissis/go-jsonschema/pull/240](https://redirect.github.com/omissis/go-jsonschema/pull/240) - [@​nolag](https://redirect.github.com/nolag) made their first contribution in [https://github.com/omissis/go-jsonschema/pull/264](https://redirect.github.com/omissis/go-jsonschema/pull/264) **Full Changelog**: https://github.com/omissis/go-jsonschema/compare/v0.16.0...v0.17.0
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-go-contrib). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- tools/go.mod | 8 ++++---- tools/go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/go.mod b/tools/go.mod index e68c4596b93..9e3f2f5bb61 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -5,7 +5,7 @@ go 1.22.1 exclude github.com/blizzy78/varnamelen v0.6.1 require ( - github.com/atombender/go-jsonschema v0.16.0 + github.com/atombender/go-jsonschema v0.17.0 github.com/client9/misspell v0.3.4 github.com/golangci/golangci-lint v1.61.0 github.com/itchyny/gojq v0.12.16 @@ -14,7 +14,7 @@ require ( go.opentelemetry.io/build-tools/crosslink v0.14.0 go.opentelemetry.io/build-tools/gotmpl v0.14.0 go.opentelemetry.io/build-tools/multimod v0.14.0 - golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 + golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c golang.org/x/tools v0.26.0 golang.org/x/vuln v1.1.3 ) @@ -84,7 +84,7 @@ require ( github.com/go-viper/mapstructure/v2 v2.1.0 // indirect github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect github.com/gobwas/glob v0.2.3 // indirect - github.com/goccy/go-yaml v1.11.3 // indirect + github.com/goccy/go-yaml v1.12.0 // indirect github.com/gofrs/flock v0.12.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect @@ -214,7 +214,7 @@ require ( golang.org/x/sys v0.26.0 // indirect golang.org/x/telemetry v0.0.0-20240522233618-39ace7a40ae7 // indirect golang.org/x/text v0.19.0 // indirect - golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect + golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect diff --git a/tools/go.sum b/tools/go.sum index bdb17c13e4c..2fc3ce59a8d 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -51,8 +51,8 @@ github.com/ashanbrown/forbidigo v1.6.0 h1:D3aewfM37Yb3pxHujIPSpTf6oQk9sc9WZi8ger github.com/ashanbrown/forbidigo v1.6.0/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= -github.com/atombender/go-jsonschema v0.16.0 h1:1C6jMVzAQ4RZCBwGQYMEVZvjSBdKUw/7arkhHPS0ldg= -github.com/atombender/go-jsonschema v0.16.0/go.mod h1:qvHiMeC+Obu1QJTtD+rZGogD+Nn4QCztDJ0UNF8dBfs= +github.com/atombender/go-jsonschema v0.17.0 h1:eUK5Q6I0hWtCi2Pfvj6o5xWWBAyswBLlkFNrTJX1SzI= +github.com/atombender/go-jsonschema v0.17.0/go.mod h1:tOo4w4JBlhCKojSlTwdv8gIqTwHUGbmJ7TTc+03+/uo= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bkielbasa/cyclop v1.2.1 h1:AeF71HZDob1P2/pRm1so9cd1alZnrpyc4q2uP2l0gJY= @@ -170,8 +170,8 @@ github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80 github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/goccy/go-yaml v1.11.3 h1:B3W9IdWbvrUu2OYQGwvU1nZtvMQJPBKgBUuweJjLj6I= -github.com/goccy/go-yaml v1.11.3/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU= +github.com/goccy/go-yaml v1.12.0 h1:/1WHjnMsI1dlIBQutrvSMGZRQufVO3asrHfTwfACoPM= +github.com/goccy/go-yaml v1.12.0/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU= github.com/gofrs/flock v0.12.1 h1:MTLVXXHf8ekldpJk3AKicLij9MdwOWkZ+a/jHHZby9E= github.com/gofrs/flock v0.12.1/go.mod h1:9zxTsyu5xtJ9DK+1tFZyibEV7y3uwDxPPfbxeeHCoD0= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= @@ -516,8 +516,8 @@ golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2Uz golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= -golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 h1:1wqE9dj9NpSm04INVsJhhEUzhuDVjbcyKH91sVyPATw= -golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8= +golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c h1:7dEasQXItcW1xKJ2+gg5VOiBnqWrJc+rq0DPKyvvdbY= +golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f h1:phY1HzDcf18Aq9A8KkmRtY9WvOFIxN8wgfvy6Zm1DV8= @@ -639,8 +639,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= +golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhSt0ABwskkZKjD3bXGnZGpNY= +golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= From 1379d7431d3eaddbf25b74c1b02a2023a041598f Mon Sep 17 00:00:00 2001 From: "Cheng-Zhen (CZ) Yang" Date: Mon, 28 Oct 2024 23:41:35 +1300 Subject: [PATCH 7/7] otellogr: Implement LevelSeverity, Enabled (#6206) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR implements a few methods for otellogr package - Configurable LevelSeverity - Enabled Part of https://github.com/open-telemetry/opentelemetry-go-contrib/issues/5192 --------- Co-authored-by: Robert Pająk --- bridges/otellogr/example_test.go | 16 +++++- bridges/otellogr/logsink.go | 71 ++++++++++++++++++++------ bridges/otellogr/logsink_test.go | 85 ++++++++++++++++++++++++++++++-- 3 files changed, 151 insertions(+), 21 deletions(-) diff --git a/bridges/otellogr/example_test.go b/bridges/otellogr/example_test.go index 4b544a0b2b5..e8858a7521f 100644 --- a/bridges/otellogr/example_test.go +++ b/bridges/otellogr/example_test.go @@ -7,6 +7,7 @@ import ( "github.com/go-logr/logr" "go.opentelemetry.io/contrib/bridges/otellogr" + "go.opentelemetry.io/otel/log" "go.opentelemetry.io/otel/log/noop" ) @@ -17,6 +18,17 @@ func Example() { // Create an logr.Logger with *otellogr.LogSink and use it in your application. logr.New(otellogr.NewLogSink( "my/pkg/name", - otellogr.WithLoggerProvider(provider)), - ) + otellogr.WithLoggerProvider(provider), + // Optionally, set the log level severity mapping. + otellogr.WithLevelSeverity(func(level int) log.Severity { + switch level { + case 0: + return log.SeverityInfo + case 1: + return log.SeverityDebug + default: + return log.SeverityTrace + } + }), + )) } diff --git a/bridges/otellogr/logsink.go b/bridges/otellogr/logsink.go index 482314c8719..4e36fe18e23 100644 --- a/bridges/otellogr/logsink.go +++ b/bridges/otellogr/logsink.go @@ -10,13 +10,21 @@ // way: // // - Message is set as the Body using a [log.StringValue]. -// - TODO: Level +// - Level is transformed and set as the Severity. The SeverityText is not +// set. // - KeyAndValues are transformed and set as Attributes. // - The [context.Context] value in KeyAndValues is propagated to OpenTelemetry // log record. All non-nested [context.Context] values are ignored and not // added as attributes. If there are multiple [context.Context] the last one // is used. // +// The V-level is transformed by using the [WithLevelSeverity] option. If option is +// not provided then V-level is transformed in the following way: +// +// - logr.Info and logr.V(0) are transformed to [log.SeverityInfo]. +// - logr.V(1) is transformed to [log.SeverityDebug]. +// - logr.V(2) and higher are transformed to [log.SeverityTrace]. +// // KeysAndValues values are transformed based on their type. The following types are // supported: // @@ -57,6 +65,8 @@ type config struct { provider log.LoggerProvider version string schemaURL string + + levelSeverity func(int) log.Severity } func newConfig(options []Option) config { @@ -69,6 +79,19 @@ func newConfig(options []Option) config { c.provider = global.GetLoggerProvider() } + if c.levelSeverity == nil { + c.levelSeverity = func(level int) log.Severity { + switch level { + case 0: + return log.SeverityInfo + case 1: + return log.SeverityDebug + default: + return log.SeverityTrace + } + } + } + return c } @@ -113,6 +136,22 @@ func WithLoggerProvider(provider log.LoggerProvider) Option { }) } +// WithLevelSeverity returns an [Option] that configures the function used to +// convert logr levels to OpenTelemetry log severities. +// +// By default if this Option is not provided, the LogSink will use a default +// conversion function that transforms in the following way: +// +// - logr.Info and logr.V(0) are transformed to [log.SeverityInfo]. +// - logr.V(1) is transformed to [log.SeverityDebug]. +// - logr.V(2) and higher are transformed to [log.SeverityTrace]. +func WithLevelSeverity(f func(int) log.Severity) Option { + return optFunc(func(c config) config { + c.levelSeverity = f + return c + }) +} + // NewLogSink returns a new [LogSink] to be used as a [logr.LogSink]. // // If [WithLoggerProvider] is not provided, the returned [LogSink] will use the @@ -129,10 +168,11 @@ func NewLogSink(name string, options ...Option) *LogSink { } return &LogSink{ - name: name, - provider: c.provider, - logger: c.provider.Logger(name, opts...), - opts: opts, + name: name, + provider: c.provider, + logger: c.provider.Logger(name, opts...), + levelSeverity: c.levelSeverity, + opts: opts, } } @@ -142,12 +182,13 @@ type LogSink struct { // Ensure forward compatibility by explicitly making this not comparable. noCmp [0]func() //nolint: unused // This is indeed used. - name string - provider log.LoggerProvider - logger log.Logger - opts []log.LoggerOption - attr []log.KeyValue - ctx context.Context + name string + provider log.LoggerProvider + logger log.Logger + levelSeverity func(int) log.Severity + opts []log.LoggerOption + attr []log.KeyValue + ctx context.Context } // Compile-time check *Handler implements logr.LogSink. @@ -157,8 +198,10 @@ var _ logr.LogSink = (*LogSink)(nil) // For example, commandline flags might be used to set the logging // verbosity and disable some info logs. func (l *LogSink) Enabled(level int) bool { - // TODO - return true + var param log.EnabledParameters + param.SetSeverity(l.levelSeverity(level)) + ctx := context.Background() + return l.logger.Enabled(ctx, param) } // Error logs an error, with the given message and key/value pairs. @@ -170,7 +213,7 @@ func (l *LogSink) Error(err error, msg string, keysAndValues ...any) { func (l *LogSink) Info(level int, msg string, keysAndValues ...any) { var record log.Record record.SetBody(log.StringValue(msg)) - record.SetSeverity(log.SeverityInfo) // TODO: level + record.SetSeverity(l.levelSeverity(level)) record.AddAttributes(l.attr...) diff --git a/bridges/otellogr/logsink_test.go b/bridges/otellogr/logsink_test.go index b0ba3446b1a..b63a201c412 100644 --- a/bridges/otellogr/logsink_test.go +++ b/bridges/otellogr/logsink_test.go @@ -64,7 +64,9 @@ func TestNewConfig(t *testing.T) { }, } { t.Run(tt.name, func(t *testing.T) { - assert.Equal(t, tt.wantConfig, newConfig(tt.options)) + config := newConfig(tt.options) + config.levelSeverity = nil // Ignore asserting level severity function, assert.Equal does not support function comparison + assert.Equal(t, tt.wantConfig, config) }) } } @@ -117,9 +119,10 @@ func TestLogSink(t *testing.T) { const name = "name" for _, tt := range []struct { - name string - f func(*logr.Logger) - wantRecords map[string][]log.Record + name string + f func(*logr.Logger) + levelSeverity func(int) log.Severity + wantRecords map[string][]log.Record }{ { name: "no_log", @@ -139,6 +142,48 @@ func TestLogSink(t *testing.T) { }, }, }, + { + name: "info_with_level_severity", + f: func(l *logr.Logger) { + l.V(0).Info("msg") + l.V(1).Info("msg") + l.V(2).Info("msg") + l.V(3).Info("msg") + }, + wantRecords: map[string][]log.Record{ + name: { + buildRecord(log.StringValue("msg"), time.Time{}, log.SeverityInfo, nil), + buildRecord(log.StringValue("msg"), time.Time{}, log.SeverityDebug, nil), + buildRecord(log.StringValue("msg"), time.Time{}, log.SeverityTrace, nil), + buildRecord(log.StringValue("msg"), time.Time{}, log.SeverityTrace, nil), + }, + }, + }, + { + name: "info_with_custom_level_severity", + f: func(l *logr.Logger) { + l.Info("msg") + l.V(1).Info("msg") + l.V(2).Info("msg") + }, + levelSeverity: func(level int) log.Severity { + switch level { + case 1: + return log.SeverityError + case 2: + return log.SeverityWarn + default: + return log.SeverityInfo + } + }, + wantRecords: map[string][]log.Record{ + name: { + buildRecord(log.StringValue("msg"), time.Time{}, log.SeverityInfo, nil), + buildRecord(log.StringValue("msg"), time.Time{}, log.SeverityError, nil), + buildRecord(log.StringValue("msg"), time.Time{}, log.SeverityWarn, nil), + }, + }, + }, { name: "info_multi_attrs", f: func(l *logr.Logger) { @@ -235,7 +280,10 @@ func TestLogSink(t *testing.T) { } { t.Run(tt.name, func(t *testing.T) { rec := logtest.NewRecorder() - ls := NewLogSink(name, WithLoggerProvider(rec)) + ls := NewLogSink(name, + WithLoggerProvider(rec), + WithLevelSeverity(tt.levelSeverity), + ) l := logr.New(ls) tt.f(&l) @@ -260,6 +308,33 @@ func TestLogSink(t *testing.T) { } } +func TestLogSinkEnabled(t *testing.T) { + enabledFunc := func(ctx context.Context, param log.EnabledParameters) bool { + lvl, ok := param.Severity() + if !ok { + return true + } + return lvl == log.SeverityInfo + } + + rec := logtest.NewRecorder(logtest.WithEnabledFunc(enabledFunc)) + ls := NewLogSink( + "name", + WithLoggerProvider(rec), + WithLevelSeverity(func(i int) log.Severity { + switch i { + case 0: + return log.SeverityInfo + default: + return log.SeverityDebug + } + }), + ) + + assert.True(t, ls.Enabled(0)) + assert.False(t, ls.Enabled(1)) +} + func buildRecord(body log.Value, timestamp time.Time, severity log.Severity, attrs []log.KeyValue) log.Record { var record log.Record record.SetBody(body)