renovate[bot]
6d79ac3936
fix(deps): update golang.org/x ( #8045 )
...
This PR contains the following updates:
| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/ ) |
[Confidence](https://docs.renovatebot.com/merge-confidence/ ) | Type |
Update |
|---|---|---|---|---|---|
| [golang.org/x/crypto](https://pkg.go.dev/golang.org/x/crypto ) |
[`v0.48.0` →
`v0.49.0`](https://cs.opensource.google/go/x/crypto/+/refs/tags/v0.48.0...refs/tags/v0.49.0 )
|

|

| indirect | minor |
| [golang.org/x/mod](https://pkg.go.dev/golang.org/x/mod ) | [`v0.33.0` →
`v0.34.0`](https://cs.opensource.google/go/x/mod/+/refs/tags/v0.33.0...refs/tags/v0.34.0 )
|

|

| indirect | minor |
| [golang.org/x/net](https://pkg.go.dev/golang.org/x/net ) | [`v0.51.0` →
`v0.52.0`](https://cs.opensource.google/go/x/net/+/refs/tags/v0.51.0...refs/tags/v0.52.0 )
|

|

| indirect | minor |
| [golang.org/x/telemetry](https://pkg.go.dev/golang.org/x/telemetry ) |
`e526e8a` → `579e4da` |

|

| indirect | digest |
| [golang.org/x/text](https://pkg.go.dev/golang.org/x/text ) | [`v0.34.0`
→
`v0.35.0`](https://cs.opensource.google/go/x/text/+/refs/tags/v0.34.0...refs/tags/v0.35.0 )
|

|

| indirect | minor |
| [golang.org/x/tools](https://pkg.go.dev/golang.org/x/tools ) |
[`v0.42.0` →
`v0.43.0`](https://cs.opensource.google/go/x/tools/+/refs/tags/v0.42.0...refs/tags/v0.43.0 )
|

|

| require | minor |
---
> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/5322) for more information.
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions ) if
that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/ ).
View the [repository job
log](https://developer.mend.io/github/open-telemetry/opentelemetry-go ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My41OS4wIiwidXBkYXRlZEluVmVyIjoiNDMuNTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiU2tpcCBDaGFuZ2Vsb2ciLCJkZXBlbmRlbmNpZXMiXX0=-->
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: dmathieu <damien.mathieu@elastic.co >
2026-03-12 15:40:07 +01:00
Oleksandr Redko
3264bf171b
refactor: modernize code ( #7850 )
...
Enable the
[`modernize`](https://golangci-lint.run/docs/linters/configuration/#modernize )
linter in the golangci-lint configuration and fix the reported issues by
running `golangci-lint run --enable-only modernize --fix`. The
`modernize` linter is internally the same as [gopls
modernize](https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize ).
Similar to #7089 .
2026-01-30 18:15:17 +01:00
Preeti Dewani
49292857b7
Replace fnv with xxhash ( #7497 )
...
**Objective**:
- Performance comparison between fnv and xxhash in terms of ops/sec,
allocations and collisions
- Implement xxhash according to first objective
**Changes**:
- fnv is replaced by xxhash.
Perform stats:
- **Collision**: No collision upto 100M
- **Allocations**: Same in both cases
- **Ops/sec**: xxhash performed better in cases with medium to large
strings
**Benchmarks**:
```
benchstat old.txt new.txt
goos: darwin
goarch: arm64
pkg: go.opentelemetry.io/otel/attribute
cpu: Apple M2
│ old.txt │ new.txt │
│ sec/op │ sec/op vs base │
NewSet-8 205.5n ± 1% 229.4n ± 1% +11.61% (p=0.002 n=6)
NewSetSmallStrings-8 160.5n ± 1% 169.0n ± 5% +5.26% (p=0.002 n=6)
NewSetMediumStrings-8 263.8n ± 6% 185.0n ± 1% -29.89% (p=0.002 n=6)
NewSetLargeStrings-8 426.4n ± 9% 210.2n ± 1% -50.72% (p=0.002 n=6)
NewSetVeryLargeStrings-8 1012.5n ± 7% 238.7n ± 2% -76.43% (p=0.002 n=6)
NewSetHugeStrings-8 3622.0n ± 8% 397.1n ± 1% -89.04% (p=0.002 n=6)
geomean 488.6n 228.6n -53.21%
│ old.txt │ new.txt │
│ B/op │ B/op vs base │
NewSet-8 448.0 ± 0% 448.0 ± 0% ~ (p=1.000 n=6) ¹
NewSetSmallStrings-8 320.0 ± 0% 320.0 ± 0% ~ (p=1.000 n=6) ¹
NewSetMediumStrings-8 320.0 ± 0% 320.0 ± 0% ~ (p=1.000 n=6) ¹
NewSetLargeStrings-8 320.0 ± 0% 320.0 ± 0% ~ (p=1.000 n=6) ¹
NewSetVeryLargeStrings-8 320.0 ± 0% 320.0 ± 0% ~ (p=1.000 n=6) ¹
NewSetHugeStrings-8 320.0 ± 0% 320.0 ± 0% ~ (p=1.000 n=6) ¹
geomean 338.5 338.5 +0.00%
¹ all samples are equal
│ old.txt │ new.txt │
│ allocs/op │ allocs/op vs base │
NewSet-8 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=6) ¹
NewSetSmallStrings-8 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=6) ¹
NewSetMediumStrings-8 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=6) ¹
NewSetLargeStrings-8 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=6) ¹
NewSetVeryLargeStrings-8 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=6) ¹
NewSetHugeStrings-8 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=6) ¹
geomean 1.000 1.000 +0.00%
¹ all samples are equal
```
Previous implementation for reference:
https://github.com/open-telemetry/opentelemetry-go/blame/d0483a7c89d936dcced557fb523465daeac16967/CHANGELOG.md#L16
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com >
2025-11-19 11:06:20 +01:00
Tyler Yahn
59563f7ae4
Do not use the user-defined empty set when comparing sets. ( #7357 )
...
Fix #7356
2025-09-15 09:28:12 -07:00
David Ashpole
18424a46ed
Add tests for attribute JSON marshalling ( #7268 )
...
Forked from
https://github.com/open-telemetry/opentelemetry-go/pull/7175#discussion_r2277148762
This adds a test for JSON marshaling of attribute sets.
---------
Co-authored-by: Flc゛ <four_leaf_clover@foxmail.com >
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
2025-08-29 12:02:56 -04:00
Matthieu MOREL
d464abf1f3
chore: enable unused-parameter rule from revive ( #7122 )
...
#### Description
Enable and fixes
[unused-parameter](https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unused-parameter )
rule from revive
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com >
2025-08-04 12:48:04 -07:00
Tyler Yahn
7512a2be2e
Add the golines golangci-lint formatter ( #6513 )
...
Ensure consistent line wrapping (<= 120 characters) within the project.
2025-03-30 03:46:44 -07:00
Mikhail Mazurskiy
1fe2f03854
Deprecate Sortable ( #4734 )
...
* Deprecate Sortable
* Remove redundant checks
* Move code to a non-deprecated func
* Apply suggestions from code review
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
* Mention individual deprecated function
* Update attribute/set.go
Co-authored-by: Robert Pająk <pellared@hotmail.com >
* Add BenchmarkNewSet
---------
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
Co-authored-by: Robert Pająk <pellared@hotmail.com >
2024-03-11 08:31:19 -07:00
Robert Pająk
7dea232a46
[chore] Simplify the license header ( #4987 )
2024-02-29 07:05:28 +01:00
Tyler Yahn
deddec38ac
Optimize (attribute.Set).Filter for no filtered case ( #4774 )
...
* Optimize Set.Filter for no filtered case
When all elements of the Set are kept during a call to Filter, do not
allocate a new Set and the dropped attributes slice. Instead, return the
immutable Set and nil.
To achieve this the functionality of filterSet is broken down into a
more generic filteredToFront function.
* Apply suggestions from code review
Co-authored-by: Robert Pająk <pellared@hotmail.com >
* Rename run to benchFn based on review feedback
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com >
2024-01-08 07:49:45 -08:00
Tyler Yahn
a25f4fe7ef
Guard zero value Set methods ( #3957 )
...
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com >
2023-04-04 08:06:10 -07:00
Aaron Clawson
8423364f5a
Update golangci-lint to v1.48.0 ( #3105 )
...
* Update golangci-lint to v1.48.0
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com >
2022-08-24 21:42:28 -05:00
Tyler Yahn
a8ea3dbb46
Replace use of old term label with attribute ( #2790 )
...
* Replace use of old term label with attribute
The specification has unified on the term attribute to describe
key-value pairs. There exist still many hold-overs of the use of the
term label. This updates those uses or deprecates exported types and
functions in favor of renamed forms.
* fix infinite recursion
* Remove backticks from attribute set docs
* Remove LabelFilterSelector entirely
* Remove Metadata.Labels instead of deprecate
* Update changelog with public changes
* Revert OC err msg
2022-04-18 07:31:31 -07:00
Punya Biswal
ecf65d7968
Rename otel/label -> otel/attribute ( #1541 )
...
* Rename otel/label -> otel/attr
Leave the imported name alone, to avoid a large diff and conflicts
* Better import comment
* Update CHANGELOG.md
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
* otel/attr -> otel/attribute
* Missed the changelog entry
* Get rid of import renaming
* Merge remaining conflicts
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com >
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com >
2021-02-18 12:59:37 -05:00