1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2026-06-19 21:45:50 +02:00

4744 Commits

Author SHA1 Message Date
renovate[bot] 6ccfa685fc chore(deps): update codspeedhq/action action to v4.17.6 (#8485) 2026-06-19 07:15:14 +02:00
renovate[bot] 79260f670e chore(deps): update actions/checkout action to v7 (#8487)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/checkout](https://redirect.github.com/actions/checkout) |
action | major | `v6.0.3` → `v7.0.0` |

---

### Release Notes

<details>
<summary>actions/checkout (actions/checkout)</summary>

###
[`v7.0.0`](https://redirect.github.com/actions/checkout/blob/HEAD/CHANGELOG.md#v700)

[Compare
Source](https://redirect.github.com/actions/checkout/compare/v6.0.3...v7.0.0)

- Block checking out fork PR for pull\_request\_target and workflow\_run
by [@&#8203;aiqiaoy](https://redirect.github.com/aiqiaoy) in
[#&#8203;2454](https://redirect.github.com/actions/checkout/pull/2454)
- Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 in the
minor-actions-dependencies group across 1 directory by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;2458](https://redirect.github.com/actions/checkout/pull/2458)
- Bump flatted from 3.3.1 to 3.4.2 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;2460](https://redirect.github.com/actions/checkout/pull/2460)
- Bump js-yaml from 4.1.0 to 4.2.0 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;2461](https://redirect.github.com/actions/checkout/pull/2461)
- Bump [@&#8203;actions/core](https://redirect.github.com/actions/core)
and
[@&#8203;actions/tool-cache](https://redirect.github.com/actions/tool-cache)
and Remove uuid by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;2459](https://redirect.github.com/actions/checkout/pull/2459)
- upgrade module to esm and update dependencies by
[@&#8203;aiqiaoy](https://redirect.github.com/aiqiaoy) in
[#&#8203;2463](https://redirect.github.com/actions/checkout/pull/2463)
- Bump the minor-npm-dependencies group across 1 directory with 3
updates by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;2462](https://redirect.github.com/actions/checkout/pull/2462)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- 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.

---

- [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yMzEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjIzMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-18 19:00:39 -07:00
renovate[bot] 3524d7a9f0 chore(deps): update golang.org/x to a6991f1 (#8482)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [golang.org/x/telemetry](https://pkg.go.dev/golang.org/x/telemetry) |
indirect | digest | `9b6dc03` → `a6991f1` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/5322) for more information.

---

### Configuration

📅 **Schedule**: (UTC)

- 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.

---

- [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yMzEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjIzMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-18 17:16:39 -07:00
renovate[bot] ace2aad169 chore(deps): update module github.com/cyphar/filepath-securejoin to v0.7.0 (#8486)
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
|
[github.com/cyphar/filepath-securejoin](https://redirect.github.com/cyphar/filepath-securejoin)
| `v0.6.1` → `v0.7.0` |
![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fcyphar%2ffilepath-securejoin/v0.7.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fcyphar%2ffilepath-securejoin/v0.6.1/v0.7.0?slim=true)
|

---

### Release Notes

<details>
<summary>cyphar/filepath-securejoin
(github.com/cyphar/filepath-securejoin)</summary>

###
[`v0.7.0`](https://redirect.github.com/cyphar/filepath-securejoin/releases/tag/v0.7.0):
-- "You talk of times of peace for all, and then prepare for war."

[Compare
Source](https://redirect.github.com/cyphar/filepath-securejoin/compare/v0.6.1...v0.7.0)

##### Changed

- Update to `cyphar.com/go-pathrs@0.2.5`, which included a build-time
API
breakage that we needed to work around. The API of this library is
unchanged
  by this, but users should make sure to update to `v0.7.0` of
`filepath-securejoin` if they use the `libpathrs` built tag and have
update
  to `libpathrs` `v0.2.5`.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yMzEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjIzMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-18 15:42:30 -07:00
renovate[bot] b8515adc43 fix(deps): update googleapis to 87f3d3e (#8483)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[google.golang.org/genproto/googleapis/api](https://redirect.github.com/googleapis/go-genproto)
| indirect | digest | `62b3387` → `87f3d3e` |
|
[google.golang.org/genproto/googleapis/rpc](https://redirect.github.com/googleapis/go-genproto)
| indirect | digest | `62b3387` → `87f3d3e` |
|
[google.golang.org/genproto/googleapis/rpc](https://redirect.github.com/googleapis/go-genproto)
| require | digest | `62b3387` → `87f3d3e` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/5322) for more information.

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yMzEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjIzMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-18 14:14:42 -07:00
Robert Pająk 7128e65db9 attribute: test map equivalence with duplicate keys (#8473)
Add coverage documenting the map equivalence behavior for duplicated
keys.
This follows the prior-art semantics of `attribute.Set`.

Side note: there is already a `duplicate keys keep stable order` test
case in `TestAsMap`. However, I think that adding these test cases is a
good coverage addition.
2026-06-18 07:19:38 +02:00
Dipanshu singh feac81f60d attribute: inline hashing for small SLICE and MAP values (#8476)
Fixes #8450

Inlining the hashing logic for SLICE and MAP values of sizes 1 to 5
avoids slice header construction and function call overhead.

Our benchmark results show:
- Hashing speed improved by ~20% to ~44% across small slices and maps
- Heap allocations are completely eliminated (reduced from 1 to 0
allocs/op)

```
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/attribute
cpu: 13th Gen Intel(R) Core(TM) i7-13800H
                                        │   main.txt    │               new.txt               │
                                        │    sec/op     │   sec/op     vs base                │
HashKVs/All-20                             1.649µ ±  2%   1.558µ ± 2%   -5.49% (p=0.000 n=10)
HashKVs/BoolTrue-20                       155.15n ± 15%   32.38n ± 0%  -79.13% (p=0.000 n=10)
HashKVs/BoolFalse-20                      167.95n ±  8%   32.35n ± 0%  -80.74% (p=0.000 n=10)
HashKVs/BoolSliceLen2-20                  186.95n ± 22%   42.20n ± 0%  -77.43% (p=0.000 n=10)
HashKVs/BoolSliceLen3-20                  201.80n ± 10%   53.74n ± 1%  -73.37% (p=0.000 n=10)
HashKVs/IntNegative-20                    173.40n ± 16%   32.34n ± 1%  -81.35% (p=0.000 n=10)
HashKVs/IntZero-20                        158.25n ±  9%   32.36n ± 0%  -79.55% (p=0.000 n=10)
HashKVs/IntSliceLen5-20                   197.00n ±  4%   67.32n ± 1%  -65.83% (p=0.000 n=10)
HashKVs/IntSliceLen1-20                   155.85n ± 10%   36.02n ± 0%  -76.89% (p=0.000 n=10)
HashKVs/Int64One-20                       119.30n ± 12%   32.37n ± 0%  -72.86% (p=0.000 n=10)
HashKVs/Int64-20                          145.25n ± 13%   32.37n ± 0%  -77.71% (p=0.000 n=10)
HashKVs/Int64SliceLen4-20                 159.15n ±  8%   61.33n ± 0%  -61.46% (p=0.000 n=10)
HashKVs/Int64SliceWithZero-20             159.05n ±  8%   61.39n ± 1%  -61.40% (p=0.000 n=10)
HashKVs/Float64-20                        113.15n ±  7%   32.34n ± 0%  -71.41% (p=0.000 n=10)
HashKVs/Float64Large-20                   112.80n ±  6%   32.39n ± 0%  -71.29% (p=0.000 n=10)
HashKVs/Float64SliceLen4-20               162.45n ±  7%   60.64n ± 1%  -62.67% (p=0.000 n=10)
HashKVs/Float64SliceLarge-20              151.85n ±  3%   60.73n ± 2%  -60.00% (p=0.000 n=10)
HashKVs/StringFoo-20                      109.35n ±  8%   30.26n ± 0%  -72.32% (p=0.000 n=10)
HashKVs/StringBar-20                      105.60n ±  8%   30.27n ± 0%  -71.33% (p=0.000 n=10)
HashKVs/StringSliceLen3-20                139.35n ±  5%   48.50n ± 0%  -65.20% (p=0.000 n=10)
HashKVs/StringSliceLooksLikeIntSlice-20   118.50n ±  6%   34.91n ± 0%  -70.54% (p=0.000 n=10)
HashKVs/ByteSliceFoo-20                   108.00n ±  6%   30.25n ± 0%  -72.00% (p=0.000 n=10)
HashKVs/ByteSliceLooksLikeIntSlice-20     105.80n ±  9%   31.39n ± 1%  -70.33% (p=0.000 n=10)
HashKVs/SliceLen0-20                      110.15n ± 50%   29.69n ± 0%  -73.05% (p=0.000 n=10)
HashKVs/SliceLen1-20                      127.70n ±  9%   44.95n ± 0%  -64.80% (p=0.000 n=10)
HashKVs/SliceLen2-20                      160.35n ±  7%   67.96n ± 1%  -57.61% (p=0.000 n=10)
HashKVs/SliceLen3-20                      190.90n ± 15%   86.01n ± 0%  -54.95% (p=0.000 n=10)
HashKVs/SliceLen4-20                       216.5n ±  7%   105.4n ± 0%  -51.32% (p=0.000 n=10)
HashKVs/SliceLen5-20                       243.0n ± 11%   122.3n ± 0%  -49.67% (p=0.000 n=10)
HashKVs/SliceNested-20                     313.5n ±  9%   206.5n ± 0%  -34.11% (p=0.000 n=10)
HashKVs/MapLen0-20                        105.55n ±  7%   29.68n ± 0%  -71.88% (p=0.000 n=10)
HashKVs/MapLen2-20                        172.90n ±  7%   73.95n ± 1%  -57.23% (p=0.000 n=10)
HashKVs/MapNested-20                       277.4n ±  4%   170.9n ± 0%  -38.39% (p=0.000 n=10)
HashKVs/EmptyValue-20                     107.95n ±  6%   29.68n ± 0%  -72.51% (p=0.000 n=10)
HashValueSlice/Len2-20                    140.20n ±  5%   49.48n ± 0%  -64.70% (p=0.000 n=10)
HashValueSlice/Len5-20                     206.2n ±  9%   110.0n ± 1%  -46.64% (p=0.000 n=10)
HashValueSlice/Len8Nested-20               332.3n ±  4%   270.9n ± 0%  -18.46% (p=0.000 n=10)
HashValueMap/Len2-20                      152.95n ± 32%   67.89n ± 1%  -55.61% (p=0.000 n=10)
HashValueMap/Len5-20                       247.8n ±  3%   135.5n ± 0%  -45.35% (p=0.000 n=10)
HashValueMap/Len8Nested-20                 412.7n ±  3%   342.1n ± 1%  -17.11% (p=0.000 n=10)
geomean                                    171.6n         60.79n       -64.57%

                                        │  main.txt  │                new.txt                 │
                                        │    B/op    │   B/op     vs base                     │
HashKVs/All-20                            80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/BoolTrue-20                       80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/BoolFalse-20                      80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/BoolSliceLen2-20                  80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/BoolSliceLen3-20                  80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/IntNegative-20                    80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/IntZero-20                        80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/IntSliceLen5-20                   80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/IntSliceLen1-20                   80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/Int64One-20                       80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/Int64-20                          80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/Int64SliceLen4-20                 80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/Int64SliceWithZero-20             80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/Float64-20                        80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/Float64Large-20                   80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/Float64SliceLen4-20               80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/Float64SliceLarge-20              80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/StringFoo-20                      80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/StringBar-20                      80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/StringSliceLen3-20                80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/StringSliceLooksLikeIntSlice-20   80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/ByteSliceFoo-20                   80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/ByteSliceLooksLikeIntSlice-20     80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/SliceLen0-20                      80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/SliceLen1-20                      80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/SliceLen2-20                      80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/SliceLen3-20                      80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/SliceLen4-20                      80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/SliceLen5-20                      80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/SliceNested-20                    80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/MapLen0-20                        80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/MapLen2-20                        80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/MapNested-20                      80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/EmptyValue-20                     80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashValueSlice/Len2-20                    80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashValueSlice/Len5-20                    80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashValueSlice/Len8Nested-20              80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashValueMap/Len2-20                      80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashValueMap/Len5-20                      80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
HashValueMap/Len8Nested-20                80.00 ± 0%   0.00 ± 0%  -100.00% (p=0.000 n=10)
geomean                                   80.00                   ?                       ¹ ²
¹ summaries must be >0 to compute geomean
² ratios must be >0 to compute geomean

                                        │  main.txt  │                 new.txt                 │
                                        │ allocs/op  │ allocs/op   vs base                     │
HashKVs/All-20                            1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/BoolTrue-20                       1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/BoolFalse-20                      1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/BoolSliceLen2-20                  1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/BoolSliceLen3-20                  1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/IntNegative-20                    1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/IntZero-20                        1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/IntSliceLen5-20                   1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/IntSliceLen1-20                   1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/Int64One-20                       1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/Int64-20                          1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/Int64SliceLen4-20                 1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/Int64SliceWithZero-20             1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/Float64-20                        1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/Float64Large-20                   1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/Float64SliceLen4-20               1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/Float64SliceLarge-20              1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/StringFoo-20                      1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/StringBar-20                      1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/StringSliceLen3-20                1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/StringSliceLooksLikeIntSlice-20   1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/ByteSliceFoo-20                   1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/ByteSliceLooksLikeIntSlice-20     1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/SliceLen0-20                      1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/SliceLen1-20                      1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/SliceLen2-20                      1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/SliceLen3-20                      1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/SliceLen4-20                      1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/SliceLen5-20                      1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/SliceNested-20                    1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/MapLen0-20                        1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/MapLen2-20                        1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/MapNested-20                      1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashKVs/EmptyValue-20                     1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashValueSlice/Len2-20                    1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashValueSlice/Len5-20                    1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashValueSlice/Len8Nested-20              1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashValueMap/Len2-20                      1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashValueMap/Len5-20                      1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
HashValueMap/Len8Nested-20                1.000 ± 0%   0.000 ± 0%  -100.00% (p=0.000 n=10)
geomean                                   1.000                    ?                       ¹ ²
¹ summaries must be >0 to compute geomean
² ratios must be >0 to compute geomean
```
2026-06-18 06:40:24 +02:00
Robert Pająk 4ef740f17f sdk: deduplicate MAP attribute keys (#8471)
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/7957.

- Remove duplicate keys from `attribute.MAP` values by default across
SDK resource, log, trace, and metric export paths, including top-level
MAP-valued attributes and MAP values nested inside MAP or SLICE values.
- Update `log.WithAllowKeyDuplication()` behavior and docs.
- Always deduplicate MAP values in resources;
`go.opentelemetry.io/otel/sdk/resource` does not provide an opt-out.
Resources are typically evaluated once at startup or occasionally
updated. The ~12.90% overhead shown in benchmarks will have low impact
on an application's runtime latency, and having a strictly normalized
Resource map prevents downstream exporter issues.
- Preserve top-level `attribute.Set` behavior for resources, scopes, and
metric datapoint attributes; this change normalizes MAP-valued attribute
values, not the outer attribute collection semantics.
- Use last-value-wins semantics and do not increment dropped-attribute
counts for MAP duplicate removal.
- Keep internal helper code scoped per module: shared source lives in
`internal/shared/attrdedup`, then `gotmpl` renders module-local copies
under `sdk/internal`, `sdk/log/internal`, and `sdk/metric/internal`.

## Benchmarks

Baseline benchmarks were run from a local `main` worktree at
`/tmp/opentelemetry-go-main`; branch benchmarks were run from this
branch. All comparisons use `-benchmem -count=10`.

New helper benchmarks:

```console
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/sdk/internal/attrdedup
cpu: 13th Gen Intel(R) Core(TM) i7-13800H
                          │   this.txt   │
                          │    sec/op    │
Value/FastPath-20           186.4n ± 19%
Value/DuplicateMap-20       363.4n ± 82%
Value/NestedMapInSlice-20   607.4n ± 20%
geomean                     345.2n

                          │   this.txt   │
                          │     B/op     │
Value/FastPath-20           0.000 ± 0%
Value/DuplicateMap-20       320.0 ± 0%
Value/NestedMapInSlice-20   416.0 ± 0%
geomean                                ¹
¹ summaries must be >0 to compute geomean

                          │   this.txt   │
                          │  allocs/op   │
Value/FastPath-20           0.000 ± 0%
Value/DuplicateMap-20       2.000 ± 0%
Value/NestedMapInSlice-20   4.000 ± 0%
geomean                                ¹
¹ summaries must be >0 to compute geomean
```

```console
pkg: go.opentelemetry.io/otel/sdk/resource
                    │ main │ branch │
                    │ sec/op │ sec/op vs base │
MergeResource_1-20    587.9n ± 28%   677.7n ± 17%  +15.28% (p=0.043 n=10)
MergeResource_2-20    938.5n ± 11%  1011.8n ± 18%        ~ (p=0.393 n=10)
MergeResource_3-20    1.301µ ±  8%   1.522µ ± 21%  +16.95% (p=0.023 n=10)
MergeResource_4-20    1.487µ ± 31%   2.006µ ± 12%  +34.90% (p=0.000 n=10)
MergeResource_6-20    2.409µ ± 12%   2.962µ ± 15%  +22.96% (p=0.001 n=10)
MergeResource_8-20    3.336µ ± 10%   3.104µ ± 16%        ~ (p=0.247 n=10)
MergeResource_16-20   7.750µ ±  6%   8.076µ ±  9%        ~ (p=0.190 n=10)
geomean               1.821µ         2.056µ        +12.90%

pkg: go.opentelemetry.io/otel/sdk/trace
                                              │ main │ branch │
                                              │ sec/op │ sec/op vs base │
RecordingSpanSetAttributes/WithLimit/false-20  7.907µ ±  6%  11.311µ ±  6%  +43.06% (p=0.000 n=10)
RecordingSpanSetAttributes/WithLimit/true-20   13.29µ ± 15%   17.13µ ±  6%  +28.97% (p=0.002 n=10)
TraceStart/with_a_simple_span-20               402.1n ±  2%   406.4n ±  2%        ~ (p=0.218 n=10)
TraceStart/with_several_links-20               521.8n ±  1%   532.4n ±  2%  +2.03% (p=0.000 n=10)
TraceStart/with_attributes-20                  570.5n ±  2%   594.1n ±  2%  +4.12% (p=0.000 n=10)
TraceStart/ObservabilityEnabled-20             463.5n ±  1%   469.9n ±  1%  +1.38% (p=0.003 n=10)
SpanSetAttributesOverCapacity-20               2.539µ ±  8%   2.501µ ±  8%       ~ (p=0.684 n=10)
SpanWithAttributes_4/AlwaysSample-20           1.650µ ± 23%   1.867µ ± 12%       ~ (p=0.063 n=10)
SpanWithAttributes_4/NeverSample-20            634.5n ± 11%   683.4n ± 19%       ~ (p=0.315 n=10)
geomean                                        1.356µ         1.495µ       +10.27%
```

Resource and trace allocation counts were unchanged in the same
benchstat run.

```console
pkg: go.opentelemetry.io/otel/sdk/log
                                              │ main │ branch │
                                              │ sec/op │ sec/op vs base │
LoggerProviderLogger-20                        505.1n ± 8%  473.9n ± 15%       ~ (p=0.123 n=10)
SetAttributes/Unique/NoLimits-20               230.9n ± 9%  238.1n ±  7%       ~ (p=0.343 n=10)
SetAttributes/NestedDeduplication/Enabled-20   836.0n ± 6%  758.1n ±  8%  -9.32% (p=0.011 n=10)
SetAttributes/NestedDeduplication/Disabled-20  119.7n ± 1%  127.7n ±  8%       ~ (p=0.157 n=10)
geomean                                        328.7n       323.3n        -1.65%
```

Log allocation counts were unchanged in the same benchstat run.

```console
pkg: go.opentelemetry.io/otel/sdk/metric
                                                         │ main │ branch │
                                                         │ sec/op │ sec/op vs base │
MeasureNewAttributeSet/AlwaysOn/Int64Counter-20           725.7n ± 114%  1504.5n ± 15%  +107.32% (p=0.043 n=10)
MeasureNewAttributeSet/AlwaysOn/Float64Counter-20         1.106µ ±  14%   1.480µ ± 15%   +33.82% (p=0.000 n=10)
MeasureNewAttributeSet/AlwaysOn/Int64UpDownCounter-20     1.354µ ±   9%   1.334µ ± 13%         ~ (p=0.529 n=10)
MeasureNewAttributeSet/AlwaysOn/Float64UpDownCounter-20   1.445µ ±  29%   1.439µ ± 14%         ~ (p=0.542 n=10)
MeasureNewAttributeSet/AlwaysOn/Int64Histogram-20         1.423µ ±  31%   1.453µ ± 29%         ~ (p=0.631 n=10)
MeasureNewAttributeSet/AlwaysOn/Float64Histogram-20       1.383µ ±  41%   1.416µ ± 20%         ~ (p=0.796 n=10)
MeasureNewAttributeSet/AlwaysOn/Int64Gauge-20             1.105µ ±  42%   1.527µ ±  8%   +38.21% (p=0.023 n=10)
MeasureNewAttributeSet/AlwaysOn/Float64Gauge-20           1.598µ ±  10%   1.355µ ± 37%         ~ (p=0.247 n=10)
MeasureNewAttributeSet/AlwaysOff/Int64Counter-20          739.1n ±  16%   830.0n ± 17%         ~ (p=0.280 n=10)
MeasureNewAttributeSet/AlwaysOff/Float64Counter-20        299.2n ±  24%   766.7n ± 29%  +156.19% (p=0.000 n=10)
MeasureNewAttributeSet/AlwaysOff/Int64UpDownCounter-20    322.2n ± 104%   873.2n ±  7%  +171.01% (p=0.000 n=10)
MeasureNewAttributeSet/AlwaysOff/Float64UpDownCounter-20  740.5n ±  49%   713.8n ± 21%         ~ (p=0.481 n=10)
MeasureNewAttributeSet/AlwaysOff/Int64Histogram-20        901.1n ±  33%   988.8n ± 12%         ~ (p=0.481 n=10)
MeasureNewAttributeSet/AlwaysOff/Float64Histogram-20      1.059µ ±  23%   1.009µ ± 21%         ~ (p=0.393 n=10)
MeasureNewAttributeSet/AlwaysOff/Int64Gauge-20            408.9n ±  50%   788.0n ± 23%   +92.71% (p=0.000 n=10)
MeasureNewAttributeSet/AlwaysOff/Float64Gauge-20          544.5n ±  37%   662.1n ± 39%         ~ (p=0.725 n=10)
AsyncMeasureNewAttributeSet/AlwaysOn-20                   6.199µ ±  20%   5.766µ ± 26%         ~ (p=0.247 n=10)
AsyncMeasureNewAttributeSet/TraceBased-20                 1.811µ ±  10%   1.806µ ± 11%         ~ (p=0.912 n=10)
Instrument/instrumentImpl/aggregate-20                    2.577µ ±  10%   2.378µ ± 14%         ~ (p=0.247 n=10)
Instrument/observable/observe-20                          1.863µ ±  17%   1.762µ ±  8%         ~ (p=0.255 n=10)
InstrumentCreation-20                                     2.346µ ±  17%   2.215µ ±  8%         ~ (p=0.315 n=10)
geomean                                                   1.102µ          1.324µ         +20.12%
```

Metric B/op geomean was +0.10% and allocs/op geomean was unchanged in
the same benchstat run.

## Rejected implementations

### Seen-Pool

I tested an alternative `deduplicateMapValue` implementation using a
pooled `map[string]struct{}` for duplicate detection, modeled after
`sdk/log.Record`'s `seenPool`. The candidate was not kept because it
regressed all non-opt-out helper benchmark paths.

```console
pkg: go.opentelemetry.io/otel/sdk/internal/attrdedup
                             │ baseline │ seenpool │
                             │ sec/op │ sec/op vs base │
Value/FastPath-20              143.8n ± 0%   201.6n ±  0%  +40.15% (p=0.000 n=20)
Value/DuplicateMap-20          669.8n ± 9%   862.9n ± 12%  +28.83% (p=0.000 n=20)
Value/NestedMapInSlice-20      918.2n ± 9%  1115.0n ±  5%  +21.43% (p=0.000 n=20)
Value/AllowKeyDuplication-20   1.324n ± 0%   1.324n ±  0%        ~ (p=0.389 n=20)
geomean                        104.0n        126.6n        +21.68%
```

The candidate did not change allocation counts, but the `sync.Pool` and
map operations added measurable CPU overhead.

### Needs-Style Preflight

I tested an alternative implementation modeled after
`sdk/log.Record.needsValueLimitsOrDedup`: first scan attribute values to
determine whether normalization is needed, then normalize only when the
scan says a value would change.

The refined candidate preserved the opt-out fast path and avoided an
extra slice preflight pass, but was not kept because package-level
benchmark results were mixed: resource improved, but trace and metric
regressed.

```console
pkg: go.opentelemetry.io/otel/sdk/internal/attrdedup
                             │ baseline │ candidate │
                             │ sec/op │ sec/op vs base │
Value/FastPath-20              144.10n ± 0%   92.52n ± 0%  -35.79% (p=0.000 n=10)
Value/DuplicateMap-20           682.8n ± 19%  677.1n ± 34%       ~ (p=0.796 n=10)
Value/NestedMapInSlice-20       900.5n ±  7%  975.5n ±  8%  +8.33% (p=0.019 n=10)
Value/AllowKeyDuplication-20    1.325n ±  0%  1.325n ±  1%       ~ (p=0.860 n=10)
geomean                         104.1n        94.85n       -8.88%
```

```console
pkg: go.opentelemetry.io/otel/sdk/resource
MergeResource geomean: 2.209µ -> 1.896µ (-14.17%)

pkg: go.opentelemetry.io/otel/sdk/trace
Trace benchmark geomean: 1.474µ -> 1.576µ (+6.90%)
```

```console
pkg: go.opentelemetry.io/otel/sdk/log
Log benchmark geomean: 330.0n -> 330.6n (+0.18%)
```

```console
pkg: go.opentelemetry.io/otel/sdk/metric
Metric benchmark geomean: 1.355µ -> 1.455µ (+7.38%)
```

All candidate allocation geomeans were unchanged. Because the candidate
did not improve performance consistently across affected export paths,
this PR keeps the original lazy allocation-free no-op implementation.
2026-06-18 06:25:50 +02:00
renovate[bot] e8e809868f fix(deps): update golang.org/x to v1.4.0 (#8478)
This PR contains the following updates:

| Package | Change |
[Age](https://docs.renovatebot.com/merge-confidence/) |
[Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [golang.org/x/vuln](https://pkg.go.dev/golang.org/x/vuln) | [`v1.3.0`
→
`v1.4.0`](https://cs.opensource.google/go/x/vuln/+/refs/tags/v1.3.0...refs/tags/v1.4.0)
|
![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fvuln/v1.4.0?slim=true)
|
![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fvuln/v1.3.0/v1.4.0?slim=true)
|

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yMTkuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIxOS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-17 17:13:23 -07:00
renovate[bot] c2cac8c3d1 chore(deps): update golang.org/x to 9b6dc03 (#8474)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [golang.org/x/telemetry](https://pkg.go.dev/golang.org/x/telemetry) |
indirect | digest | `4de325e` → `9b6dc03` |

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yMTkuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIxOS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-17 11:45:31 -07:00
Cijo Thomas 54a0cb7106 [chore] add CNCF Slack join instructions (#8456)
Refs open-telemetry/community#3519
2026-06-17 17:35:39 +02:00
Mikhail Mazurskiy dc7c0bf64d tracetransform code cleanup (#8457) 2026-06-17 17:23:45 +02:00
renovate[bot] d7cc9adc5a chore(deps): update golang.org/x to 4de325e (#8466) 2026-06-17 14:25:23 +02:00
renovate[bot] ff8a7977d8 chore(deps): update module github.com/firefart/nonamedreturns to v1.0.7 (#8467) 2026-06-17 14:04:59 +02:00
renovate[bot] df5d2fe937 fix(deps): update module github.com/prometheus/common to v0.69.0 (#8472) 2026-06-17 13:28:54 +02:00
renovate[bot] a0aa7acad6 chore(deps): update module github.com/alecthomas/chroma/v2 to v2.27.0 (#8469) 2026-06-17 13:06:18 +02:00
renovate[bot] 312d041a1f chore(deps): update module github.com/pelletier/go-toml/v2 to v2.4.0 (#8470) 2026-06-17 12:42:33 +02:00
renovate[bot] b0458f7e4b chore(deps): update module github.com/dlclark/regexp2/v2 to v2.2.2 (#8464) 2026-06-17 12:24:51 +02:00
Robert Pająk dcfc16cebd exporters: support MAP attributes (#8453)
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/8163

Add end-to-end exporter handling for `attribute.SLICE` in the remaining
paths that still treated it as invalid or relied on fallback formatting.

Changes:

- encode `attribute.MAP` as OTLP `AnyValue_AnyValue_KvlistValue` for
trace, log, and metric transforms
- serialize Zipkin `MAP` attributes using the non-OTLP AnyValue string
representation
2026-06-16 21:25:29 +02:00
Robert Pająk e7087816b8 sdk/trace: apply AttributeValueLengthLimit to attribute.MAP (#8454)
Fixes #7956

Per the OTel spec, attribute value limits must be applied recursively to
map values. Previously `truncateAttr` handled `STRING`, `STRINGSLICE`,
`BYTESLICE`, and `SLICE`, but not `MAP`.

Add `MAP` handling to the trace SDK attribute limiter:
- `truncateAttr`: truncates `attribute.MAP` values when needed.
- `truncateValue`: recursively truncates `MAP`, `SLICE`, `STRINGSLICE`,
`STRING`, and `BYTESLICE` values.
- `needsTruncation`: pre-scan guard for `MAP` values to avoid rebuilding
when no nested value changes.


`benchstat` for `BenchmarkSpanLimits/AttributeValueLengthLimit`
(`count=10`):

```
SpanLimits/AttributeValueLengthLimit-20   14.88µ ± 16%   15.56µ ± 53%       ~ (p=0.739 n=10)
SpanLimits/AttributeValueLengthLimit-20   12.71Ki ± 0%   13.66Ki ± 0%   +7.52% (p=0.000 n=10)
SpanLimits/AttributeValueLengthLimit-20    47.00 ± 0%     56.00 ± 0%   +19.15% (p=0.000 n=10)
```

The extra allocations are expected in the truncation path because
truncated `MAP` values are rebuilt recursively.

`benchstat` for `BenchmarkSpanLimits/AttributeValueLengthLimit`
(`count=10`):

```
SpanLimits/None-20   14.18µ ± 7%   12.86µ ± 18%   -9.31% (p=0.043 n=10)
SpanLimits/None-20   12.16Ki ± 0%  12.16Ki ± 0%       ~ (p=1.000 n=10)
SpanLimits/None-20   38.00 ± 0%    38.00 ± 0%          ~ (p=1.000 n
```

No extra allocations where nothing needs to be rebuild.
2026-06-16 21:07:49 +02:00
renovate[bot] 6e2b9214f0 fix(deps): update googleapis to 62b3387 (#8463)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[google.golang.org/genproto/googleapis/api](https://redirect.github.com/googleapis/go-genproto)
| indirect | digest | `7ab31c2` → `62b3387` |
|
[google.golang.org/genproto/googleapis/rpc](https://redirect.github.com/googleapis/go-genproto)
| indirect | digest | `7ab31c2` → `62b3387` |
|
[google.golang.org/genproto/googleapis/rpc](https://redirect.github.com/googleapis/go-genproto)
| require | digest | `7ab31c2` → `62b3387` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/5322) for more information.

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yMTkuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIxOS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-15 15:54:30 -07:00
renovate[bot] e0783f305d chore(deps): update golang.org/x to 72dfd24 (#8462)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [golang.org/x/telemetry](https://pkg.go.dev/golang.org/x/telemetry) |
indirect | digest | `d61e87d` → `72dfd24` |

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yMTkuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIxOS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-15 14:07:30 -07:00
renovate[bot] 1d64dc70b9 chore(deps): update github.com/charmbracelet/ultraviolet digest to 2399af7 (#8460)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[github.com/charmbracelet/ultraviolet](https://redirect.github.com/charmbracelet/ultraviolet)
| indirect | digest | `35bcb73` → `2399af7` |

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yMTkuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIxOS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-15 13:43:18 -07:00
renovate[bot] 928d4f3726 chore(deps): update module charm.land/lipgloss/v2 to v2.0.4 (#8455) 2026-06-12 20:23:42 +02:00
renovate[bot] 5755136aba fix(deps): update golang.org/x (#8451) 2026-06-12 11:47:35 +02:00
Robert Pająk 51b03667ac attribute: add MAP type support (#8445)
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/7935

```
$ go test -run=^$ -bench=BenchmarkMap
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/attribute
cpu: 13th Gen Intel(R) Core(TM) i7-13800H
BenchmarkMap/Len3/Value-20      12423774               143.1 ns/op           192 B/op          1 allocs/op
BenchmarkMap/Len3/KeyValue-20            8123966               170.4 ns/op           192 B/op          1 allocs/op
BenchmarkMap/Len3/AsMap-20              12685639               111.0 ns/op           192 B/op          1 allocs/op
BenchmarkMap/Len3/String-20              4482690               250.1 ns/op           128 B/op          1 allocs/op
BenchmarkMap/Len3/Emit-20                5927258               205.5 ns/op           128 B/op          1 allocs/op
BenchmarkMap/Len5Nested/Value-20         2773639               387.1 ns/op           320 B/op          1 allocs/op
BenchmarkMap/Len5Nested/KeyValue-20      3093283               404.7 ns/op           320 B/op          1 allocs/op
BenchmarkMap/Len5Nested/AsMap-20         8646662               161.1 ns/op           320 B/op          1 allocs/op
BenchmarkMap/Len5Nested/String-20        2785362               499.1 ns/op           208 B/op          1 allocs/op
BenchmarkMap/Len5Nested/Emit-20          2882395               375.2 ns/op           208 B/op          1 allocs/op
```

```
$ go test -run=^$ -bench=BenchmarkHashValueMap
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/attribute
cpu: 13th Gen Intel(R) Core(TM) i7-13800H
BenchmarkHashValueMap/Len2-20            7589696               133.0 ns/op            80 B/op          1 allocs/op
BenchmarkHashValueMap/Len5-20            6254871               205.7 ns/op            80 B/op          1 allocs/op
BenchmarkHashValueMap/Len8Nested-20      2726431               424.1 ns/op            80 B/op          1 allocs/op
```
2026-06-12 10:07:11 +02:00
renovate[bot] 0ce87de251 chore(deps): update codspeedhq/action action to v4.17.5 (#8452) 2026-06-12 09:55:07 +02:00
David Ashpole 267c0060fb fix(attribute): prevent zero-hash collapse to empty set (#8402)
Fixes #8400.

Remap computed hash of 0 to 1 for non-empty input in hashKVs to prevent
zero-hash collapse to empty set. Do this instead of trying to handle the
actual hash of 0 because we use 0 in Distinct.IsValid()

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
2026-06-11 15:25:39 -04:00
David Ashpole 6e3d3448fc Add WithUnsafeAttributes to support no-copy dynamic metric API calls (#8251)
Split from https://github.com/open-telemetry/opentelemetry-go/pull/8179

Part of https://github.com/open-telemetry/opentelemetry-go/issues/7743

This just defines the new WithUnsafeAttributes option, but converts it
to a set, and leaves the optimization of that path for a follow-up.

Benchmarks

```
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/sdk/metric
cpu: Intel(R) Xeon(R) CPU @ 2.20GHz
                                                                              │   out.txt    │
                                                                              │    sec/op    │
EndToEndCounterAdd/NoFilter/Attributes/1/Precomputed/WithAttributeSet-24        65.18n ± 25%
EndToEndCounterAdd/NoFilter/Attributes/1/Precomputed/WithAttributes-24          61.96n ± 19%
EndToEndCounterAdd/NoFilter/Attributes/1/Precomputed/WithUnsafeAttributes-24    199.9n ± 22%
EndToEndCounterAdd/NoFilter/Attributes/1/Dynamic/WithAttributeSet-24            231.6n ±  9%
EndToEndCounterAdd/NoFilter/Attributes/1/Dynamic/WithAttributes-24              288.0n ± 14%
EndToEndCounterAdd/NoFilter/Attributes/1/Dynamic/WithUnsafeAttributes-24        271.9n ±  6%
EndToEndCounterAdd/NoFilter/Attributes/1/Naive/WithAttributes-24                352.7n ± 14%
EndToEndCounterAdd/NoFilter/Attributes/5/Precomputed/WithAttributeSet-24        68.73n ± 22%
EndToEndCounterAdd/NoFilter/Attributes/5/Precomputed/WithAttributes-24          61.04n ± 22%
EndToEndCounterAdd/NoFilter/Attributes/5/Precomputed/WithUnsafeAttributes-24    754.0n ± 25%
EndToEndCounterAdd/NoFilter/Attributes/5/Dynamic/WithAttributeSet-24            637.3n ± 21%
EndToEndCounterAdd/NoFilter/Attributes/5/Dynamic/WithAttributes-24              908.2n ± 28%
EndToEndCounterAdd/NoFilter/Attributes/5/Dynamic/WithUnsafeAttributes-24        901.7n ± 14%
EndToEndCounterAdd/NoFilter/Attributes/5/Naive/WithAttributes-24                1.062µ ± 15%
EndToEndCounterAdd/NoFilter/Attributes/10/Precomputed/WithAttributeSet-24       53.82n ± 28%
EndToEndCounterAdd/NoFilter/Attributes/10/Precomputed/WithAttributes-24         65.82n ±  5%
EndToEndCounterAdd/NoFilter/Attributes/10/Precomputed/WithUnsafeAttributes-24   1.717µ ± 14%
EndToEndCounterAdd/NoFilter/Attributes/10/Dynamic/WithAttributeSet-24           1.183µ ± 13%
EndToEndCounterAdd/NoFilter/Attributes/10/Dynamic/WithAttributes-24             1.803µ ± 20%
EndToEndCounterAdd/NoFilter/Attributes/10/Dynamic/WithUnsafeAttributes-24       2.050µ ± 15%
EndToEndCounterAdd/NoFilter/Attributes/10/Naive/WithAttributes-24               2.082µ ± 33%
EndToEndCounterAdd/Filtered/Attributes/1/Precomputed/WithAttributeSet-24        204.1n ± 14%
EndToEndCounterAdd/Filtered/Attributes/1/Precomputed/WithAttributes-24          214.5n ± 28%
EndToEndCounterAdd/Filtered/Attributes/1/Precomputed/WithUnsafeAttributes-24    433.9n ± 18%
EndToEndCounterAdd/Filtered/Attributes/1/Dynamic/WithAttributeSet-24            412.6n ± 10%
EndToEndCounterAdd/Filtered/Attributes/1/Dynamic/WithAttributes-24              464.1n ± 18%
EndToEndCounterAdd/Filtered/Attributes/1/Dynamic/WithUnsafeAttributes-24        471.4n ± 13%
EndToEndCounterAdd/Filtered/Attributes/1/Naive/WithAttributes-24                558.5n ± 19%
EndToEndCounterAdd/Filtered/Attributes/5/Precomputed/WithAttributeSet-24        772.4n ± 14%
EndToEndCounterAdd/Filtered/Attributes/5/Precomputed/WithAttributes-24          748.7n ±  9%
EndToEndCounterAdd/Filtered/Attributes/5/Precomputed/WithUnsafeAttributes-24    1.453µ ± 17%
EndToEndCounterAdd/Filtered/Attributes/5/Dynamic/WithAttributeSet-24            1.501µ ± 19%
EndToEndCounterAdd/Filtered/Attributes/5/Dynamic/WithAttributes-24              1.489µ ±  9%
EndToEndCounterAdd/Filtered/Attributes/5/Dynamic/WithUnsafeAttributes-24        1.608µ ± 24%
EndToEndCounterAdd/Filtered/Attributes/5/Naive/WithAttributes-24                1.671µ ± 14%
EndToEndCounterAdd/Filtered/Attributes/10/Precomputed/WithAttributeSet-24       1.324µ ± 18%
EndToEndCounterAdd/Filtered/Attributes/10/Precomputed/WithAttributes-24         1.463µ ± 17%
EndToEndCounterAdd/Filtered/Attributes/10/Precomputed/WithUnsafeAttributes-24   2.833µ ± 33%
EndToEndCounterAdd/Filtered/Attributes/10/Dynamic/WithAttributeSet-24           2.635µ ±  9%
EndToEndCounterAdd/Filtered/Attributes/10/Dynamic/WithAttributes-24             3.125µ ± 14%
EndToEndCounterAdd/Filtered/Attributes/10/Dynamic/WithUnsafeAttributes-24       2.685µ ± 24%
EndToEndCounterAdd/Filtered/Attributes/10/Naive/WithAttributes-24               3.404µ ±  8%
geomean                                                                         610.5n

                                                                              │    out.txt     │
                                                                              │      B/op      │
EndToEndCounterAdd/NoFilter/Attributes/1/Precomputed/WithAttributeSet-24          0.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/1/Precomputed/WithAttributes-24            0.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/1/Precomputed/WithUnsafeAttributes-24      128.0 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/1/Dynamic/WithAttributeSet-24              88.00 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/1/Dynamic/WithAttributes-24                152.0 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/1/Dynamic/WithUnsafeAttributes-24          128.0 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/1/Naive/WithAttributes-24                  232.0 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/5/Precomputed/WithAttributeSet-24          0.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/5/Precomputed/WithAttributes-24            0.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/5/Precomputed/WithUnsafeAttributes-24      640.0 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/5/Dynamic/WithAttributeSet-24              344.0 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/5/Dynamic/WithAttributes-24                664.0 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/5/Dynamic/WithUnsafeAttributes-24          640.0 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/5/Naive/WithAttributes-24                 1000.0 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/10/Precomputed/WithAttributeSet-24         0.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/10/Precomputed/WithAttributes-24           0.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/10/Precomputed/WithUnsafeAttributes-24   1.375Ki ± 0%
EndToEndCounterAdd/NoFilter/Attributes/10/Dynamic/WithAttributeSet-24             729.0 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/10/Dynamic/WithAttributes-24             1.399Ki ± 0%
EndToEndCounterAdd/NoFilter/Attributes/10/Dynamic/WithUnsafeAttributes-24       1.376Ki ± 0%
EndToEndCounterAdd/NoFilter/Attributes/10/Naive/WithAttributes-24               2.102Ki ± 0%
EndToEndCounterAdd/Filtered/Attributes/1/Precomputed/WithAttributeSet-24          64.00 ± 0%
EndToEndCounterAdd/Filtered/Attributes/1/Precomputed/WithAttributes-24            64.00 ± 0%
EndToEndCounterAdd/Filtered/Attributes/1/Precomputed/WithUnsafeAttributes-24      192.0 ± 0%
EndToEndCounterAdd/Filtered/Attributes/1/Dynamic/WithAttributeSet-24              152.0 ± 0%
EndToEndCounterAdd/Filtered/Attributes/1/Dynamic/WithAttributes-24                216.0 ± 0%
EndToEndCounterAdd/Filtered/Attributes/1/Dynamic/WithUnsafeAttributes-24          192.0 ± 0%
EndToEndCounterAdd/Filtered/Attributes/1/Naive/WithAttributes-24                  296.0 ± 0%
EndToEndCounterAdd/Filtered/Attributes/5/Precomputed/WithAttributeSet-24          576.0 ± 0%
EndToEndCounterAdd/Filtered/Attributes/5/Precomputed/WithAttributes-24            576.0 ± 0%
EndToEndCounterAdd/Filtered/Attributes/5/Precomputed/WithUnsafeAttributes-24    1.188Ki ± 0%
EndToEndCounterAdd/Filtered/Attributes/5/Dynamic/WithAttributeSet-24              921.0 ± 0%
EndToEndCounterAdd/Filtered/Attributes/5/Dynamic/WithAttributes-24              1.212Ki ± 0%
EndToEndCounterAdd/Filtered/Attributes/5/Dynamic/WithUnsafeAttributes-24        1.188Ki ± 0%
EndToEndCounterAdd/Filtered/Attributes/5/Naive/WithAttributes-24                1.539Ki ± 0%
EndToEndCounterAdd/Filtered/Attributes/10/Precomputed/WithAttributeSet-24       1.312Ki ± 0%
EndToEndCounterAdd/Filtered/Attributes/10/Precomputed/WithAttributes-24         1.312Ki ± 0%
EndToEndCounterAdd/Filtered/Attributes/10/Precomputed/WithUnsafeAttributes-24   2.688Ki ± 0%
EndToEndCounterAdd/Filtered/Attributes/10/Dynamic/WithAttributeSet-24           2.025Ki ± 0%
EndToEndCounterAdd/Filtered/Attributes/10/Dynamic/WithAttributes-24             2.713Ki ± 0%
EndToEndCounterAdd/Filtered/Attributes/10/Dynamic/WithUnsafeAttributes-24       2.689Ki ± 0%
EndToEndCounterAdd/Filtered/Attributes/10/Naive/WithAttributes-24               3.414Ki ± 0%
geomean                                                                                      ¹
¹ summaries must be >0 to compute geomean

                                                                              │   out.txt    │
                                                                              │  allocs/op   │
EndToEndCounterAdd/NoFilter/Attributes/1/Precomputed/WithAttributeSet-24        0.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/1/Precomputed/WithAttributes-24          0.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/1/Precomputed/WithUnsafeAttributes-24    2.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/1/Dynamic/WithAttributeSet-24            2.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/1/Dynamic/WithAttributes-24              3.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/1/Dynamic/WithUnsafeAttributes-24        2.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/1/Naive/WithAttributes-24                5.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/5/Precomputed/WithAttributeSet-24        0.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/5/Precomputed/WithAttributes-24          0.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/5/Precomputed/WithUnsafeAttributes-24    2.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/5/Dynamic/WithAttributeSet-24            2.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/5/Dynamic/WithAttributes-24              3.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/5/Dynamic/WithUnsafeAttributes-24        2.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/5/Naive/WithAttributes-24                5.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/10/Precomputed/WithAttributeSet-24       0.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/10/Precomputed/WithAttributes-24         0.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/10/Precomputed/WithUnsafeAttributes-24   2.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/10/Dynamic/WithAttributeSet-24           2.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/10/Dynamic/WithAttributes-24             3.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/10/Dynamic/WithUnsafeAttributes-24       2.000 ± 0%
EndToEndCounterAdd/NoFilter/Attributes/10/Naive/WithAttributes-24               5.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/1/Precomputed/WithAttributeSet-24        1.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/1/Precomputed/WithAttributes-24          1.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/1/Precomputed/WithUnsafeAttributes-24    3.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/1/Dynamic/WithAttributeSet-24            3.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/1/Dynamic/WithAttributes-24              4.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/1/Dynamic/WithUnsafeAttributes-24        3.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/1/Naive/WithAttributes-24                6.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/5/Precomputed/WithAttributeSet-24        2.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/5/Precomputed/WithAttributes-24          2.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/5/Precomputed/WithUnsafeAttributes-24    4.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/5/Dynamic/WithAttributeSet-24            4.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/5/Dynamic/WithAttributes-24              5.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/5/Dynamic/WithUnsafeAttributes-24        4.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/5/Naive/WithAttributes-24                7.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/10/Precomputed/WithAttributeSet-24       2.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/10/Precomputed/WithAttributes-24         2.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/10/Precomputed/WithUnsafeAttributes-24   4.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/10/Dynamic/WithAttributeSet-24           4.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/10/Dynamic/WithAttributes-24             5.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/10/Dynamic/WithUnsafeAttributes-24       4.000 ± 0%
EndToEndCounterAdd/Filtered/Attributes/10/Naive/WithAttributes-24               7.000 ± 0%
geomean                                                                                    ¹
¹ summaries must be >0 to compute geomean
```
2026-06-11 14:33:54 -04:00
renovate[bot] fbf2027dc8 chore(deps): update golang.org/x to v0.56.0 (#8448) 2026-06-11 19:00:00 +02:00
renovate[bot] 963102fb46 chore(deps): update golang.org/x to fb80ec8 (#8444) 2026-06-11 15:50:51 +02:00
renovate[bot] a3de6477db fix(deps): update googleapis to 7ab31c2 (#8447) 2026-06-11 08:44:44 +02:00
David Ashpole 35e8690c4b Document that WithExemplarFilter(nil) is not supported (#8392)
Fixes #8240
2026-06-10 11:13:58 -04:00
David Ashpole f6dd2c3f91 prometheus: avoid preallocating scope attributes when disabled (#8404)
Fixes #8401

A regression test was too verbose + brittle to be useful.

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2026-06-10 07:49:54 -07:00
David Ashpole 0a1d12fb66 fix: clear stale histogram fields on datapoint reuse (#8403)
Fixes #8399

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2026-06-10 09:57:18 -04:00
David Ashpole 0eb89a5210 Fix memory leak in exemplar reservoir by storing SpanContext instead of Context (#8389)
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/8337

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2026-06-10 09:37:37 -04:00
Kevin Gao 4714a4fbd5 sdk/metric: reuse cumulative-histogram Collect buffers to reduce heap usage (#8428)
`cumulativeHistogram.collect()` was allocating a fresh `[]uint64` for
every series' `BucketCounts` (and a fresh `Exemplars` slice) on every
cycle. The delta path already reused these buffers; the cumulative path
now follows the same pattern: pre-size `h.DataPoints`, write in place so
`loadCountsInto` and `collectExemplars` reuse the existing slot's
capacity, and explicitly clear `Sum`/`Min`/`Max` since `sync.Map`
iteration order isn't stable across cycles.

Steady-state allocation at high cardinality drops by ~98% (187 MiB ->
3.8 MiB per cycle at 100k series).

Fixes #8427

---------

Signed-off-by: Kevin Gao <kevin@sierra.ai>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
2026-06-09 16:27:16 -04:00
David Ashpole 8bc4068efe fix: off-by-one bug for FixedSizeReservoir (#8309)
While working on
https://github.com/open-telemetry/opentelemetry-go/pull/8306, I found an
off-by-one error.

Reset was setting `r.next` to `k`, and then calling advance(), which
meant `r.next` was always at least `k+1`.

The first `k` exemplars are unconditionally stored during the "fill"
phase. Count is incremented at the end of the Offer call, so the `k+1`th
exemplar was **never** stored because `r.next` is `k` when that Offer
call is being evaluated.

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2026-06-09 15:53:20 -04:00
David Ashpole 9ff141f6d0 Fix incorrect formatting verbs in opencensus bridge (#8424)
fixes #8423
2026-06-09 15:38:54 -04:00
Abhijeet Prasad 0c2e50c2c0 fix(otlphttp): support retry-after HTTP-date (#8417)
Parse Retry-After header values as HTTP dates in addition to delay
seconds when retrying OTLP HTTP exports, matching RFC 7231. See
https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.3.

This is a follow up to
https://github.com/open-telemetry/opentelemetry-go/pull/8383.
2026-06-09 20:50:58 +02:00
David Ashpole 41d99e7eb1 Cleanup limitedSyncMap, and add tests (#8302)
Making some cleanups to the existing limitedSyncMap before
https://github.com/open-telemetry/opentelemetry-go/pull/8276.

### Changes

limitedSyncMap uses generics to eliminate the need to use type
assertions in the aggregators themselves, and moves all type assertions
to be internal to the limitedSyncMap implementation

Testing

* Added two new tests for limitedSyncMap: a ConcurrentSafe test, and a
test that ensures the overflow limit is correctly enforced after it is
Cleared.

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2026-06-09 14:03:38 -04:00
Robert Pająk 3a1412d2b3 sdk/trace: avoid logging exporter endpoint configuration (#8438)
Prevent internal trace exporter logging from including endpoint
configuration.

`MarshalLog` now keeps the existing log shape where practical, but logs
exporter/client type strings instead of recursively serializing exporter
and client internals. OTLP trace HTTP/gRPC and Zipkin exporter log
payloads no longer include endpoint URLs, embedded credentials, query
tokens, internal hostnames, or insecure transport configuration.

## Changes

- Stop recursive logging of trace exporter/client config from
`sdk/trace` span processors and `otlptrace.Exporter`.
- Remove endpoint/URL fields from OTLP trace HTTP/gRPC and Zipkin
`MarshalLog` output.
- Add regression coverage for credential-bearing endpoints not appearing
in internal log output.
2026-06-09 19:09:30 +02:00
ian 1802033e48 fix(stdouttrace/observ): record error.type on opDuration when exportedSpans is disabled (#8432)
When `ExportOp.End` is called with a non-nil error and `exportedSpans`
metric is disabled but `opDuration` is enabled, the `error.type`
attribute is not included in the duration histogram record.

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2026-06-09 08:07:49 -07:00
renovate[bot] 75e06c2343 chore(deps): update github.com/charmbracelet/ultraviolet digest to 35bcb73 (#8436)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[github.com/charmbracelet/ultraviolet](https://redirect.github.com/charmbracelet/ultraviolet)
| indirect | digest | `6cf7526` → `35bcb73` |

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0My4yMDkuNCIsInVwZGF0ZWRJblZlciI6IjQzLjIwOS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-06-09 07:53:34 -07:00
renovate[bot] 3455c6f1a6 chore(deps): update golang.org/x (#8439) 2026-06-09 13:24:17 +02:00
renovate[bot] 989566b201 fix(deps): update googleapis to 4308a22 (#8440) 2026-06-09 13:06:41 +02:00
renovate[bot] 3a3af698d3 fix(deps): update module go.opentelemetry.io/collector/pdata to v1.60.0 (#8442) 2026-06-09 12:44:17 +02:00
renovate[bot] 3e1f0653cd chore(deps): update module github.com/dlclark/regexp2/v2 to v2.2.1 (#8434) 2026-06-08 16:49:40 +02:00
renovate[bot] 58f767a448 fix(deps): update golang.org/x (#8437) 2026-06-08 16:25:23 +02:00
renovate[bot] 6043aae284 chore(deps): update codecov/codecov-action action to v7 (#8435) 2026-06-08 16:01:10 +02:00