From fe9e1aac466d332483d2be5d9a3ffbb9f80c0335 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Wed, 29 May 2024 06:44:37 -0700
Subject: [PATCH 01/18] chore(deps): update module github.com/bytedance/sonic
to v1.11.8 (#5682)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/bytedance/sonic](https://togithub.com/bytedance/sonic) |
`v1.11.7` -> `v1.11.8` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fbytedance%2fsonic/v1.11.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fbytedance%2fsonic/v1.11.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fbytedance%2fsonic/v1.11.7/v1.11.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fbytedance%2fsonic/v1.11.7/v1.11.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
---
### Release Notes
bytedance/sonic (github.com/bytedance/sonic)
###
[`v1.11.8`](https://togithub.com/bytedance/sonic/releases/tag/v1.11.8)
[Compare
Source](https://togithub.com/bytedance/sonic/compare/v1.11.7...v1.11.8)
#### Feature
- \[[#630](https://togithub.com/bytedance/sonic/issues/630)]
feat:(ast) `Visitor` support skip object and array
#### Bugfix
- \[[#632](https://togithub.com/bytedance/sonic/issues/632)] fix:
better compile error info in 32-bit arch
- \[[#642](https://togithub.com/bytedance/sonic/issues/642)] fix:
check empty when validating utf8
- \[[#636](https://togithub.com/bytedance/sonic/issues/636)] fix:
add mssing max pc-sp of natives
**Full Changelog**:
https://github.com/bytedance/sonic/compare/v1.11.7...v1.11.8
---
### 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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-telemetry/opentelemetry-go-contrib).
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
.../github.com/gin-gonic/gin/otelgin/example/go.mod | 2 +-
.../github.com/gin-gonic/gin/otelgin/example/go.sum | 4 ++--
instrumentation/github.com/gin-gonic/gin/otelgin/go.mod | 2 +-
instrumentation/github.com/gin-gonic/gin/otelgin/go.sum | 4 ++--
instrumentation/github.com/gin-gonic/gin/otelgin/test/go.mod | 2 +-
instrumentation/github.com/gin-gonic/gin/otelgin/test/go.sum | 4 ++--
6 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/instrumentation/github.com/gin-gonic/gin/otelgin/example/go.mod b/instrumentation/github.com/gin-gonic/gin/otelgin/example/go.mod
index 627be35c75d..b7d2fed9be1 100644
--- a/instrumentation/github.com/gin-gonic/gin/otelgin/example/go.mod
+++ b/instrumentation/github.com/gin-gonic/gin/otelgin/example/go.mod
@@ -17,7 +17,7 @@ require (
)
require (
- github.com/bytedance/sonic v1.11.7 // indirect
+ github.com/bytedance/sonic v1.11.8 // indirect
github.com/bytedance/sonic/loader v0.1.1 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
diff --git a/instrumentation/github.com/gin-gonic/gin/otelgin/example/go.sum b/instrumentation/github.com/gin-gonic/gin/otelgin/example/go.sum
index 7c7af340e77..c3036cef4be 100644
--- a/instrumentation/github.com/gin-gonic/gin/otelgin/example/go.sum
+++ b/instrumentation/github.com/gin-gonic/gin/otelgin/example/go.sum
@@ -1,5 +1,5 @@
-github.com/bytedance/sonic v1.11.7 h1:k/l9p1hZpNIMJSk37wL9ltkcpqLfIho1vYthi4xT2t4=
-github.com/bytedance/sonic v1.11.7/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=
+github.com/bytedance/sonic v1.11.8 h1:Zw/j1KfiS+OYTi9lyB3bb0CFxPJVkM17k1wyDG32LRA=
+github.com/bytedance/sonic v1.11.8/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=
github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM=
github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=
diff --git a/instrumentation/github.com/gin-gonic/gin/otelgin/go.mod b/instrumentation/github.com/gin-gonic/gin/otelgin/go.mod
index e904ae42526..9cea70c45ca 100644
--- a/instrumentation/github.com/gin-gonic/gin/otelgin/go.mod
+++ b/instrumentation/github.com/gin-gonic/gin/otelgin/go.mod
@@ -13,7 +13,7 @@ require (
)
require (
- github.com/bytedance/sonic v1.11.7 // indirect
+ github.com/bytedance/sonic v1.11.8 // indirect
github.com/bytedance/sonic/loader v0.1.1 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
diff --git a/instrumentation/github.com/gin-gonic/gin/otelgin/go.sum b/instrumentation/github.com/gin-gonic/gin/otelgin/go.sum
index 4a545dd4cb4..70384f952d3 100644
--- a/instrumentation/github.com/gin-gonic/gin/otelgin/go.sum
+++ b/instrumentation/github.com/gin-gonic/gin/otelgin/go.sum
@@ -1,5 +1,5 @@
-github.com/bytedance/sonic v1.11.7 h1:k/l9p1hZpNIMJSk37wL9ltkcpqLfIho1vYthi4xT2t4=
-github.com/bytedance/sonic v1.11.7/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=
+github.com/bytedance/sonic v1.11.8 h1:Zw/j1KfiS+OYTi9lyB3bb0CFxPJVkM17k1wyDG32LRA=
+github.com/bytedance/sonic v1.11.8/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=
github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM=
github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=
diff --git a/instrumentation/github.com/gin-gonic/gin/otelgin/test/go.mod b/instrumentation/github.com/gin-gonic/gin/otelgin/test/go.mod
index 8549fe8cb95..3fdc7ee1f0a 100644
--- a/instrumentation/github.com/gin-gonic/gin/otelgin/test/go.mod
+++ b/instrumentation/github.com/gin-gonic/gin/otelgin/test/go.mod
@@ -12,7 +12,7 @@ require (
)
require (
- github.com/bytedance/sonic v1.11.7 // indirect
+ github.com/bytedance/sonic v1.11.8 // indirect
github.com/bytedance/sonic/loader v0.1.1 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
diff --git a/instrumentation/github.com/gin-gonic/gin/otelgin/test/go.sum b/instrumentation/github.com/gin-gonic/gin/otelgin/test/go.sum
index 6c2491fe871..d2dace075f6 100644
--- a/instrumentation/github.com/gin-gonic/gin/otelgin/test/go.sum
+++ b/instrumentation/github.com/gin-gonic/gin/otelgin/test/go.sum
@@ -1,5 +1,5 @@
-github.com/bytedance/sonic v1.11.7 h1:k/l9p1hZpNIMJSk37wL9ltkcpqLfIho1vYthi4xT2t4=
-github.com/bytedance/sonic v1.11.7/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=
+github.com/bytedance/sonic v1.11.8 h1:Zw/j1KfiS+OYTi9lyB3bb0CFxPJVkM17k1wyDG32LRA=
+github.com/bytedance/sonic v1.11.8/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=
github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM=
github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=
From 257ec3ae33467087e35dcc00eeafc1253eaa8c6a Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Wed, 29 May 2024 07:17:05 -0700
Subject: [PATCH 02/18] fix(deps): update module github.com/aws/aws-sdk-go to
v1.53.11 (#5675)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/aws/aws-sdk-go](https://togithub.com/aws/aws-sdk-go) |
`v1.53.10` -> `v1.53.11` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2faws%2faws-sdk-go/v1.53.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2faws%2faws-sdk-go/v1.53.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2faws%2faws-sdk-go/v1.53.10/v1.53.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2faws%2faws-sdk-go/v1.53.10/v1.53.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
---
### Release Notes
aws/aws-sdk-go (github.com/aws/aws-sdk-go)
###
[`v1.53.11`](https://togithub.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v15311-2024-05-28)
[Compare
Source](https://togithub.com/aws/aws-sdk-go/compare/v1.53.10...v1.53.11)
\===
##### Service Client Updates
- `service/dynamodb`: Updates service API, documentation, waiters,
paginators, and examples
- Doc-only update for DynamoDB. Specified the IAM actions needed to
authorize a user to create a table with a resource-based policy.
- `service/ec2`: Updates service API and documentation
- Providing support to accept BgpAsnExtended attribute
- `service/kafka`: Updates service API and documentation
- `service/swf`: Updates service API and documentation
- This release adds new APIs for deleting activity type and workflow
type resources.
---
### 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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-telemetry/opentelemetry-go-contrib).
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
detectors/aws/ec2/go.mod | 2 +-
detectors/aws/ec2/go.sum | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/detectors/aws/ec2/go.mod b/detectors/aws/ec2/go.mod
index 466df49e955..e6b4a119db7 100644
--- a/detectors/aws/ec2/go.mod
+++ b/detectors/aws/ec2/go.mod
@@ -4,7 +4,7 @@ module go.opentelemetry.io/contrib/detectors/aws/ec2
go 1.21
require (
- github.com/aws/aws-sdk-go v1.53.10
+ github.com/aws/aws-sdk-go v1.53.11
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/otel v1.27.0
go.opentelemetry.io/otel/sdk v1.27.0
diff --git a/detectors/aws/ec2/go.sum b/detectors/aws/ec2/go.sum
index 06c05ea15c8..e253fef3e9c 100644
--- a/detectors/aws/ec2/go.sum
+++ b/detectors/aws/ec2/go.sum
@@ -1,5 +1,5 @@
-github.com/aws/aws-sdk-go v1.53.10 h1:3enP5l5WtezT9Ql+XZqs56JBf5YUd/FEzTCg///OIGY=
-github.com/aws/aws-sdk-go v1.53.10/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
+github.com/aws/aws-sdk-go v1.53.11 h1:KcmduYvX15rRqt4ZU/7jKkmDxU/G87LJ9MUI0yQJh00=
+github.com/aws/aws-sdk-go v1.53.11/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
From 73e830176a31f739259376dd189de467741384a4 Mon Sep 17 00:00:00 2001
From: Khushi Jain
Date: Wed, 29 May 2024 19:57:59 +0530
Subject: [PATCH 03/18] otelzap: Implement methods on `arrayEncoder` (#5652)
Part of
https://github.com/open-telemetry/opentelemetry-go-contrib/issues/5191
Pre-work
https://github.com/open-telemetry/opentelemetry-go-contrib/pull/5279
---------
Co-authored-by: Tyler Yahn
---
bridges/otelzap/encoder.go | 35 ++++++++++++++++++++-------------
bridges/otelzap/encoder_test.go | 14 +++++++++++++
2 files changed, 35 insertions(+), 14 deletions(-)
diff --git a/bridges/otelzap/encoder.go b/bridges/otelzap/encoder.go
index f59c97646f7..474bb9f6e1c 100644
--- a/bridges/otelzap/encoder.go
+++ b/bridges/otelzap/encoder.go
@@ -201,17 +201,24 @@ func (a *arrayEncoder) AppendString(v string) {
a.elems = append(a.elems, log.StringValue(v))
}
-// TODO.
-func (a *arrayEncoder) AppendComplex128(v complex128) {}
-func (a *arrayEncoder) AppendUint64(v uint64) {}
-func (a *arrayEncoder) AppendComplex64(v complex64) {}
-func (a *arrayEncoder) AppendDuration(v time.Duration) {}
-func (a *arrayEncoder) AppendInt32(v int32) {}
-func (a *arrayEncoder) AppendInt16(v int16) {}
-func (a *arrayEncoder) AppendInt8(v int8) {}
-func (a *arrayEncoder) AppendTime(v time.Time) {}
-func (a *arrayEncoder) AppendUint(v uint) {}
-func (a *arrayEncoder) AppendUint32(v uint32) {}
-func (a *arrayEncoder) AppendUint16(v uint16) {}
-func (a *arrayEncoder) AppendUint8(v uint8) {}
-func (a *arrayEncoder) AppendUintptr(v uintptr) {}
+func (a *arrayEncoder) AppendComplex128(v complex128) {
+ r := log.Float64("r", real(v))
+ i := log.Float64("i", imag(v))
+ a.elems = append(a.elems, log.MapValue(r, i))
+}
+
+func (a *arrayEncoder) AppendUint64(v uint64) {
+ a.elems = append(a.elems, assignUintValue(v))
+}
+
+func (a *arrayEncoder) AppendComplex64(v complex64) { a.AppendComplex128(complex128(v)) }
+func (a *arrayEncoder) AppendDuration(v time.Duration) { a.AppendInt64(v.Nanoseconds()) }
+func (a *arrayEncoder) AppendInt32(v int32) { a.AppendInt64(int64(v)) }
+func (a *arrayEncoder) AppendInt16(v int16) { a.AppendInt64(int64(v)) }
+func (a *arrayEncoder) AppendInt8(v int8) { a.AppendInt64(int64(v)) }
+func (a *arrayEncoder) AppendTime(v time.Time) { a.AppendInt64(int64(v.UnixNano())) }
+func (a *arrayEncoder) AppendUint(v uint) { a.AppendUint64(uint64(v)) }
+func (a *arrayEncoder) AppendUint32(v uint32) { a.AppendInt64(int64(v)) }
+func (a *arrayEncoder) AppendUint16(v uint16) { a.AppendInt64(int64(v)) }
+func (a *arrayEncoder) AppendUint8(v uint8) { a.AppendInt64(int64(v)) }
+func (a *arrayEncoder) AppendUintptr(v uintptr) { a.AppendUint64(uint64(v)) }
diff --git a/bridges/otelzap/encoder_test.go b/bridges/otelzap/encoder_test.go
index d4e51db2825..da8bc56e30e 100644
--- a/bridges/otelzap/encoder_test.go
+++ b/bridges/otelzap/encoder_test.go
@@ -169,8 +169,22 @@ func TestArrayEncoder(t *testing.T) {
{"AppendFloat64", func(e zapcore.ArrayEncoder) { e.AppendFloat64(3.14) }, 3.14},
{"AppendFloat32", func(e zapcore.ArrayEncoder) { e.AppendFloat32(3.14) }, float64(float32(3.14))},
{"AppendInt64", func(e zapcore.ArrayEncoder) { e.AppendInt64(42) }, int64(42)},
+ {"AppendInt32", func(e zapcore.ArrayEncoder) { e.AppendInt32(42) }, int64(42)},
+ {"AppendInt16", func(e zapcore.ArrayEncoder) { e.AppendInt16(42) }, int64(42)},
+ {"AppendInt8", func(e zapcore.ArrayEncoder) { e.AppendInt8(42) }, int64(42)},
{"AppendInt", func(e zapcore.ArrayEncoder) { e.AppendInt(42) }, int64(42)},
{"AppendString", func(e zapcore.ArrayEncoder) { e.AppendString("foo") }, "foo"},
+ {"AppendComplex128", func(e zapcore.ArrayEncoder) { e.AppendComplex128(1 + 2i) }, map[string]interface{}{"i": float64(2), "r": float64(1)}},
+ {"AppendComplex64", func(e zapcore.ArrayEncoder) { e.AppendComplex64(1 + 2i) }, map[string]interface{}{"i": float64(2), "r": float64(1)}},
+ {"AppendDuration", func(e zapcore.ArrayEncoder) { e.AppendDuration(time.Second) }, int64(1000000000)},
+ {"AppendTime", func(e zapcore.ArrayEncoder) { e.AppendTime(time.Unix(0, 100)) }, time.Unix(0, 100).UnixNano()},
+ {"AppendUint", func(e zapcore.ArrayEncoder) { e.AppendUint(42) }, int64(42)},
+ {"AppendUint64", func(e zapcore.ArrayEncoder) { e.AppendUint64(42) }, int64(42)},
+ {"AppendUint64 - overflow", func(e zapcore.ArrayEncoder) { e.AppendUint64(^uint64(0)) }, float64(^uint64(0))},
+ {"AppendUint32", func(e zapcore.ArrayEncoder) { e.AppendUint32(42) }, int64(42)},
+ {"AppendUint16", func(e zapcore.ArrayEncoder) { e.AppendUint16(42) }, int64(42)},
+ {"AppendUint8", func(e zapcore.ArrayEncoder) { e.AppendUint8(42) }, int64(42)},
+ {"AppendUintptr", func(e zapcore.ArrayEncoder) { e.AppendUintptr(42) }, int64(42)},
}
for _, tt := range tests {
From 2ca9fcb5e3ff35c49ecae44c60994d1b5bcc495f Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Wed, 29 May 2024 07:42:49 -0700
Subject: [PATCH 04/18] fix(deps): update module
github.com/emicklei/go-restful/v3 to v3.12.1 (#5679)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/emicklei/go-restful/v3](https://togithub.com/emicklei/go-restful)
| `v3.12.0` -> `v3.12.1` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2femicklei%2fgo-restful%2fv3/v3.12.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2femicklei%2fgo-restful%2fv3/v3.12.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2femicklei%2fgo-restful%2fv3/v3.12.0/v3.12.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2femicklei%2fgo-restful%2fv3/v3.12.0/v3.12.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
---
### Release Notes
emicklei/go-restful
(github.com/emicklei/go-restful/v3)
###
[`v3.12.1`](https://togithub.com/emicklei/go-restful/blob/HEAD/CHANGES.md#v3121---2024-05-28)
[Compare
Source](https://togithub.com/emicklei/go-restful/compare/v3.12.0...v3.12.1)
- fix misroute when dealing multiple webservice with regex
([#549](https://togithub.com/emicklei/go-restful/issues/549))
(thanks Haitao Chen)
---
### 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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](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 | 2 +-
detectors/aws/eks/go.sum | 4 ++--
.../github.com/emicklei/go-restful/otelrestful/example/go.mod | 2 +-
.../github.com/emicklei/go-restful/otelrestful/example/go.sum | 4 ++--
.../github.com/emicklei/go-restful/otelrestful/go.mod | 2 +-
.../github.com/emicklei/go-restful/otelrestful/go.sum | 4 ++--
.../github.com/emicklei/go-restful/otelrestful/test/go.mod | 2 +-
.../github.com/emicklei/go-restful/otelrestful/test/go.sum | 4 ++--
8 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/detectors/aws/eks/go.mod b/detectors/aws/eks/go.mod
index d3b45ec781b..001e7bb139e 100644
--- a/detectors/aws/eks/go.mod
+++ b/detectors/aws/eks/go.mod
@@ -13,7 +13,7 @@ require (
require (
github.com/davecgh/go-spew v1.1.1 // indirect
- github.com/emicklei/go-restful/v3 v3.12.0 // indirect
+ github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
diff --git a/detectors/aws/eks/go.sum b/detectors/aws/eks/go.sum
index 3a213e9004f..a990b5866ae 100644
--- a/detectors/aws/eks/go.sum
+++ b/detectors/aws/eks/go.sum
@@ -1,8 +1,8 @@
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/emicklei/go-restful/v3 v3.12.0 h1:y2DdzBAURM29NFF94q6RaY4vjIH1rtwDapwQtU84iWk=
-github.com/emicklei/go-restful/v3 v3.12.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
+github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU=
+github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
diff --git a/instrumentation/github.com/emicklei/go-restful/otelrestful/example/go.mod b/instrumentation/github.com/emicklei/go-restful/otelrestful/example/go.mod
index 0b216f3436f..f044f0427c4 100644
--- a/instrumentation/github.com/emicklei/go-restful/otelrestful/example/go.mod
+++ b/instrumentation/github.com/emicklei/go-restful/otelrestful/example/go.mod
@@ -8,7 +8,7 @@ replace (
)
require (
- github.com/emicklei/go-restful/v3 v3.12.0
+ github.com/emicklei/go-restful/v3 v3.12.1
go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful v0.52.0
go.opentelemetry.io/otel v1.27.0
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0
diff --git a/instrumentation/github.com/emicklei/go-restful/otelrestful/example/go.sum b/instrumentation/github.com/emicklei/go-restful/otelrestful/example/go.sum
index 8fcae2ef1ec..5295f304c68 100644
--- a/instrumentation/github.com/emicklei/go-restful/otelrestful/example/go.sum
+++ b/instrumentation/github.com/emicklei/go-restful/otelrestful/example/go.sum
@@ -1,7 +1,7 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/emicklei/go-restful/v3 v3.12.0 h1:y2DdzBAURM29NFF94q6RaY4vjIH1rtwDapwQtU84iWk=
-github.com/emicklei/go-restful/v3 v3.12.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
+github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU=
+github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
diff --git a/instrumentation/github.com/emicklei/go-restful/otelrestful/go.mod b/instrumentation/github.com/emicklei/go-restful/otelrestful/go.mod
index 6728584f9e5..ff04b7c3555 100644
--- a/instrumentation/github.com/emicklei/go-restful/otelrestful/go.mod
+++ b/instrumentation/github.com/emicklei/go-restful/otelrestful/go.mod
@@ -5,7 +5,7 @@ go 1.21
replace go.opentelemetry.io/contrib/propagators/b3 => ../../../../../propagators/b3
require (
- github.com/emicklei/go-restful/v3 v3.12.0
+ github.com/emicklei/go-restful/v3 v3.12.1
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/contrib/propagators/b3 v1.27.0
go.opentelemetry.io/otel v1.27.0
diff --git a/instrumentation/github.com/emicklei/go-restful/otelrestful/go.sum b/instrumentation/github.com/emicklei/go-restful/otelrestful/go.sum
index 5fac0d89bcc..e2d85c30495 100644
--- a/instrumentation/github.com/emicklei/go-restful/otelrestful/go.sum
+++ b/instrumentation/github.com/emicklei/go-restful/otelrestful/go.sum
@@ -1,7 +1,7 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/emicklei/go-restful/v3 v3.12.0 h1:y2DdzBAURM29NFF94q6RaY4vjIH1rtwDapwQtU84iWk=
-github.com/emicklei/go-restful/v3 v3.12.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
+github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU=
+github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
diff --git a/instrumentation/github.com/emicklei/go-restful/otelrestful/test/go.mod b/instrumentation/github.com/emicklei/go-restful/otelrestful/test/go.mod
index a7c03126aac..47b59292679 100644
--- a/instrumentation/github.com/emicklei/go-restful/otelrestful/test/go.mod
+++ b/instrumentation/github.com/emicklei/go-restful/otelrestful/test/go.mod
@@ -3,7 +3,7 @@ module go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restfu
go 1.21
require (
- github.com/emicklei/go-restful/v3 v3.12.0
+ github.com/emicklei/go-restful/v3 v3.12.1
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful v0.52.0
go.opentelemetry.io/otel v1.27.0
diff --git a/instrumentation/github.com/emicklei/go-restful/otelrestful/test/go.sum b/instrumentation/github.com/emicklei/go-restful/otelrestful/test/go.sum
index 5fac0d89bcc..e2d85c30495 100644
--- a/instrumentation/github.com/emicklei/go-restful/otelrestful/test/go.sum
+++ b/instrumentation/github.com/emicklei/go-restful/otelrestful/test/go.sum
@@ -1,7 +1,7 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/emicklei/go-restful/v3 v3.12.0 h1:y2DdzBAURM29NFF94q6RaY4vjIH1rtwDapwQtU84iWk=
-github.com/emicklei/go-restful/v3 v3.12.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
+github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU=
+github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
From bd97adf0e657c5f11ae046c651e19964a0ccefbc Mon Sep 17 00:00:00 2001
From: Ionut Ovidiu Zailic
Date: Wed, 29 May 2024 18:01:11 +0300
Subject: [PATCH 05/18] fix: custom attributes are ignored - #5084 (#5129)
OK... i opened a new PR for #5084 issue, as i shot myself in a foot
trying to modify a previous commit that I pushed under another github
user.
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Tyler Yahn
---
CHANGELOG.md | 1 +
instrumentation/net/http/otelhttp/handler.go | 6 +-
instrumentation/net/http/otelhttp/labeler.go | 8 +-
.../net/http/otelhttp/test/transport_test.go | 74 +++++++++++++++++++
.../net/http/otelhttp/transport.go | 6 +-
5 files changed, 89 insertions(+), 6 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 36eff57b763..bbbe422615d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
### Fixed
- The superfluous `response.WriteHeader` call in `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` when the response writer is flushed. (#5634)
+- Custom attributes targeting metrics recorded by the `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` are not ignored anymore. (#5129)
### Deprecated
diff --git a/instrumentation/net/http/otelhttp/handler.go b/instrumentation/net/http/otelhttp/handler.go
index 810b7dd769d..cdb11dd7a5e 100644
--- a/instrumentation/net/http/otelhttp/handler.go
+++ b/instrumentation/net/http/otelhttp/handler.go
@@ -209,8 +209,10 @@ func (h *middleware) serveHTTP(w http.ResponseWriter, r *http.Request, next http
},
})
- labeler := &Labeler{}
- ctx = injectLabeler(ctx, labeler)
+ labeler, found := LabelerFromContext(ctx)
+ if !found {
+ ctx = ContextWithLabeler(ctx, labeler)
+ }
next.ServeHTTP(w, r.WithContext(ctx))
diff --git a/instrumentation/net/http/otelhttp/labeler.go b/instrumentation/net/http/otelhttp/labeler.go
index 1548b2db636..ea504e396f1 100644
--- a/instrumentation/net/http/otelhttp/labeler.go
+++ b/instrumentation/net/http/otelhttp/labeler.go
@@ -37,8 +37,12 @@ type labelerContextKeyType int
const lablelerContextKey labelerContextKeyType = 0
-func injectLabeler(ctx context.Context, l *Labeler) context.Context {
- return context.WithValue(ctx, lablelerContextKey, l)
+// ContextWithLabeler returns a new context with the provided Labeler instance.
+// Attributes added to the specified labeler will be injected into metrics
+// emitted by the instrumentation. Only one labeller can be injected into the
+// context. Injecting it multiple times will override the previous calls.
+func ContextWithLabeler(parent context.Context, l *Labeler) context.Context {
+ return context.WithValue(parent, lablelerContextKey, l)
}
// LabelerFromContext retrieves a Labeler instance from the provided context if
diff --git a/instrumentation/net/http/otelhttp/test/transport_test.go b/instrumentation/net/http/otelhttp/test/transport_test.go
index b303f10c57f..d96aedb29ba 100644
--- a/instrumentation/net/http/otelhttp/test/transport_test.go
+++ b/instrumentation/net/http/otelhttp/test/transport_test.go
@@ -476,3 +476,77 @@ func assertClientScopeMetrics(t *testing.T, sm metricdata.ScopeMetrics, attrs at
}
metricdatatest.AssertEqual(t, want, sm.Metrics[2], metricdatatest.IgnoreTimestamp(), metricdatatest.IgnoreValue())
}
+
+func TestCustomAttributesHandling(t *testing.T) {
+ var rm metricdata.ResourceMetrics
+ const (
+ clientRequestSize = "http.client.request.size"
+ clientDuration = "http.client.duration"
+ )
+ ctx := context.TODO()
+ reader := metric.NewManualReader()
+ provider := metric.NewMeterProvider(metric.WithReader(reader))
+ defer func() {
+ err := provider.Shutdown(ctx)
+ if err != nil {
+ t.Errorf("Error shutting down provider: %v", err)
+ }
+ }()
+
+ transport := otelhttp.NewTransport(http.DefaultTransport, otelhttp.WithMeterProvider(provider))
+ client := http.Client{Transport: transport}
+
+ ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
+ w.WriteHeader(http.StatusOK)
+ }))
+ defer ts.Close()
+
+ r, err := http.NewRequest(http.MethodGet, ts.URL, nil)
+ require.NoError(t, err)
+ labeler := &otelhttp.Labeler{}
+ labeler.Add(attribute.String("foo", "fooValue"))
+ labeler.Add(attribute.String("bar", "barValue"))
+ ctx = otelhttp.ContextWithLabeler(ctx, labeler)
+ r = r.WithContext(ctx)
+
+ // test bonus: intententionally ignoring response to confirm that
+ // http.client.response.size metric is not recorded
+ // by the Transport.RoundTrip logic
+ _, err = client.Do(r)
+ require.NoError(t, err)
+
+ err = reader.Collect(ctx, &rm)
+ assert.NoError(t, err)
+
+ // http.client.response.size is not recorded so the assert.Len
+ // above should be 2 instead of 3(test bonus)
+ assert.Len(t, rm.ScopeMetrics[0].Metrics, 2)
+ for _, m := range rm.ScopeMetrics[0].Metrics {
+ switch m.Name {
+ case clientRequestSize:
+ d, ok := m.Data.(metricdata.Sum[int64])
+ assert.True(t, ok)
+ assert.Len(t, d.DataPoints, 1)
+ attrSet := d.DataPoints[0].Attributes
+ fooAtrr, ok := attrSet.Value(attribute.Key("foo"))
+ assert.True(t, ok)
+ assert.Equal(t, "fooValue", fooAtrr.AsString())
+ barAtrr, ok := attrSet.Value(attribute.Key("bar"))
+ assert.True(t, ok)
+ assert.Equal(t, "barValue", barAtrr.AsString())
+ assert.False(t, attrSet.HasValue(attribute.Key("baz")))
+ case clientDuration:
+ d, ok := m.Data.(metricdata.Histogram[float64])
+ assert.True(t, ok)
+ assert.Len(t, d.DataPoints, 1)
+ attrSet := d.DataPoints[0].Attributes
+ fooAtrr, ok := attrSet.Value(attribute.Key("foo"))
+ assert.True(t, ok)
+ assert.Equal(t, "fooValue", fooAtrr.AsString())
+ barAtrr, ok := attrSet.Value(attribute.Key("bar"))
+ assert.True(t, ok)
+ assert.Equal(t, "barValue", barAtrr.AsString())
+ assert.False(t, attrSet.HasValue(attribute.Key("baz")))
+ }
+ }
+}
diff --git a/instrumentation/net/http/otelhttp/transport.go b/instrumentation/net/http/otelhttp/transport.go
index 8a25e586574..5c803d02dbc 100644
--- a/instrumentation/net/http/otelhttp/transport.go
+++ b/instrumentation/net/http/otelhttp/transport.go
@@ -137,8 +137,10 @@ func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) {
ctx = httptrace.WithClientTrace(ctx, t.clientTrace(ctx))
}
- labeler := &Labeler{}
- ctx = injectLabeler(ctx, labeler)
+ labeler, found := LabelerFromContext(ctx)
+ if !found {
+ ctx = ContextWithLabeler(ctx, labeler)
+ }
r = r.Clone(ctx) // According to RoundTripper spec, we shouldn't modify the origin request.
From 1808301d09ad7f9695cb7ebd01244102f49df0d1 Mon Sep 17 00:00:00 2001
From: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Date: Thu, 30 May 2024 02:16:13 +1000
Subject: [PATCH 06/18] Use more efficient `WithAttributeSet()` (#5664)
https://github.com/open-telemetry/opentelemetry-go/blob/5661ff0ded32cf1b83f1147dae96ca403c198504/metric/instrument.go#L349-L364
Since all the usage places of `WithAttributes()` operate on a locally
allocated slice, there is no need to make a defensive copy.
---------
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Tyler Yahn
---
CHANGELOG.md | 5 +++++
.../google.golang.org/grpc/otelgrpc/interceptor.go | 2 +-
.../grpc/otelgrpc/stats_handler.go | 13 ++++++++-----
instrumentation/net/http/otelhttp/handler.go | 8 +++++---
instrumentation/net/http/otelhttp/transport.go | 14 +++++++-------
5 files changed, 26 insertions(+), 16 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bbbe422615d..d5e9d73b4bb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -57,6 +57,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
[#5553]: https://github.com/open-telemetry/opentelemetry-go-contrib/issues/5553
[#5554]: https://github.com/open-telemetry/opentelemetry-go-contrib/issues/5554
+### Changed
+
+- Improve performance of `go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc` with the usage of `WithAttributeSet()` instead of `WithAttribute()`. (#5664)
+- Improve performance of `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` with the usage of `WithAttributeSet()` instead of `WithAttribute()`. (#5664)
+
## [1.27.0/0.52.0/0.21.0/0.7.0/0.2.0] - 2024-05-21
### Added
diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go b/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go
index 7f19058e4c4..58c3a4bfada 100644
--- a/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go
+++ b/instrumentation/google.golang.org/grpc/otelgrpc/interceptor.go
@@ -333,7 +333,7 @@ func UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor {
elapsedTime := float64(time.Since(before)) / float64(time.Millisecond)
metricAttrs = append(metricAttrs, grpcStatusCodeAttr)
- cfg.rpcDuration.Record(ctx, elapsedTime, metric.WithAttributes(metricAttrs...))
+ cfg.rpcDuration.Record(ctx, elapsedTime, metric.WithAttributeSet(attribute.NewSet(metricAttrs...)))
return resp, err
}
diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go b/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go
index fad58733fec..201867a8694 100644
--- a/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go
+++ b/instrumentation/google.golang.org/grpc/otelgrpc/stats_handler.go
@@ -151,7 +151,7 @@ func (c *config) handleRPC(ctx context.Context, rs stats.RPCStats, isServer bool
case *stats.InPayload:
if gctx != nil {
messageId = atomic.AddInt64(&gctx.messagesReceived, 1)
- c.rpcRequestSize.Record(ctx, int64(rs.Length), metric.WithAttributes(metricAttrs...))
+ c.rpcRequestSize.Record(ctx, int64(rs.Length), metric.WithAttributeSet(attribute.NewSet(metricAttrs...)))
}
if c.ReceivedEvent {
@@ -167,7 +167,7 @@ func (c *config) handleRPC(ctx context.Context, rs stats.RPCStats, isServer bool
case *stats.OutPayload:
if gctx != nil {
messageId = atomic.AddInt64(&gctx.messagesSent, 1)
- c.rpcResponseSize.Record(ctx, int64(rs.Length), metric.WithAttributes(metricAttrs...))
+ c.rpcResponseSize.Record(ctx, int64(rs.Length), metric.WithAttributeSet(attribute.NewSet(metricAttrs...)))
}
if c.SentEvent {
@@ -204,14 +204,17 @@ func (c *config) handleRPC(ctx context.Context, rs stats.RPCStats, isServer bool
span.End()
metricAttrs = append(metricAttrs, rpcStatusAttr)
+ // Allocate vararg slice once.
+ recordOpts := []metric.RecordOption{metric.WithAttributeSet(attribute.NewSet(metricAttrs...))}
// Use floating point division here for higher precision (instead of Millisecond method).
+ // Measure right before calling Record() to capture as much elapsed time as possible.
elapsedTime := float64(rs.EndTime.Sub(rs.BeginTime)) / float64(time.Millisecond)
- c.rpcDuration.Record(ctx, elapsedTime, metric.WithAttributes(metricAttrs...))
+ c.rpcDuration.Record(ctx, elapsedTime, recordOpts...)
if gctx != nil {
- c.rpcRequestsPerRPC.Record(ctx, atomic.LoadInt64(&gctx.messagesReceived), metric.WithAttributes(metricAttrs...))
- c.rpcResponsesPerRPC.Record(ctx, atomic.LoadInt64(&gctx.messagesSent), metric.WithAttributes(metricAttrs...))
+ c.rpcRequestsPerRPC.Record(ctx, atomic.LoadInt64(&gctx.messagesReceived), recordOpts...)
+ c.rpcResponsesPerRPC.Record(ctx, atomic.LoadInt64(&gctx.messagesSent), recordOpts...)
}
default:
return
diff --git a/instrumentation/net/http/otelhttp/handler.go b/instrumentation/net/http/otelhttp/handler.go
index cdb11dd7a5e..d01bdccf40d 100644
--- a/instrumentation/net/http/otelhttp/handler.go
+++ b/instrumentation/net/http/otelhttp/handler.go
@@ -12,6 +12,7 @@ import (
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil"
"go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/trace"
@@ -230,9 +231,10 @@ func (h *middleware) serveHTTP(w http.ResponseWriter, r *http.Request, next http
if rww.statusCode > 0 {
attributes = append(attributes, semconv.HTTPStatusCode(rww.statusCode))
}
- o := metric.WithAttributes(attributes...)
- h.requestBytesCounter.Add(ctx, bw.read.Load(), o)
- h.responseBytesCounter.Add(ctx, rww.written, o)
+ o := metric.WithAttributeSet(attribute.NewSet(attributes...))
+ addOpts := []metric.AddOption{o} // Allocate vararg slice once.
+ h.requestBytesCounter.Add(ctx, bw.read.Load(), addOpts...)
+ h.responseBytesCounter.Add(ctx, rww.written, addOpts...)
// Use floating point division here for higher precision (instead of Millisecond method).
elapsedTime := float64(time.Since(requestStartTime)) / float64(time.Millisecond)
diff --git a/instrumentation/net/http/otelhttp/transport.go b/instrumentation/net/http/otelhttp/transport.go
index 5c803d02dbc..0d3cb2e4aa4 100644
--- a/instrumentation/net/http/otelhttp/transport.go
+++ b/instrumentation/net/http/otelhttp/transport.go
@@ -11,15 +11,14 @@ import (
"sync/atomic"
"time"
- "go.opentelemetry.io/otel/metric"
-
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil"
"go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
+ "go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/propagation"
- "go.opentelemetry.io/otel/trace"
-
semconv "go.opentelemetry.io/otel/semconv/v1.20.0"
+ "go.opentelemetry.io/otel/trace"
)
// Transport implements the http.RoundTripper interface and wraps
@@ -172,11 +171,12 @@ func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) {
if res.StatusCode > 0 {
metricAttrs = append(metricAttrs, semconv.HTTPStatusCode(res.StatusCode))
}
- o := metric.WithAttributes(metricAttrs...)
- t.requestBytesCounter.Add(ctx, bw.read.Load(), o)
+ o := metric.WithAttributeSet(attribute.NewSet(metricAttrs...))
+ addOpts := []metric.AddOption{o} // Allocate vararg slice once.
+ t.requestBytesCounter.Add(ctx, bw.read.Load(), addOpts...)
// For handling response bytes we leverage a callback when the client reads the http response
readRecordFunc := func(n int64) {
- t.responseBytesCounter.Add(ctx, n, o)
+ t.responseBytesCounter.Add(ctx, n, addOpts...)
}
// traces
From 73047f8aad03f27977e85ab703cc628260d7d27a Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Wed, 29 May 2024 10:28:33 -0700
Subject: [PATCH 07/18] fix(deps): update golang.org/x/tools digest to e229045
(#5674)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| golang.org/x/tools | require | digest | `59d9797` -> `e229045` |
---
### 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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](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 | 2 +-
tools/go.sum | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/go.mod b/tools/go.mod
index 452f605ca1b..85de313997a 100644
--- a/tools/go.mod
+++ b/tools/go.mod
@@ -14,7 +14,7 @@ require (
go.opentelemetry.io/build-tools/gotmpl v0.13.0
go.opentelemetry.io/build-tools/multimod v0.13.0
golang.org/x/exp v0.0.0-20240525044651-4c93da0ed11d
- golang.org/x/tools v0.21.1-0.20240514024235-59d9797072e7
+ golang.org/x/tools v0.21.1-0.20240529141352-e2290455dc6c
golang.org/x/vuln v1.1.1
)
diff --git a/tools/go.sum b/tools/go.sum
index ac068822f7a..db4b949caea 100644
--- a/tools/go.sum
+++ b/tools/go.sum
@@ -623,8 +623,8 @@ golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA=
golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k=
golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
-golang.org/x/tools v0.21.1-0.20240514024235-59d9797072e7 h1:DnP3aRQn/r68glNGB8/7+3iE77jA+YZZCxpfIXx2MdA=
-golang.org/x/tools v0.21.1-0.20240514024235-59d9797072e7/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
+golang.org/x/tools v0.21.1-0.20240529141352-e2290455dc6c h1:I12uqq6lpmWhQniHt8vwrsvmKNHcyZM3cq0E7vndC+o=
+golang.org/x/tools v0.21.1-0.20240529141352-e2290455dc6c/go.mod h1:bqv7PJ/TtlrzgJKhOAGdDUkUltQapRik/UEHubLVBWo=
golang.org/x/vuln v1.1.1 h1:4nYQg4OSr7uYQMtjuuYqLAEVuTjY4k/CPMYqvv5OPcI=
golang.org/x/vuln v1.1.1/go.mod h1:hNgE+SKMSp2wHVUpW0Ow2ejgKpNJePdML+4YjxrVxik=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
From 82e86fac97117be334240676883c264c09146ec5 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Wed, 29 May 2024 10:43:30 -0700
Subject: [PATCH 08/18] fix(deps): update golang.org/x/exp digest to 23cca88
(#5677)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| golang.org/x/exp | require | digest | `4c93da0` -> `23cca88` |
---
### 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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](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 | 2 +-
tools/go.sum | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/go.mod b/tools/go.mod
index 85de313997a..7a0622697d9 100644
--- a/tools/go.mod
+++ b/tools/go.mod
@@ -13,7 +13,7 @@ require (
go.opentelemetry.io/build-tools/crosslink v0.13.0
go.opentelemetry.io/build-tools/gotmpl v0.13.0
go.opentelemetry.io/build-tools/multimod v0.13.0
- golang.org/x/exp v0.0.0-20240525044651-4c93da0ed11d
+ golang.org/x/exp v0.0.0-20240529005216-23cca8864a10
golang.org/x/tools v0.21.1-0.20240529141352-e2290455dc6c
golang.org/x/vuln v1.1.1
)
diff --git a/tools/go.sum b/tools/go.sum
index db4b949caea..9eef09c24fd 100644
--- a/tools/go.sum
+++ b/tools/go.sum
@@ -508,8 +508,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.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
-golang.org/x/exp v0.0.0-20240525044651-4c93da0ed11d h1:N0hmiNbwsSNwHBAvR3QB5w25pUwH4tK0Y/RltD1j1h4=
-golang.org/x/exp v0.0.0-20240525044651-4c93da0ed11d/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc=
+golang.org/x/exp v0.0.0-20240529005216-23cca8864a10 h1:vpzMC/iZhYFAjJzHU0Cfuq+w1vLLsF2vLkDrPjzKYck=
+golang.org/x/exp v0.0.0-20240529005216-23cca8864a10/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc=
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=
From fa9fc0cf0b33211ff66d836e6636aa98b9e6f293 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Wed, 29 May 2024 11:00:13 -0700
Subject: [PATCH 09/18] fix(deps): update module
github.com/aws/aws-sdk-go-v2/service/dynamodb to v1.32.6 (#5678)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/aws/aws-sdk-go-v2/service/dynamodb](https://togithub.com/aws/aws-sdk-go-v2)
| `v1.32.5` -> `v1.32.6` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2faws%2faws-sdk-go-v2%2fservice%2fdynamodb/v1.32.6?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%2fdynamodb/v1.32.6?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%2fdynamodb/v1.32.5/v1.32.6?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%2fdynamodb/v1.32.5/v1.32.6?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 these
updates again.
---
- [ ] If you want to rebase/retry this PR, check
this box
---
This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](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 ++--
instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/go.mod | 2 +-
instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/go.sum | 4 ++--
.../github.com/aws/aws-sdk-go-v2/otelaws/test/go.mod | 2 +-
.../github.com/aws/aws-sdk-go-v2/otelaws/test/go.sum | 4 ++--
8 files changed, 12 insertions(+), 12 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 3a35ab57178..a27cce6367b 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
@@ -32,7 +32,7 @@ require (
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.7 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.7 // indirect
- github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.5 // indirect
+ github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.6 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.9 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.9.8 // indirect
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 6d64b066a90..d4fc834a29c 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
@@ -18,8 +18,8 @@ github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.7 h1:/FUtT3xsoHO3cfh+I/kCbcMCN98QZRsiFet/V8QkWSs=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.7/go.mod h1:MaCAgWpGooQoCWZnMur97rGn5dp350w2+CeiV5406wE=
-github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.5 h1:HLbOhDOP/191cJLS829oCL8sn9tXF6qhAjh1emp8TEE=
-github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.5/go.mod h1:uNhUf9Z3MT6Ex+u0ADa8r3MKK5zjuActEfXQPo4YqEI=
+github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.6 h1:170E8A7abwLNy8wF53Wu496IaIlQ+DYQLgCbTqhYf/M=
+github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.6/go.mod h1:uNhUf9Z3MT6Ex+u0ADa8r3MKK5zjuActEfXQPo4YqEI=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.9 h1:UXqEWQI0n+q0QixzU0yUUQBZXRd5037qdInTIHFTl98=
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 c78973ec1eb..1da5627e695 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 @@ replace go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2
require (
github.com/aws/aws-sdk-go-v2 v1.27.0
github.com/aws/aws-sdk-go-v2/config v1.27.16
- github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.5
+ github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.6
github.com/aws/aws-sdk-go-v2/service/s3 v1.54.3
go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.52.0
go.opentelemetry.io/otel v1.27.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 62cd6ff1424..ea1070d5163 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
@@ -16,8 +16,8 @@ github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.7 h1:/FUtT3xsoHO3cfh+I/kCbcMCN98QZRsiFet/V8QkWSs=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.7/go.mod h1:MaCAgWpGooQoCWZnMur97rGn5dp350w2+CeiV5406wE=
-github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.5 h1:HLbOhDOP/191cJLS829oCL8sn9tXF6qhAjh1emp8TEE=
-github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.5/go.mod h1:uNhUf9Z3MT6Ex+u0ADa8r3MKK5zjuActEfXQPo4YqEI=
+github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.6 h1:170E8A7abwLNy8wF53Wu496IaIlQ+DYQLgCbTqhYf/M=
+github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.6/go.mod h1:uNhUf9Z3MT6Ex+u0ADa8r3MKK5zjuActEfXQPo4YqEI=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.9 h1:UXqEWQI0n+q0QixzU0yUUQBZXRd5037qdInTIHFTl98=
diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/go.mod b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/go.mod
index 4c3dcc80b68..7e7a42c2b71 100644
--- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/go.mod
+++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/go.mod
@@ -5,7 +5,7 @@ go 1.21
require (
github.com/aws/aws-sdk-go-v2 v1.27.0
- github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.5
+ github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.6
github.com/aws/aws-sdk-go-v2/service/sqs v1.32.3
github.com/aws/smithy-go v1.20.2
github.com/stretchr/testify v1.9.0
diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/go.sum b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/go.sum
index bb04275448b..2e74f1fd769 100644
--- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/go.sum
+++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/go.sum
@@ -4,8 +4,8 @@ github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.7 h1:lf/8VTF2cM+N4SLzaY
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.7/go.mod h1:4SjkU7QiqK2M9oozyMzfZ/23LmUY+h3oFqhdeP5OMiI=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.7 h1:4OYVp0705xu8yjdyoWix0r9wPIRXnIzzOoUpQVHIJ/g=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.7/go.mod h1:vd7ESTEvI76T2Na050gODNmNU7+OyKrIKroYTu4ABiI=
-github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.5 h1:HLbOhDOP/191cJLS829oCL8sn9tXF6qhAjh1emp8TEE=
-github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.5/go.mod h1:uNhUf9Z3MT6Ex+u0ADa8r3MKK5zjuActEfXQPo4YqEI=
+github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.6 h1:170E8A7abwLNy8wF53Wu496IaIlQ+DYQLgCbTqhYf/M=
+github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.6/go.mod h1:uNhUf9Z3MT6Ex+u0ADa8r3MKK5zjuActEfXQPo4YqEI=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg=
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.9.8 h1:yEeIld7Fh/2iM4pYeQw8a3kH6OYcyIn6lwKlUFiVk7Y=
diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/go.mod b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/go.mod
index 6a06c759bb5..ad792916c41 100644
--- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/go.mod
+++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/go.mod
@@ -5,7 +5,7 @@ go 1.21
require (
github.com/aws/aws-sdk-go-v2 v1.27.0
- github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.5
+ github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.6
github.com/aws/aws-sdk-go-v2/service/route53 v1.40.8
github.com/aws/smithy-go v1.20.2
github.com/stretchr/testify v1.9.0
diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/go.sum b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/go.sum
index 8aeb0a7cd58..40101f71000 100644
--- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/go.sum
+++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/go.sum
@@ -4,8 +4,8 @@ github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.7 h1:lf/8VTF2cM+N4SLzaY
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.7/go.mod h1:4SjkU7QiqK2M9oozyMzfZ/23LmUY+h3oFqhdeP5OMiI=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.7 h1:4OYVp0705xu8yjdyoWix0r9wPIRXnIzzOoUpQVHIJ/g=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.7/go.mod h1:vd7ESTEvI76T2Na050gODNmNU7+OyKrIKroYTu4ABiI=
-github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.5 h1:HLbOhDOP/191cJLS829oCL8sn9tXF6qhAjh1emp8TEE=
-github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.5/go.mod h1:uNhUf9Z3MT6Ex+u0ADa8r3MKK5zjuActEfXQPo4YqEI=
+github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.6 h1:170E8A7abwLNy8wF53Wu496IaIlQ+DYQLgCbTqhYf/M=
+github.com/aws/aws-sdk-go-v2/service/dynamodb v1.32.6/go.mod h1:uNhUf9Z3MT6Ex+u0ADa8r3MKK5zjuActEfXQPo4YqEI=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg=
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.9.8 h1:yEeIld7Fh/2iM4pYeQw8a3kH6OYcyIn6lwKlUFiVk7Y=
From 691acb969cf856f28cdc7b2f68d3567299f74d2d Mon Sep 17 00:00:00 2001
From: Mikhail Mazurskiy <126021+ash2k@users.noreply.github.com>
Date: Fri, 31 May 2024 00:51:27 +1000
Subject: [PATCH 10/18] Use passthrough resolver when bufnet is used (#5676)
Fixes a regressions introduced in
https://github.com/open-telemetry/opentelemetry-go-contrib/pull/5379/commits/5fdddf20b91abba6a675a60ab0bbe22c29cf9228.
`NewClient()` uses the DNS resolver vs old funcs used the `passthrough`
resolver by default. So, the code tries to do DNS resolution on
addresses like `bufnet`, `fake`, etc.
Co-authored-by: Tyler Yahn
---
.../google.golang.org/grpc/otelgrpc/benchmark_test.go | 2 +-
.../google.golang.org/grpc/otelgrpc/test/grpc_test.go | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/benchmark_test.go b/instrumentation/google.golang.org/grpc/otelgrpc/benchmark_test.go
index 4d9282397cb..544b28811c3 100644
--- a/instrumentation/google.golang.org/grpc/otelgrpc/benchmark_test.go
+++ b/instrumentation/google.golang.org/grpc/otelgrpc/benchmark_test.go
@@ -39,7 +39,7 @@ func benchmark(b *testing.B, cOpt []grpc.DialOption, sOpt []grpc.ServerOption) {
ctx := context.Background()
dial := func(context.Context, string) (net.Conn, error) { return l.Dial() }
conn, err := grpc.NewClient(
- "bufnet",
+ "passthrough:bufnet",
append([]grpc.DialOption{
grpc.WithContextDialer(dial),
grpc.WithTransportCredentials(insecure.NewCredentials()),
diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/test/grpc_test.go b/instrumentation/google.golang.org/grpc/otelgrpc/test/grpc_test.go
index 004b07085cf..991fad2efd6 100644
--- a/instrumentation/google.golang.org/grpc/otelgrpc/test/grpc_test.go
+++ b/instrumentation/google.golang.org/grpc/otelgrpc/test/grpc_test.go
@@ -50,13 +50,16 @@ func newGrpcTest(t testing.TB, listener net.Listener, cOpt []grpc.DialOption, sO
cOpt = append(cOpt, grpc.WithTransportCredentials(insecure.NewCredentials()))
+ dialAddr := listener.Addr().String()
+
if l, ok := listener.(interface{ Dial() (net.Conn, error) }); ok {
dial := func(context.Context, string) (net.Conn, error) { return l.Dial() }
cOpt = append(cOpt, grpc.WithContextDialer(dial))
+ dialAddr = "passthrough:" + dialAddr
}
conn, err := grpc.NewClient(
- listener.Addr().String(),
+ dialAddr,
cOpt...,
)
require.NoError(t, err)
From a7ba25f0d7de78f5adb06bc09c341db4d9b4b3a9 Mon Sep 17 00:00:00 2001
From: Damien Mathieu <42@dmathieu.com>
Date: Thu, 30 May 2024 17:53:46 +0200
Subject: [PATCH 11/18] Add link to codeowners policy in codeowners file
(#5680)
I was looking at the CODEOWNERS file, and I think it would be more
helpful for folks looking at it with a link to our codeowners policy.
Co-authored-by: Tyler Yahn
---
CODEOWNERS | 3 +++
1 file changed, 3 insertions(+)
diff --git a/CODEOWNERS b/CODEOWNERS
index dc6b156f72a..23e7f61b6c8 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -7,6 +7,9 @@
# Learn about membership in OpenTelemetry community:
# https://github.com/open-telemetry/community/blob/main/community-membership.md
#
+# Learn about Code Owners policy in OpenTelemetry Go Contrib:
+# https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CONTRIBUTING.md#code-owners
+#
#
# Learn about CODEOWNERS file format:
# https://help.github.com/en/articles/about-code-owners
From ceca0dc08f8b1fa7742c6e1756ccb4f0c6fcb852 Mon Sep 17 00:00:00 2001
From: Alex Boten <223565+codeboten@users.noreply.github.com>
Date: Thu, 30 May 2024 10:31:25 -0700
Subject: [PATCH 12/18] [chore] ensure codecov uses token (#5687)
This was done in the collector & collector-contrib repos and makes
tokenless ratelimiting errors go away.
---
.github/workflows/ci.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a686d8255a3..3d370e3be27 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -87,11 +87,12 @@ jobs:
cp coverage.html $TEST_RESULTS
- name: Upload coverage report
uses: codecov/codecov-action@v4.4.1
+ env:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: ./coverage.txt
fail_ci_if_error: true
verbose: true
- token: ${{ secrets.CODECOV_TOKEN }}
- name: Store coverage test output
uses: actions/upload-artifact@v4
with:
From c25d49a443d7b0bb9889ba0a0a77205aa22fe0a5 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Thu, 30 May 2024 10:51:59 -0700
Subject: [PATCH 13/18] fix(deps): update golang.org/x/tools digest to 8d54ca1
(#5685)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| golang.org/x/tools | require | digest | `e229045` -> `8d54ca1` |
---
### 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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](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 | 2 +-
tools/go.sum | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/go.mod b/tools/go.mod
index 7a0622697d9..02476f5ec51 100644
--- a/tools/go.mod
+++ b/tools/go.mod
@@ -14,7 +14,7 @@ require (
go.opentelemetry.io/build-tools/gotmpl v0.13.0
go.opentelemetry.io/build-tools/multimod v0.13.0
golang.org/x/exp v0.0.0-20240529005216-23cca8864a10
- golang.org/x/tools v0.21.1-0.20240529141352-e2290455dc6c
+ golang.org/x/tools v0.21.1-0.20240530161422-8d54ca127f86
golang.org/x/vuln v1.1.1
)
diff --git a/tools/go.sum b/tools/go.sum
index 9eef09c24fd..01ffeb49d32 100644
--- a/tools/go.sum
+++ b/tools/go.sum
@@ -623,8 +623,8 @@ golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA=
golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k=
golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
-golang.org/x/tools v0.21.1-0.20240529141352-e2290455dc6c h1:I12uqq6lpmWhQniHt8vwrsvmKNHcyZM3cq0E7vndC+o=
-golang.org/x/tools v0.21.1-0.20240529141352-e2290455dc6c/go.mod h1:bqv7PJ/TtlrzgJKhOAGdDUkUltQapRik/UEHubLVBWo=
+golang.org/x/tools v0.21.1-0.20240530161422-8d54ca127f86 h1:Yr0jq8DmSSDRAvU4U/C7FodejqA4XxqmW71ap3MP5fI=
+golang.org/x/tools v0.21.1-0.20240530161422-8d54ca127f86/go.mod h1:bqv7PJ/TtlrzgJKhOAGdDUkUltQapRik/UEHubLVBWo=
golang.org/x/vuln v1.1.1 h1:4nYQg4OSr7uYQMtjuuYqLAEVuTjY4k/CPMYqvv5OPcI=
golang.org/x/vuln v1.1.1/go.mod h1:hNgE+SKMSp2wHVUpW0Ow2ejgKpNJePdML+4YjxrVxik=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
From 97262f1650970816e8375e5003c2f4ce1027a8b9 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Thu, 30 May 2024 11:00:30 -0700
Subject: [PATCH 14/18] fix(deps): update module github.com/aws/aws-sdk-go to
v1.53.12 (#5684)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/aws/aws-sdk-go](https://togithub.com/aws/aws-sdk-go) |
`v1.53.11` -> `v1.53.12` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2faws%2faws-sdk-go/v1.53.12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2faws%2faws-sdk-go/v1.53.12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2faws%2faws-sdk-go/v1.53.11/v1.53.12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2faws%2faws-sdk-go/v1.53.11/v1.53.12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
---
### Release Notes
aws/aws-sdk-go (github.com/aws/aws-sdk-go)
###
[`v1.53.12`](https://togithub.com/aws/aws-sdk-go/blob/HEAD/CHANGELOG.md#Release-v15312-2024-05-29)
[Compare
Source](https://togithub.com/aws/aws-sdk-go/compare/v1.53.11...v1.53.12)
\===
##### Service Client Updates
- `service/athena`: Updates service API and documentation
- Throwing validation errors on CreateNotebook with Name containing
`/`,`:`,`\`
- `service/codebuild`: Updates service API and documentation
- AWS CodeBuild now supports manually creating GitHub webhooks
- `service/connect`: Updates service API and documentation
- `service/glue`: Updates service API and documentation
- Add optional field JobMode to CreateJob and UpdateJob APIs.
- `service/securityhub`: Updates service API
---
### 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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/open-telemetry/opentelemetry-go-contrib).
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn
---
detectors/aws/ec2/go.mod | 2 +-
detectors/aws/ec2/go.sum | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/detectors/aws/ec2/go.mod b/detectors/aws/ec2/go.mod
index e6b4a119db7..179d7a7725d 100644
--- a/detectors/aws/ec2/go.mod
+++ b/detectors/aws/ec2/go.mod
@@ -4,7 +4,7 @@ module go.opentelemetry.io/contrib/detectors/aws/ec2
go 1.21
require (
- github.com/aws/aws-sdk-go v1.53.11
+ github.com/aws/aws-sdk-go v1.53.12
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/otel v1.27.0
go.opentelemetry.io/otel/sdk v1.27.0
diff --git a/detectors/aws/ec2/go.sum b/detectors/aws/ec2/go.sum
index e253fef3e9c..5975e4755d2 100644
--- a/detectors/aws/ec2/go.sum
+++ b/detectors/aws/ec2/go.sum
@@ -1,5 +1,5 @@
-github.com/aws/aws-sdk-go v1.53.11 h1:KcmduYvX15rRqt4ZU/7jKkmDxU/G87LJ9MUI0yQJh00=
-github.com/aws/aws-sdk-go v1.53.11/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
+github.com/aws/aws-sdk-go v1.53.12 h1:8f8K+YaTy2qwtGwVIo2Ftq22UCH96xQAX7Q0lyZKDiA=
+github.com/aws/aws-sdk-go v1.53.12/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
From 505075ead92de4c7ab55cdb3baca266516143980 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Thu, 30 May 2024 11:18:11 -0700
Subject: [PATCH 15/18] fix(deps): update golang.org/x/tools digest to 2e977dd
(#5689)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| golang.org/x/tools | require | digest | `8d54ca1` -> `2e977dd` |
---
### 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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](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 | 2 +-
tools/go.sum | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/go.mod b/tools/go.mod
index 02476f5ec51..9e165dba4e3 100644
--- a/tools/go.mod
+++ b/tools/go.mod
@@ -14,7 +14,7 @@ require (
go.opentelemetry.io/build-tools/gotmpl v0.13.0
go.opentelemetry.io/build-tools/multimod v0.13.0
golang.org/x/exp v0.0.0-20240529005216-23cca8864a10
- golang.org/x/tools v0.21.1-0.20240530161422-8d54ca127f86
+ golang.org/x/tools v0.21.1-0.20240530172721-2e977dddbb63
golang.org/x/vuln v1.1.1
)
diff --git a/tools/go.sum b/tools/go.sum
index 01ffeb49d32..78e24ad94d7 100644
--- a/tools/go.sum
+++ b/tools/go.sum
@@ -623,8 +623,8 @@ golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA=
golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k=
golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
-golang.org/x/tools v0.21.1-0.20240530161422-8d54ca127f86 h1:Yr0jq8DmSSDRAvU4U/C7FodejqA4XxqmW71ap3MP5fI=
-golang.org/x/tools v0.21.1-0.20240530161422-8d54ca127f86/go.mod h1:bqv7PJ/TtlrzgJKhOAGdDUkUltQapRik/UEHubLVBWo=
+golang.org/x/tools v0.21.1-0.20240530172721-2e977dddbb63 h1:fy+uWS2VS1taJFCdSoczCXLd92eFJsXlnxX71y8zVuY=
+golang.org/x/tools v0.21.1-0.20240530172721-2e977dddbb63/go.mod h1:bqv7PJ/TtlrzgJKhOAGdDUkUltQapRik/UEHubLVBWo=
golang.org/x/vuln v1.1.1 h1:4nYQg4OSr7uYQMtjuuYqLAEVuTjY4k/CPMYqvv5OPcI=
golang.org/x/vuln v1.1.1/go.mod h1:hNgE+SKMSp2wHVUpW0Ow2ejgKpNJePdML+4YjxrVxik=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
From db38424bfc03a828c7a666ca2f0bdfb372e27302 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A4=A7=E5=8F=AF?=
Date: Fri, 31 May 2024 02:25:20 +0800
Subject: [PATCH 16/18] fix: OTEL_TRACES_EXPORTER typo (#5686)
Co-authored-by: Tyler Yahn
---
exporters/autoexport/spans.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/exporters/autoexport/spans.go b/exporters/autoexport/spans.go
index ecb699f8f6b..c25dc9b0ae7 100644
--- a/exporters/autoexport/spans.go
+++ b/exporters/autoexport/spans.go
@@ -55,7 +55,7 @@ func NewSpanExporter(ctx context.Context, opts ...SpanOption) (trace.SpanExporte
}
// RegisterSpanExporter sets the SpanExporter factory to be used when the
-// OTEL_TRACES_EXPORTERS environment variable contains the exporter name. This
+// OTEL_TRACES_EXPORTER environment variable contains the exporter name. This
// will panic if name has already been registered.
func RegisterSpanExporter(name string, factory func(context.Context) (trace.SpanExporter, error)) {
must(tracesSignal.registry.store(name, factory))
From 59a2c1df41505736af0954e45f1b09a9b9cfad5a Mon Sep 17 00:00:00 2001
From: Damien Mathieu <42@dmathieu.com>
Date: Thu, 30 May 2024 22:14:13 +0200
Subject: [PATCH 17/18] Add otelhttp Handler.ServeHTTP and Transport.RoundTrip
benchmarks (#5681)
This adds high-level benchmarks for `otelhttp.Handler.ServeHTTP` and
`otelhttp.Transport.RoundTrip`, as well as a benchmark comparison
without those wrappers.
Related: #5664.
Current results on my machine:
```
goos: darwin
goarch: arm64
pkg: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/test
BenchmarkHandlerServeHTTP/without_the_otelhttp_handler-10 37971928 31.35 ns/op 28 B/op 0 allocs/op
BenchmarkHandlerServeHTTP/with_the_otelhttp_handler-10 435142 2723 ns/op 5585 B/op 35 allocs/op
BenchmarkTransportRoundTrip/without_the_otelhttp_transport-10 11430 401735 ns/op 24436 B/op 117 allocs/op
BenchmarkTransportRoundTrip/with_the_otelhttp_transport-10 278 4367998 ns/op 5416 B/op 85 allocs/op
PASS
ok go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/test 10.056s
```
---------
Co-authored-by: Tyler Yahn
---
.../net/http/otelhttp/test/handler_test.go | 51 +++++++++++++--
.../net/http/otelhttp/test/transport_test.go | 64 +++++++++++++++----
2 files changed, 99 insertions(+), 16 deletions(-)
diff --git a/instrumentation/net/http/otelhttp/test/handler_test.go b/instrumentation/net/http/otelhttp/test/handler_test.go
index 2fe39555243..e500b493d42 100644
--- a/instrumentation/net/http/otelhttp/test/handler_test.go
+++ b/instrumentation/net/http/otelhttp/test/handler_test.go
@@ -21,7 +21,7 @@ import (
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/instrumentation"
- "go.opentelemetry.io/otel/sdk/metric"
+ sdkmetric "go.opentelemetry.io/otel/sdk/metric"
"go.opentelemetry.io/otel/sdk/metric/metricdata"
"go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
@@ -80,8 +80,8 @@ func TestHandlerBasics(t *testing.T) {
spanRecorder := tracetest.NewSpanRecorder()
provider := sdktrace.NewTracerProvider(sdktrace.WithSpanProcessor(spanRecorder))
- reader := metric.NewManualReader()
- meterProvider := metric.NewMeterProvider(metric.WithReader(reader))
+ reader := sdkmetric.NewManualReader()
+ meterProvider := sdkmetric.NewMeterProvider(sdkmetric.WithReader(reader))
h := otelhttp.NewHandler(
http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
@@ -469,8 +469,8 @@ func TestWithRouteTag(t *testing.T) {
tracerProvider := sdktrace.NewTracerProvider()
tracerProvider.RegisterSpanProcessor(spanRecorder)
- metricReader := metric.NewManualReader()
- meterProvider := metric.NewMeterProvider(metric.WithReader(metricReader))
+ metricReader := sdkmetric.NewManualReader()
+ meterProvider := sdkmetric.NewMeterProvider(sdkmetric.WithReader(metricReader))
h := otelhttp.NewHandler(
otelhttp.WithRouteTag(
@@ -528,3 +528,44 @@ func TestWithRouteTag(t *testing.T) {
}
}
}
+
+func BenchmarkHandlerServeHTTP(b *testing.B) {
+ tp := sdktrace.NewTracerProvider()
+ mp := sdkmetric.NewMeterProvider()
+
+ r, err := http.NewRequest(http.MethodGet, "http://localhost/", nil)
+ require.NoError(b, err)
+
+ for _, bb := range []struct {
+ name string
+ handler http.Handler
+ }{
+ {
+ name: "without the otelhttp handler",
+ handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ fmt.Fprint(w, "Hello World")
+ }),
+ },
+ {
+ name: "with the otelhttp handler",
+ handler: otelhttp.NewHandler(
+ http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ fmt.Fprint(w, "Hello World")
+ }),
+ "test_handler",
+ otelhttp.WithTracerProvider(tp),
+ otelhttp.WithMeterProvider(mp),
+ ),
+ },
+ } {
+ b.Run(bb.name, func(b *testing.B) {
+ rr := httptest.NewRecorder()
+
+ b.ReportAllocs()
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ bb.handler.ServeHTTP(rr, r)
+ }
+ })
+ }
+}
diff --git a/instrumentation/net/http/otelhttp/test/transport_test.go b/instrumentation/net/http/otelhttp/test/transport_test.go
index d96aedb29ba..cfbc27cc2b2 100644
--- a/instrumentation/net/http/otelhttp/test/transport_test.go
+++ b/instrumentation/net/http/otelhttp/test/transport_test.go
@@ -6,6 +6,7 @@ package test
import (
"bytes"
"context"
+ "fmt"
"io"
"net"
"net/http"
@@ -16,7 +17,6 @@ import (
"strings"
"testing"
- "go.opentelemetry.io/otel/sdk/metric"
semconv "go.opentelemetry.io/otel/semconv/v1.20.0"
"github.com/stretchr/testify/assert"
@@ -24,14 +24,15 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/sdk/instrumentation"
+ sdkmetric "go.opentelemetry.io/otel/sdk/metric"
"go.opentelemetry.io/otel/sdk/metric/metricdata"
"go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest"
+ sdktrace "go.opentelemetry.io/otel/sdk/trace"
+ "go.opentelemetry.io/otel/sdk/trace/tracetest"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/propagation"
- sdktrace "go.opentelemetry.io/otel/sdk/trace"
- "go.opentelemetry.io/otel/sdk/trace/tracetest"
"go.opentelemetry.io/otel/trace"
)
@@ -244,8 +245,8 @@ func TestTransportMetrics(t *testing.T) {
responseBody := []byte("Hello, world!")
t.Run("make http request and read entire response at once", func(t *testing.T) {
- reader := metric.NewManualReader()
- meterProvider := metric.NewMeterProvider(metric.WithReader(reader))
+ reader := sdkmetric.NewManualReader()
+ meterProvider := sdkmetric.NewMeterProvider(sdkmetric.WithReader(reader))
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
@@ -302,8 +303,8 @@ func TestTransportMetrics(t *testing.T) {
})
t.Run("make http request and buffer response", func(t *testing.T) {
- reader := metric.NewManualReader()
- meterProvider := metric.NewMeterProvider(metric.WithReader(reader))
+ reader := sdkmetric.NewManualReader()
+ meterProvider := sdkmetric.NewMeterProvider(sdkmetric.WithReader(reader))
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
@@ -370,8 +371,8 @@ func TestTransportMetrics(t *testing.T) {
})
t.Run("make http request and close body before reading completely", func(t *testing.T) {
- reader := metric.NewManualReader()
- meterProvider := metric.NewMeterProvider(metric.WithReader(reader))
+ reader := sdkmetric.NewManualReader()
+ meterProvider := sdkmetric.NewMeterProvider(sdkmetric.WithReader(reader))
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
@@ -484,8 +485,8 @@ func TestCustomAttributesHandling(t *testing.T) {
clientDuration = "http.client.duration"
)
ctx := context.TODO()
- reader := metric.NewManualReader()
- provider := metric.NewMeterProvider(metric.WithReader(reader))
+ reader := sdkmetric.NewManualReader()
+ provider := sdkmetric.NewMeterProvider(sdkmetric.WithReader(reader))
defer func() {
err := provider.Shutdown(ctx)
if err != nil {
@@ -550,3 +551,44 @@ func TestCustomAttributesHandling(t *testing.T) {
}
}
}
+
+func BenchmarkTransportRoundTrip(b *testing.B) {
+ ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ fmt.Fprint(w, "Hello World")
+ }))
+ defer ts.Close()
+
+ tp := sdktrace.NewTracerProvider()
+ mp := sdkmetric.NewMeterProvider()
+
+ r, err := http.NewRequest(http.MethodGet, ts.URL, nil)
+ require.NoError(b, err)
+
+ for _, bb := range []struct {
+ name string
+ transport http.RoundTripper
+ }{
+ {
+ name: "without the otelhttp transport",
+ transport: http.DefaultTransport,
+ },
+ {
+ name: "with the otelhttp transport",
+ transport: otelhttp.NewTransport(
+ http.DefaultTransport,
+ otelhttp.WithTracerProvider(tp),
+ otelhttp.WithMeterProvider(mp),
+ ),
+ },
+ } {
+ b.Run(bb.name, func(b *testing.B) {
+ c := http.Client{Transport: bb.transport}
+
+ b.ReportAllocs()
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ _, _ = c.Do(r)
+ }
+ })
+ }
+}
From 2549d9ee57dfd3c74234db3dc06eaa4490671374 Mon Sep 17 00:00:00 2001
From: Jun <56640554+SequoiaGod@users.noreply.github.com>
Date: Thu, 30 May 2024 21:23:20 +0100
Subject: [PATCH 18/18] Add codespell to CI (#5683)
Closes #5659
### Summary of the changes in the code
1. Added the codespell GitHub workflow.
2. Added makefile command which is related the codespell.
3. Added the requirements.txt file which is used for install the
dependency package of Python.
---------
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Tyler Yahn
---
.codespellignore | 3 ++
.codespellrc | 10 +++++
.github/ISSUE_TEMPLATE/owner.md | 2 +-
.github/workflows/changelog.yml | 2 +-
.github/workflows/ci.yml | 2 +-
.github/workflows/codespell.yml | 14 +++++++
.gitignore | 1 +
.golangci.yml | 2 +-
CONTRIBUTING.md | 2 +-
Makefile | 37 +++++++++++++++++++
RELEASING.md | 2 +-
config/metric.go | 2 +-
detectors/aws/ecs/ecs_test.go | 2 +-
doc.go | 2 +-
exporters/autoexport/metrics.go | 4 +-
exporters/autoexport/spans.go | 2 +-
instrgen/lib/analysis.go | 2 +-
.../aws/aws-lambda-go/otellambda/README.md | 2 +-
.../xrayconfig/mock_collector_test.go | 2 +-
.../aws/aws-sdk-go-v2/otelaws/test/version.go | 2 +-
.../emicklei/go-restful/otelrestful/config.go | 2 +-
.../github.com/gorilla/mux/otelmux/config.go | 2 +-
.../mongo-driver/mongo/otelmongo/doc.go | 2 +-
.../mongo-driver/mongo/otelmongo/mongo.go | 2 +-
.../google.golang.org/grpc/otelgrpc/config.go | 2 +-
instrumentation/net/http/otelhttp/client.go | 2 +-
instrumentation/net/http/otelhttp/config.go | 2 +-
instrumentation/runtime/runtime.go | 2 +-
propagators/autoprop/registry_test.go | 2 +-
propagators/b3/b3_data_test.go | 2 +-
renovate.json | 5 +++
requirements.txt | 1 +
samplers/aws/xray/internal/reservoir_test.go | 2 +-
33 files changed, 98 insertions(+), 27 deletions(-)
create mode 100644 .codespellignore
create mode 100644 .codespellrc
create mode 100644 .github/workflows/codespell.yml
create mode 100644 requirements.txt
diff --git a/.codespellignore b/.codespellignore
new file mode 100644
index 00000000000..6299dcf9273
--- /dev/null
+++ b/.codespellignore
@@ -0,0 +1,3 @@
+ot
+fo
+
diff --git a/.codespellrc b/.codespellrc
new file mode 100644
index 00000000000..e2cb3ea944b
--- /dev/null
+++ b/.codespellrc
@@ -0,0 +1,10 @@
+# https://github.com/codespell-project/codespell
+[codespell]
+builtin = clear,rare,informal
+check-filenames =
+check-hidden =
+ignore-words = .codespellignore
+interactive = 1
+skip = .git,go.mod,go.sum,go.work,go.work.sum,semconv,venv,.tools
+uri-ignore-words-list = *
+write =
diff --git a/.github/ISSUE_TEMPLATE/owner.md b/.github/ISSUE_TEMPLATE/owner.md
index 834b66c10f0..39506162c67 100644
--- a/.github/ISSUE_TEMPLATE/owner.md
+++ b/.github/ISSUE_TEMPLATE/owner.md
@@ -20,7 +20,7 @@ Module: [e.g. go.opentelemetry.io/contrib/zpages]
[member of the OpenTelemetry organization]: https://github.com/open-telemetry/community/blob/main/community-membership.md#member
-### Relvant experience
+### Relevant experience
List any PRs/Issues you have interacted with in this repository for this module.
diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml
index 29c95172f97..2cd1e4d2676 100644
--- a/.github/workflows/changelog.yml
+++ b/.github/workflows/changelog.yml
@@ -1,6 +1,6 @@
# This action requires that any PR targeting the main branch should touch at
# least one CHANGELOG file. If a CHANGELOG entry is not required, or if
-# performing maintance on the Changelog, add either \"[chore]\" to the title of
+# performing maintenance on the Changelog, add either \"[chore]\" to the title of
# the pull request or add the \"Skip Changelog\" label to disable this action.
name: changelog
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3d370e3be27..43fa8765428 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -105,7 +105,7 @@ jobs:
go-version: ["~1.22.3", "~1.21.10"]
os: [ubuntu-latest, macos-latest, windows-latest]
# GitHub Actions does not support arm* architectures on default
- # runners. It is possible to acomplish this with a self-hosted runner
+ # runners. It is possible to accomplish this with a self-hosted runner
# if we want to add this in the future:
# https://docs.github.com/en/actions/hosting-your-own-runners/using-self-hosted-runners-in-a-workflow
arch: ["386", amd64]
diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml
new file mode 100644
index 00000000000..865596f9f27
--- /dev/null
+++ b/.github/workflows/codespell.yml
@@ -0,0 +1,14 @@
+name: codespell
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+jobs:
+ codespell:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Repo
+ uses: actions/checkout@v4
+ - name: Codespell
+ run: make codespell
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index becf2605870..fcbbf1441d5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
Thumbs.db
.tools/
+venv/
.idea/
.vscode/
*.iml
diff --git a/.golangci.yml b/.golangci.yml
index 4691ddbf412..e3962bf918f 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -106,7 +106,7 @@ linters-settings:
- name: constant-logical-expr
disabled: false
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-as-argument
- # TODO (#2877) reenable linter when it is compatible. https://github.com/golangci/golangci-lint/issues/3280
+ # TODO (#2877) re-enable linter when it is compatible. https://github.com/golangci/golangci-lint/issues/3280
- name: context-as-argument
disabled: true
arguments:
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index e9fa7b46748..f474e2a3356 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -104,7 +104,7 @@ A pull request is considered ready to merge when the following criteria are meet
Any Maintainer can merge the pull request once it is ready to merge.
[^1]: The `go.opentelemetry.io/contrib/instrgen` module is exempt from the two approvals and one day requirement.
- Only one approval is needed to merge a Pull Request for that module and there is no minimum amout of time required for the PR to be open before merging.
+ Only one approval is needed to merge a Pull Request for that module and there is no minimum amount of time required for the PR to be open before merging.
This exemption is to be removed when that package makes its first tagged release.
### Draft Pull Requests
diff --git a/Makefile b/Makefile
index f80154fc4b9..9404d8203a6 100644
--- a/Makefile
+++ b/Makefile
@@ -68,6 +68,39 @@ $(GOVULNCHECK): PACKAGE=golang.org/x/vuln/cmd/govulncheck
tools: $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(PORTO) $(MULTIMOD) $(CROSSLINK) $(GOTMPL) $(GORELEASE) $(GOJSONSCHEMA) $(GOVULNCHECK)
+# Virtualized python tools via docker
+
+# The directory where the virtual environment is created.
+VENVDIR := venv
+
+# The directory where the python tools are installed.
+PYTOOLS := $(VENVDIR)/bin
+
+# The pip executable in the virtual environment.
+PIP := $(PYTOOLS)/pip
+
+# The directory in the docker image where the current directory is mounted.
+WORKDIR := /workdir
+
+# The python image to use for the virtual environment.
+PYTHONIMAGE := python:3.11.3-slim-bullseye
+
+# Run the python image with the current directory mounted.
+DOCKERPY := docker run --rm -v "$(CURDIR):$(WORKDIR)" -w $(WORKDIR) $(PYTHONIMAGE)
+
+# Create a virtual environment for Python tools.
+$(PYTOOLS):
+# The `--upgrade` flag is needed to ensure that the virtual environment is
+# created with the latest pip version.
+ @$(DOCKERPY) bash -c "python3 -m venv $(VENVDIR) && $(PIP) install --upgrade pip"
+
+# Install python packages into the virtual environment.
+$(PYTOOLS)/%: $(PYTOOLS)
+ @$(DOCKERPY) $(PIP) install -r requirements.txt
+
+CODESPELL = $(PYTOOLS)/codespell
+$(CODESPELL): PACKAGE=codespell
+
# Generate
.PHONY: generate
@@ -315,3 +348,7 @@ genjsonschema: genjsonschema-cleanup $(GOJSONSCHEMA)
mv ${GENERATED_CONFIG}.tmp ${GENERATED_CONFIG}
$(MAKE) lint
$(MAKE) genjsonschema-cleanup
+
+.PHONY: codespell
+codespell: $(CODESPELL)
+ @$(DOCKERPY) $(CODESPELL)
\ No newline at end of file
diff --git a/RELEASING.md b/RELEASING.md
index ccc340f1d5f..b2b5700a147 100644
--- a/RELEASING.md
+++ b/RELEASING.md
@@ -15,7 +15,7 @@ go.opentelemetry.io/otel packages are compatible with the contrib repository.
Follow the following steps to verify the changes.
1. Pick the GIT SHA on the [main branch](https://github.com/open-telemetry/opentelemetry-go/commits/main) that you want to verify.
-2. Run the following command to update the OTel depencies with the GIT SHA picked in step 1.
+2. Run the following command to update the OTel dependencies with the GIT SHA picked in step 1.
```sh
export GITSHA=
diff --git a/config/metric.go b/config/metric.go
index 4763406b529..fade5e56fe7 100644
--- a/config/metric.go
+++ b/config/metric.go
@@ -222,7 +222,7 @@ func prometheusReader(ctx context.Context, prometheusConfig *Prometheus) (sdkmet
mux := http.NewServeMux()
mux.Handle("/metrics", promhttp.HandlerFor(reg, promhttp.HandlerOpts{Registry: reg}))
server := http.Server{
- // Timeouts are necessary to make a server resilent to attacks, but ListenAndServe doesn't set any.
+ // Timeouts are necessary to make a server resilient to attacks, but ListenAndServe doesn't set any.
// We use values from this example: https://blog.cloudflare.com/exposing-go-on-the-internet/#:~:text=There%20are%20three%20main%20timeouts
ReadTimeout: 5 * time.Second,
WriteTimeout: 10 * time.Second,
diff --git a/detectors/aws/ecs/ecs_test.go b/detectors/aws/ecs/ecs_test.go
index f4f54b6ffb7..fe8c5539a3e 100644
--- a/detectors/aws/ecs/ecs_test.go
+++ b/detectors/aws/ecs/ecs_test.go
@@ -220,7 +220,7 @@ func TestLogsAttributesAlternatePartition(t *testing.T) {
ContainerARN: "arn:arn-partition:arn-svc:arn-region:arn-account:arn-resource",
}
actualAttributes, err := detector.getLogsAttributes(containerMetadata)
- assert.NoError(t, err, "failure with nonstandard partitition")
+ assert.NoError(t, err, "failure with nonstandard partition")
expectedAttributes := []attribute.KeyValue{
semconv.AWSLogGroupNames(containerMetadata.LogOptions.AwsLogsGroup),
diff --git a/doc.go b/doc.go
index 97b4b02e33c..7e55ed00182 100644
--- a/doc.go
+++ b/doc.go
@@ -2,6 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
// Package contrib is a collection of extensions for the opentelemetry-go
-// project. It provides 3rd parth resource detectors, propagators, samplers,
+// project. It provides 3rd party resource detectors, propagators, samplers,
// bridges, and instrumentation as submodules.
package contrib // import "go.opentelemetry.io/contrib"
diff --git a/exporters/autoexport/metrics.go b/exporters/autoexport/metrics.go
index 0dcb6c0cc53..25270de7f9a 100644
--- a/exporters/autoexport/metrics.go
+++ b/exporters/autoexport/metrics.go
@@ -65,7 +65,7 @@ func WithFallbackMetricReader(metricReaderFactory func(ctx context.Context) (met
// Use [WithFallbackMetricReader] option to change the returned exporter
// when OTEL_METRICS_EXPORTER is unset or empty.
//
-// Use [IsNoneMetricReader] to check if the retured exporter is a "no operation" exporter.
+// Use [IsNoneMetricReader] to check if the returned exporter is a "no operation" exporter.
func NewMetricReader(ctx context.Context, opts ...MetricOption) (metric.Reader, error) {
return metricsSignal.create(ctx, opts...)
}
@@ -172,7 +172,7 @@ func init() {
mux := http.NewServeMux()
mux.Handle("/metrics", promhttp.HandlerFor(reg, promhttp.HandlerOpts{Registry: reg}))
server := http.Server{
- // Timeouts are necessary to make a server resilent to attacks, but ListenAndServe doesn't set any.
+ // Timeouts are necessary to make a server resilient to attacks, but ListenAndServe doesn't set any.
// We use values from this example: https://blog.cloudflare.com/exposing-go-on-the-internet/#:~:text=There%20are%20three%20main%20timeouts
ReadTimeout: 5 * time.Second,
WriteTimeout: 10 * time.Second,
diff --git a/exporters/autoexport/spans.go b/exporters/autoexport/spans.go
index c25dc9b0ae7..0a627ae8be5 100644
--- a/exporters/autoexport/spans.go
+++ b/exporters/autoexport/spans.go
@@ -49,7 +49,7 @@ func WithFallbackSpanExporter(spanExporterFactory func(ctx context.Context) (tra
// Use [WithFallbackSpanExporter] option to change the returned exporter
// when OTEL_TRACES_EXPORTER is unset or empty.
//
-// Use [IsNoneSpanExporter] to check if the retured exporter is a "no operation" exporter.
+// Use [IsNoneSpanExporter] to check if the returned exporter is a "no operation" exporter.
func NewSpanExporter(ctx context.Context, opts ...SpanOption) (trace.SpanExporter, error) {
return tracesSignal.create(ctx, opts...)
}
diff --git a/instrgen/lib/analysis.go b/instrgen/lib/analysis.go
index 395fe50ed26..f13d9f10121 100644
--- a/instrgen/lib/analysis.go
+++ b/instrgen/lib/analysis.go
@@ -14,7 +14,7 @@ import (
"golang.org/x/tools/go/packages"
)
-// PackageAnalysis analyze all package set accrding to passed
+// PackageAnalysis analyze all package set according to passed
// pattern. It requires an information about path, pattern,
// root functions - entry points, function declarations,
// and so on.
diff --git a/instrumentation/github.com/aws/aws-lambda-go/otellambda/README.md b/instrumentation/github.com/aws/aws-lambda-go/otellambda/README.md
index 8cb985b9e34..a469a85f73b 100644
--- a/instrumentation/github.com/aws/aws-lambda-go/otellambda/README.md
+++ b/instrumentation/github.com/aws/aws-lambda-go/otellambda/README.md
@@ -73,7 +73,7 @@ type mockHTTPRequest struct {
func mockEventToCarrier(eventJSON []byte) propagation.TextMapCarrier{
var request mockHTTPRequest
_ = json.unmarshal(eventJSON, &request)
- return propogation.HeaderCarrier{someHeaderKey: []string{request.Headers[someHeaderKey]}}
+ return propagation.HeaderCarrier{someHeaderKey: []string{request.Headers[someHeaderKey]}}
}
type mockPropagator struct{}
diff --git a/instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/mock_collector_test.go b/instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/mock_collector_test.go
index c1cff33f4ec..538a199b2f7 100644
--- a/instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/mock_collector_test.go
+++ b/instrumentation/github.com/aws/aws-lambda-go/otellambda/xrayconfig/mock_collector_test.go
@@ -185,7 +185,7 @@ func (l *listener) Accept() (net.Conn, error) {
return conn, nil
}
-// WaitForConn will wait indefintely for a connection to be estabilished with
+// WaitForConn will wait indefintely for a connection to be established with
// the listener before returning.
func (l *listener) WaitForConn() {
for {
diff --git a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/version.go b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/version.go
index 8146a3beaf1..c2a0ad4d952 100644
--- a/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/version.go
+++ b/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test/version.go
@@ -3,7 +3,7 @@
package test // import "go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws/test"
-// Version is the current release version of the AWS intstrumentation test module.
+// Version is the current release version of the AWS instrumentation test module.
func Version() string {
return "0.52.0"
// This string is updated by the pre_release.sh script during release
diff --git a/instrumentation/github.com/emicklei/go-restful/otelrestful/config.go b/instrumentation/github.com/emicklei/go-restful/otelrestful/config.go
index 82cfcbc0bc4..870fdbbf3ef 100644
--- a/instrumentation/github.com/emicklei/go-restful/otelrestful/config.go
+++ b/instrumentation/github.com/emicklei/go-restful/otelrestful/config.go
@@ -59,7 +59,7 @@ func WithTracerProvider(provider oteltrace.TracerProvider) Option {
})
}
-// WithPublicEndpointFn runs with every request, and allows conditionnally
+// WithPublicEndpointFn runs with every request, and allows conditionally
// configuring the Handler to link the span with an incoming span context. If
// this option is not provided or returns false, then the association is a
// child association instead of a link.
diff --git a/instrumentation/github.com/gorilla/mux/otelmux/config.go b/instrumentation/github.com/gorilla/mux/otelmux/config.go
index 2900924838b..0f9b24242a0 100644
--- a/instrumentation/github.com/gorilla/mux/otelmux/config.go
+++ b/instrumentation/github.com/gorilla/mux/otelmux/config.go
@@ -44,7 +44,7 @@ func WithPublicEndpoint() Option {
})
}
-// WithPublicEndpointFn runs with every request, and allows conditionnally
+// WithPublicEndpointFn runs with every request, and allows conditionally
// configuring the Handler to link the span with an incoming span context. If
// this option is not provided or returns false, then the association is a
// child association instead of a link.
diff --git a/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/doc.go b/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/doc.go
index 6930cc15e9e..8df3cb766c8 100644
--- a/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/doc.go
+++ b/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/doc.go
@@ -3,7 +3,7 @@
// Package otelmongo instruments go.mongodb.org/mongo-driver/mongo.
//
-// This package is compatable with v0.2.0 of
+// This package is compatible with v0.2.0 of
// go.mongodb.org/mongo-driver/mongo.
//
// `NewMonitor` will return an event.CommandMonitor which is used to trace
diff --git a/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go b/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go
index 4fdd270536b..b3c56ccc1bf 100644
--- a/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go
+++ b/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo/mongo.go
@@ -95,7 +95,7 @@ func (m *monitor) Finished(evt *event.CommandFinishedEvent, err error) {
span.End()
}
-// TODO sanitize values where possible, then reenable `db.statement` span attributes default.
+// TODO sanitize values where possible, then re-enable `db.statement` span attributes default.
// TODO limit maximum size.
func sanitizeCommand(command bson.Raw) string {
b, _ := bson.MarshalExtJSON(command, false, false)
diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/config.go b/instrumentation/google.golang.org/grpc/otelgrpc/config.go
index a199b36b4fa..ab091cf6ade 100644
--- a/instrumentation/google.golang.org/grpc/otelgrpc/config.go
+++ b/instrumentation/google.golang.org/grpc/otelgrpc/config.go
@@ -30,7 +30,7 @@ const (
type InterceptorFilter func(*InterceptorInfo) bool
// Filter is a predicate used to determine whether a given request in
-// should be instrumented by the attatched RPC tag info.
+// should be instrumented by the attached RPC tag info.
// A Filter must return true if the request should be instrumented.
type Filter func(*stats.RPCTagInfo) bool
diff --git a/instrumentation/net/http/otelhttp/client.go b/instrumentation/net/http/otelhttp/client.go
index deea149645c..6aae83bfd20 100644
--- a/instrumentation/net/http/otelhttp/client.go
+++ b/instrumentation/net/http/otelhttp/client.go
@@ -12,7 +12,7 @@ import (
)
// DefaultClient is the default Client and is used by Get, Head, Post and PostForm.
-// Please be careful of intitialization order - for example, if you change
+// Please be careful of initialization order - for example, if you change
// the global propagator, the DefaultClient might still be using the old one.
var DefaultClient = &http.Client{Transport: NewTransport(http.DefaultTransport)}
diff --git a/instrumentation/net/http/otelhttp/config.go b/instrumentation/net/http/otelhttp/config.go
index c1015a9eccf..f0a9bb9efeb 100644
--- a/instrumentation/net/http/otelhttp/config.go
+++ b/instrumentation/net/http/otelhttp/config.go
@@ -100,7 +100,7 @@ func WithPublicEndpoint() Option {
})
}
-// WithPublicEndpointFn runs with every request, and allows conditionnally
+// WithPublicEndpointFn runs with every request, and allows conditionally
// configuring the Handler to link the span with an incoming span context. If
// this option is not provided or returns false, then the association is a
// child association instead of a link.
diff --git a/instrumentation/runtime/runtime.go b/instrumentation/runtime/runtime.go
index e4384cd8347..45d387dbb50 100644
--- a/instrumentation/runtime/runtime.go
+++ b/instrumentation/runtime/runtime.go
@@ -24,7 +24,7 @@ type runtime struct {
// config contains optional settings for reporting runtime metrics.
type config struct {
- // MinimumReadMemStatsInterval sets the mininum interval
+ // MinimumReadMemStatsInterval sets the minimum interval
// between calls to runtime.ReadMemStats(). Negative values
// are ignored.
MinimumReadMemStatsInterval time.Duration
diff --git a/propagators/autoprop/registry_test.go b/propagators/autoprop/registry_test.go
index e790ad585bb..4f448aae5dd 100644
--- a/propagators/autoprop/registry_test.go
+++ b/propagators/autoprop/registry_test.go
@@ -56,7 +56,7 @@ func TestRegistryConcurrentSafe(t *testing.T) {
assert.NotPanics(t, func() {
v, ok := r.load(propName)
assert.True(t, ok, "missing propagator in registry")
- assert.Equal(t, noop, v, "wrong propagator retuned")
+ assert.Equal(t, noop, v, "wrong propagator returned")
})
}()
diff --git a/propagators/b3/b3_data_test.go b/propagators/b3/b3_data_test.go
index 36aedbd18e5..35a92775565 100644
--- a/propagators/b3/b3_data_test.go
+++ b/propagators/b3/b3_data_test.go
@@ -1010,7 +1010,7 @@ var injectInvalidHeaderGenerator = []injectTest{
var injectInvalidHeader []injectTest
func init() {
- // Preform a test for each invalid injectTest with all combinations of
+ // Perform a test for each invalid injectTest with all combinations of
// encoding values.
injectInvalidHeader = make([]injectTest, 0, len(injectInvalidHeaderGenerator)*4)
allHeaders := []string{
diff --git a/renovate.json b/renovate.json
index 6559d3c655a..208cd49a7e6 100644
--- a/renovate.json
+++ b/renovate.json
@@ -21,6 +21,11 @@
"matchManagers": ["gomod"],
"matchDepTypes": ["indirect"],
"enabled": false
+ },
+ {
+ "matchManagers": ["pip"],
+ "packageNames": ["codespell"],
+ "enabled": true
}
]
}
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 00000000000..9991a8c25b0
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1 @@
+codespell==2.3.0
\ No newline at end of file
diff --git a/samplers/aws/xray/internal/reservoir_test.go b/samplers/aws/xray/internal/reservoir_test.go
index c60c5031e25..cfb4eee371a 100644
--- a/samplers/aws/xray/internal/reservoir_test.go
+++ b/samplers/aws/xray/internal/reservoir_test.go
@@ -200,7 +200,7 @@ func TestResetQuotaUsageRotation(t *testing.T) {
nowTime: 1500000001,
}
- // take() should be true since ununsed quota is available
+ // take() should be true since unused quota is available
assert.True(t, r.take(clock.now(), false, 1.0))
}