1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-10-31 00:07:40 +02:00

239 Commits

Author SHA1 Message Date
renovate[bot]
56138d1060 fix(deps): update golang.org/x (#7482)
This PR contains the following updates:

| Package | Type | Update | Change | Age | Confidence |
|---|---|---|---|---|---|
| golang.org/x/exp | require | digest | `27f1f14` -> `90e834f` |
[![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fexp/v0.0.0-20251017212417-90e834f514db?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fexp/v0.0.0-20251002181428-27f1f14c8bb9/v0.0.0-20251017212417-90e834f514db?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| golang.org/x/exp/typeparams | indirect | digest | `27f1f14` ->
`90e834f` |
[![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fexp%2ftypeparams/v0.0.0-20251017212417-90e834f514db?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fexp%2ftypeparams/v0.0.0-20251002181428-27f1f14c8bb9/v0.0.0-20251017212417-90e834f514db?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| golang.org/x/net | indirect | minor | `v0.45.0` -> `v0.46.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fnet/v0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fnet/v0.45.0/v0.46.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| golang.org/x/telemetry | indirect | digest | `ca0c2a9` -> `24f779f` |
[![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2ftelemetry/v0.0.0-20251014153721-24f779f6aaef?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2ftelemetry/v0.0.0-20251008162818-ca0c2a905e73/v0.0.0-20251014153721-24f779f6aaef?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| golang.org/x/tools | require | minor | `v0.37.0` -> `v0.38.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2ftools/v0.38.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2ftools/v0.37.0/v0.38.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard 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:eyJjcmVhdGVkSW5WZXIiOiI0MS4xMzEuOSIsInVwZGF0ZWRJblZlciI6IjQxLjE0My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com>
2025-10-20 09:09:34 -07:00
Flc゛
80cb909774 refactor: replace context.Background() with t.Context()/b.Context() in tests (#7352)
Based on the Go version we currently use, the dependency already
supports 1.24+, which allows using `t.Context()` and `b.Context()` in
unit tests and benchmarks respectively.

- Enable `context-background` and `context-todo` in
[`usetesting`](https://golangci-lint.run/docs/linters/configuration/#usetesting)
- Adjust the code to support linter detection

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
2025-09-23 09:52:45 +02:00
renovate[bot]
6243f21805 fix(deps): update module go.opentelemetry.io/auto/sdk to v1.2.1 (#7365)
Coming soon: The Renovate bot (GitHub App) will be renamed to Mend. PRs
from Renovate will soon appear from 'Mend'. Learn more
[here](https://redirect.github.com/renovatebot/renovate/discussions/37842).

This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
|
[go.opentelemetry.io/auto/sdk](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation)
| `v1.1.0` -> `v1.2.1` |
[![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fauto%2fsdk/v1.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fauto%2fsdk/v1.1.0/v1.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

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

---

### Release Notes

<details>
<summary>open-telemetry/opentelemetry-go-instrumentation
(go.opentelemetry.io/auto/sdk)</summary>

###
[`v1.2.1`](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/blob/HEAD/CHANGELOG.md#goopentelemetryioautosdk-v121---2025-09-15)

##### Fixed

- Fix `uint32` bounding on 32 bit architectures in the
`go.opentelemetry.io/auto/sdk` module.
([#&#8203;2810](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2810))

###
[`v1.2.0`](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/blob/HEAD/CHANGELOG.md#v0230v120---2025-09-10)

<!-- markdownlint-disable MD028 -->

> \[!NOTE]
> This is the last release version that will support building the
auto-instrumentation CLI using Go 1.23.
> The next release will require development to be done using Go >= 1.24.

<!-- markdownlint-enable MD028 -->

##### Added

- Cache offsets for `golang.org/x/net` `0.42.0`.
([#&#8203;2503](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2503))
- Cache offsets for `google.golang.org/grpc` `1.74.2`.
([#&#8203;2546](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2546))
- Cache offsets for `google.golang.org/grpc` `1.76.0-dev`.
([#&#8203;2596](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2596))
- Allow configuration of the resource using a [resource.Detector].
([#&#8203;2598](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2598))
- The `WithResourceDetector` function is added to
`go.opentelemetry.io/auto/pipeline/otelsdk`.
- The `WithEnv` function is updated to parse the
`OTEL_RESOURCE_DETECTOR` environment variable.
Values are expected to be a comma-separated list of resource detector
IDs registered with the [`autodetect` package].
- Cache offsets for Go `1.23.12`.
([#&#8203;2603](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2603))
- Cache offsets for Go `1.24.6`.
([#&#8203;2603](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2603))
- Cache offsets for `golang.org/x/net` `0.43.0`.
([#&#8203;2615](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2615))
- Cache offsets for Go `1.25.0`.
([#&#8203;2651](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2651))
- Cache offsets for `google.golang.org/grpc` `1.75.0`.
([#&#8203;2686](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2686))
- Cache offsets for `github.com/segmentio/kafka-go` `0.4.49`.
([#&#8203;2699](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2699))
- Cache offsets for `go.opentelemetry.io/otel` `v1.38.0`.
([#&#8203;2726](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2726))
- Cache offsets for Go `1.24.7`.
([#&#8203;2747](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2747))
- Cache offsets for Go `1.25.1`.
([#&#8203;2747](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2747))
- Cache offsets for `golang.org/x/net` `0.44.0`.
([#&#8203;2773](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2773))
- Cache offsets for `google.golang.org/grpc` `1.72.3`.
([#&#8203;2787](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2787))
- Cache offsets for `google.golang.org/grpc` `1.73.1`.
([#&#8203;2787](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2787))
- Cache offsets for `google.golang.org/grpc` `1.74.3`.
([#&#8203;2787](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2787))
- Cache offsets for `google.golang.org/grpc` `1.75.1`.
([#&#8203;2787](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2787))

[resource.Detector]:
https://pkg.go.dev/go.opentelemetry.io/otel/sdk/resource#Detector

[`autodetect` package]:
https://pkg.go.dev/go.opentelemetry.io/contrib/detectors/autodetect

##### Changed

- Upgrade `go.opentelemetry.io/auto` semconv to `v1.37.0`.
([#&#8203;2763](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2763))
- Upgrade `go.opentelemetry.io/auto/sdk` semconv to `v1.37.0`.
([#&#8203;2763](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2763))

##### Fixed

- Add `telemetry.distro.version` resource attribute to the `otelsdk`
handler.
([#&#8203;2383](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2383))
- `active_spans_by_span_ptr` eBPF map used in the traceglobal probe
changed to LRU.
([#&#8203;2509](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation/pull/2509))

</details>

---

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

---

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-15 20:06:06 +02:00
Andrew Wilkins
e2da30d7d0 trace,metric,log: change WithInstrumentationAttributes to not de-depuplicate the passed attributes in a closure (#7266)
WithInstrumentationAttributes is creating a closure with a reference to
a slice which is later passed to attribute.NewSet.

attribute.NewSet may mutate the slice, so this will lead to a data race
when the option is applied concurrently. We can fix this by moving the
call to attribute.NewSet outside the closure.

Fixes #7217

<details>
<summary>benchstat for New*Config</summary>

```
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/log
cpu: Intel(R) Core(TM) Ultra 7 155U
                                                      │ /tmp/old.txt │            /tmp/new.txt            │
                                                      │    sec/op    │   sec/op     vs base               │
NewLoggerConfig/with_no_options-14                       2.961n ± 6%   3.091n ± 6%        ~ (p=0.132 n=6)
NewLoggerConfig/with_an_instrumentation_version-14       24.75n ± 4%   25.04n ± 5%        ~ (p=0.126 n=6)
NewLoggerConfig/with_a_schema_url-14                     24.97n ± 6%   24.79n ± 4%        ~ (p=0.974 n=6)
NewLoggerConfig/with_instrumentation_attribute-14        55.32n ± 4%   25.32n ± 4%  -54.23% (p=0.002 n=6)
NewLoggerConfig/with_instrumentation_attribute_set-14    24.77n ± 3%   24.96n ± 4%        ~ (p=0.394 n=6)
geomean                                                  19.05n        16.47n       -13.52%

                                                      │ /tmp/old.txt │              /tmp/new.txt              │
                                                      │     B/op     │    B/op     vs base                    │
NewLoggerConfig/with_no_options-14                      0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewLoggerConfig/with_an_instrumentation_version-14      0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewLoggerConfig/with_a_schema_url-14                    0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewLoggerConfig/with_instrumentation_attribute-14       64.00 ± 0%      0.00 ± 0%  -100.00% (p=0.002 n=6)
NewLoggerConfig/with_instrumentation_attribute_set-14   0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
geomean                                                            ²               ?                      ² ³
¹ all samples are equal
² summaries must be >0 to compute geomean
³ ratios must be >0 to compute geomean

                                                      │ /tmp/old.txt │              /tmp/new.txt              │
                                                      │  allocs/op   │ allocs/op   vs base                    │
NewLoggerConfig/with_no_options-14                      0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewLoggerConfig/with_an_instrumentation_version-14      0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewLoggerConfig/with_a_schema_url-14                    0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewLoggerConfig/with_instrumentation_attribute-14       1.000 ± 0%     0.000 ± 0%  -100.00% (p=0.002 n=6)
NewLoggerConfig/with_instrumentation_attribute_set-14   0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
geomean                                                            ²               ?                      ² ³
¹ all samples are equal
² summaries must be >0 to compute geomean
³ ratios must be >0 to compute geomean

pkg: go.opentelemetry.io/otel/metric
                                                     │ /tmp/old.txt │            /tmp/new.txt            │
                                                     │    sec/op    │   sec/op     vs base               │
NewMeterConfig/with_no_options-14                       3.255n ± 2%   3.045n ± 4%   -6.42% (p=0.002 n=6)
NewMeterConfig/with_an_instrumentation_version-14       22.84n ± 6%   23.14n ± 3%        ~ (p=0.818 n=6)
NewMeterConfig/with_a_schema_url-14                     24.71n ± 5%   25.29n ± 4%        ~ (p=0.132 n=6)
NewMeterConfig/with_instrumentation_attribute-14        61.30n ± 5%   25.36n ± 7%  -58.63% (p=0.002 n=6)
NewMeterConfig/with_instrumentation_attribute_set-14    25.93n ± 5%   26.24n ± 4%        ~ (p=0.485 n=6)
geomean                                                 19.64n        16.40n       -16.49%

                                                     │ /tmp/old.txt │              /tmp/new.txt              │
                                                     │     B/op     │    B/op     vs base                    │
NewMeterConfig/with_no_options-14                      0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewMeterConfig/with_an_instrumentation_version-14      0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewMeterConfig/with_a_schema_url-14                    0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewMeterConfig/with_instrumentation_attribute-14       64.00 ± 0%      0.00 ± 0%  -100.00% (p=0.002 n=6)
NewMeterConfig/with_instrumentation_attribute_set-14   0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
geomean                                                           ²               ?                      ² ³
¹ all samples are equal
² summaries must be >0 to compute geomean
³ ratios must be >0 to compute geomean

                                                     │ /tmp/old.txt │              /tmp/new.txt              │
                                                     │  allocs/op   │ allocs/op   vs base                    │
NewMeterConfig/with_no_options-14                      0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewMeterConfig/with_an_instrumentation_version-14      0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewMeterConfig/with_a_schema_url-14                    0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewMeterConfig/with_instrumentation_attribute-14       1.000 ± 0%     0.000 ± 0%  -100.00% (p=0.002 n=6)
NewMeterConfig/with_instrumentation_attribute_set-14   0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
geomean                                                           ²               ?                      ² ³
¹ all samples are equal
² summaries must be >0 to compute geomean
³ ratios must be >0 to compute geomean

pkg: go.opentelemetry.io/otel/trace
                                                         │ /tmp/old.txt  │            /tmp/new.txt             │
                                                         │    sec/op     │    sec/op     vs base               │
NewTracerConfig/with_no_options-14                          2.980n ±  5%   2.948n ±  3%        ~ (p=0.240 n=6)
NewTracerConfig/with_an_instrumentation_version-14          24.44n ±  4%   23.54n ±  1%   -3.70% (p=0.002 n=6)
NewTracerConfig/with_a_schema_url-14                        24.47n ±  5%   23.95n ±  7%        ~ (p=0.180 n=6)
NewTracerConfig/with_instrumentation_attribute-14           58.39n ±  7%   25.54n ±  6%  -56.25% (p=0.002 n=6)
NewTracerConfig/with_instrumentation_attribute_set-14       25.70n ±  3%   26.55n ±  6%        ~ (p=0.310 n=6)
NewSpanStartConfig/with_no_options-14                       2.670n ±  7%   2.838n ±  6%        ~ (p=0.093 n=6)
NewSpanStartConfig/with_attributes-14                       60.65n ± 20%   51.84n ±  8%        ~ (p=0.240 n=6)
NewSpanStartConfig/with_attributes_set_multiple_times-14    115.4n ± 10%   110.0n ±  7%   -4.68% (p=0.004 n=6)
NewSpanStartConfig/with_a_timestamp-14                      18.03n ±  3%   17.77n ±  4%        ~ (p=0.937 n=6)
NewSpanStartConfig/with_links-14                            66.63n ±  8%   75.60n ±  8%  +13.47% (p=0.009 n=6)
NewSpanStartConfig/with_links_set_multiple_times-14         155.2n ±  4%   162.8n ± 18%        ~ (p=0.485 n=6)
NewSpanStartConfig/with_new_root-14                         26.59n ± 19%   23.04n ±  4%  -13.32% (p=0.004 n=6)
NewSpanStartConfig/with_span_kind-14                        24.02n ±  4%   23.72n ±  9%        ~ (p=0.589 n=6)
NewSpanEndConfig/with_no_options-14                         2.673n ± 10%   2.765n ±  7%        ~ (p=0.485 n=6)
NewSpanEndConfig/with_a_timestamp-14                        17.37n ±  9%   18.04n ±  4%        ~ (p=0.093 n=6)
NewSpanEndConfig/with_stack_trace-14                        16.70n ±  3%   16.59n ±  4%        ~ (p=0.937 n=6)
NewEventConfig/with_no_options-14                           37.14n ±  6%   36.63n ±  3%        ~ (p=0.818 n=6)
NewEventConfig/with_attributes-14                          117.15n ±  9%   98.92n ± 14%  -15.56% (p=0.009 n=6)
NewEventConfig/with_attributes_set_multiple_times-14        172.6n ±  5%   168.1n ±  9%        ~ (p=0.333 n=6)
NewEventConfig/with_a_timestamp-14                          25.41n ±  3%   26.66n ±  3%   +4.92% (p=0.002 n=6)
NewEventConfig/with_a_stacktrace-14                         51.01n ± 15%   52.45n ±  2%        ~ (p=0.093 n=6)
geomean                                                     28.82n         27.38n         -4.98%

                                                         │ /tmp/old.txt │              /tmp/new.txt              │
                                                         │     B/op     │    B/op     vs base                    │
NewTracerConfig/with_no_options-14                         0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewTracerConfig/with_an_instrumentation_version-14         0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewTracerConfig/with_a_schema_url-14                       0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewTracerConfig/with_instrumentation_attribute-14          64.00 ± 0%      0.00 ± 0%  -100.00% (p=0.002 n=6)
NewTracerConfig/with_instrumentation_attribute_set-14      0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanStartConfig/with_no_options-14                      0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanStartConfig/with_attributes-14                      64.00 ± 0%     64.00 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanStartConfig/with_attributes_set_multiple_times-14   192.0 ± 0%     192.0 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanStartConfig/with_a_timestamp-14                     0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanStartConfig/with_links-14                           96.00 ± 0%     96.00 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanStartConfig/with_links_set_multiple_times-14        272.0 ± 0%     272.0 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanStartConfig/with_new_root-14                        0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanStartConfig/with_span_kind-14                       0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanEndConfig/with_no_options-14                        0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanEndConfig/with_a_timestamp-14                       0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanEndConfig/with_stack_trace-14                       0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewEventConfig/with_no_options-14                          0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewEventConfig/with_attributes-14                          64.00 ± 0%     64.00 ± 0%         ~ (p=1.000 n=6) ¹
NewEventConfig/with_attributes_set_multiple_times-14       192.0 ± 0%     192.0 ± 0%         ~ (p=1.000 n=6) ¹
NewEventConfig/with_a_timestamp-14                         0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewEventConfig/with_a_stacktrace-14                        0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
geomean                                                               ²               ?                      ² ³
¹ all samples are equal
² summaries must be >0 to compute geomean
³ ratios must be >0 to compute geomean

                                                         │ /tmp/old.txt │              /tmp/new.txt              │
                                                         │  allocs/op   │ allocs/op   vs base                    │
NewTracerConfig/with_no_options-14                         0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewTracerConfig/with_an_instrumentation_version-14         0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewTracerConfig/with_a_schema_url-14                       0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewTracerConfig/with_instrumentation_attribute-14          1.000 ± 0%     0.000 ± 0%  -100.00% (p=0.002 n=6)
NewTracerConfig/with_instrumentation_attribute_set-14      0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanStartConfig/with_no_options-14                      0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanStartConfig/with_attributes-14                      1.000 ± 0%     1.000 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanStartConfig/with_attributes_set_multiple_times-14   2.000 ± 0%     2.000 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanStartConfig/with_a_timestamp-14                     0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanStartConfig/with_links-14                           1.000 ± 0%     1.000 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanStartConfig/with_links_set_multiple_times-14        2.000 ± 0%     2.000 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanStartConfig/with_new_root-14                        0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanStartConfig/with_span_kind-14                       0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanEndConfig/with_no_options-14                        0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanEndConfig/with_a_timestamp-14                       0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewSpanEndConfig/with_stack_trace-14                       0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewEventConfig/with_no_options-14                          0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewEventConfig/with_attributes-14                          1.000 ± 0%     1.000 ± 0%         ~ (p=1.000 n=6) ¹
NewEventConfig/with_attributes_set_multiple_times-14       2.000 ± 0%     2.000 ± 0%         ~ (p=1.000 n=6) ¹
NewEventConfig/with_a_timestamp-14                         0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
NewEventConfig/with_a_stacktrace-14                        0.000 ± 0%     0.000 ± 0%         ~ (p=1.000 n=6) ¹
geomean                                                               ²               ?                      ² ³
¹ all samples are equal
² summaries must be >0 to compute geomean
³ ratios must be >0 to compute geomean
```
</details>

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Flc゛ <four_leaf_clover@foxmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2025-09-11 08:47:22 -07:00
Robert Pająk
07a91dd2b0 trace,metric,log: add WithInstrumentationAttributeSet option (#7287)
Per
https://github.com/open-telemetry/opentelemetry-go/pull/7266#issuecomment-3237027300

Related to
https://github.com/open-telemetry/opentelemetry-go/issues/7217

## What

This PR adds `WithInstrumentationAttributeSet` option functions to the
`log`, `metric`, and `trace` packages as suggested in
https://github.com/open-telemetry/opentelemetry-go/pull/7266#issuecomment-3237027300.
These new functions provide a more concurrent-safe alternative to the
existing `WithInstrumentationAttributes` functions by accepting a
pre-constructed `attribute.Set` instead of variadic `attribute.KeyValue`
parameters.

## Why

As discussed in #7266, the existing `WithInstrumentationAttributes`
functions can lead to data races when used concurrently because
`attribute.NewSet()` may mutate the passed slice in-place. While the
issue was partially addressed by moving the `attribute.NewSet()` call
outside the closure, the best long-term solution is to provide an
alternative that accepts an immutable `attribute.Set`.

**Benefits:**

1. **Concurrent Safety**: Since `attribute.Set` is immutable, these
functions are inherently safe for concurrent use
2. **Performance**: Avoids repeated calls to `attribute.NewSet()` when
the same attributes are used multiple times
3. **Consistency**: Matches the existing pattern used in
`metric.WithAttributeSet()`
4. **Flexibility**: Allows users to pre-compute attribute sets and reuse
them

Deprecating `WithInstrumentationAttributes` is out of scope. See
https://github.com/open-telemetry/opentelemetry-go/pull/7287#issuecomment-3245820459.

## Benchmarks

```
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/trace
cpu: 13th Gen Intel(R) Core(TM) i7-13800H
BenchmarkNewTracerConfig/with_no_options-20         	280298306	         4.268 ns/op	       0 B/op	       0 allocs/op
BenchmarkNewTracerConfig/with_an_instrumentation_version-20         	33389427	        30.84 ns/op	       0 B/op	       0 allocs/op
BenchmarkNewTracerConfig/with_a_schema_url-20                       	35441077	        30.46 ns/op	       0 B/op	       0 allocs/op
BenchmarkNewTracerConfig/with_instrumentation_attribute-20          	17607649	        88.23 ns/op	      64 B/op	       1 allocs/op
BenchmarkNewTracerConfig/with_instrumentation_attribute_set-20      	38336211	        31.30 ns/op	       0 B/op	       0 allocs/op
```

```
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/metric
cpu: 13th Gen Intel(R) Core(TM) i7-13800H
BenchmarkNewMeterConfig/with_no_options-20         	262998199	         4.525 ns/op	       0 B/op	       0 allocs/op
BenchmarkNewMeterConfig/with_an_instrumentation_version-20         	40483780	        29.31 ns/op	       0 B/op	       0 allocs/op
BenchmarkNewMeterConfig/with_a_schema_url-20                       	39162420	        30.58 ns/op	       0 B/op	       0 allocs/op
BenchmarkNewMeterConfig/with_instrumentation_attribute-20          	19900275	        77.50 ns/op	      64 B/op	       1 allocs/op
BenchmarkNewMeterConfig/with_instrumentation_attribute_set-20      	37519020	        31.93 ns/op	       0 B/op	       0 allocs/op
```

```
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/log
cpu: 13th Gen Intel(R) Core(TM) i7-13800H
BenchmarkNewLoggerConfig/with_no_options-20         	271100760	         4.322 ns/op	       0 B/op	       0 allocs/op
BenchmarkNewLoggerConfig/with_an_instrumentation_version-20         	38392390	        30.77 ns/op	       0 B/op	       0 allocs/op
BenchmarkNewLoggerConfig/with_a_schema_url-20                       	39615074	        30.25 ns/op	       0 B/op	       0 allocs/op
BenchmarkNewLoggerConfig/with_instrumentation_attribute-20          	17108463	        82.51 ns/op	      64 B/op	       1 allocs/op
BenchmarkNewLoggerConfig/with_instrumentation_attribute_set-20      	37746534	        31.70 ns/op	       0 B/op	       0 allocs/op
```
2025-09-08 17:21:37 +02:00
Robert Pająk
dcf14aa937 trace,metric,log: WithInstrumentationAttributes options to merge attributes (#7300)
## What

Fix `WithInstrumentationAttributes` options in
`go.opentelemetry.io/otel/trace`, `go.opentelemetry.io/otel/metric`, and
`go.opentelemetry.io/otel/log` to properly merge attributes when passed
multiple times instead of replacing them. Attributes with duplicate keys
will use the last value passed.

## Why

Per
https://github.com/open-telemetry/opentelemetry-go/pull/7287#pullrequestreview-3181379062
and
https://github.com/open-telemetry/opentelemetry-go/pull/7287#issuecomment-3250085450

Not that this does not address
https://github.com/open-telemetry/opentelemetry-go/issues/7217. This is
left to a seperate PR to not scope creep this one. CC @axw

---------

Co-authored-by: Damien Mathieu <42@dmathieu.com>
2025-09-08 10:46:08 +02:00
Damien Mathieu
0174808b2b Fix schema urls (#7288)
The 1.0.0 schema now returns a 404 on opentelemetry.io.
2025-09-02 14:51:02 +02:00
Tyler Yahn
8ab8e421a5 Drop support for Go 1.23 (#7274) 2025-08-31 07:52:30 -07:00
Tyler Yahn
84e3f3ac8b Release v1.38.0 (#7271)
This release is the last to support [Go 1.23].
The next release will require at least [Go 1.24].

### Added

- Add native histogram exemplar support in
`go.opentelemetry.io/otel/exporters/prometheus`. (#6772)
- Add template attribute functions to the
`go.opentelmetry.io/otel/semconv/v1.34.0` package. (#6939)
  - `ContainerLabel`
  - `DBOperationParameter`
  - `DBSystemParameter`
  - `HTTPRequestHeader`
  - `HTTPResponseHeader`
  - `K8SCronJobAnnotation`
  - `K8SCronJobLabel`
  - `K8SDaemonSetAnnotation`
  - `K8SDaemonSetLabel`
  - `K8SDeploymentAnnotation`
  - `K8SDeploymentLabel`
  - `K8SJobAnnotation`
  - `K8SJobLabel`
  - `K8SNamespaceAnnotation`
  - `K8SNamespaceLabel`
  - `K8SNodeAnnotation`
  - `K8SNodeLabel`
  - `K8SPodAnnotation`
  - `K8SPodLabel`
  - `K8SReplicaSetAnnotation`
  - `K8SReplicaSetLabel`
  - `K8SStatefulSetAnnotation`
  - `K8SStatefulSetLabel`
  - `ProcessEnvironmentVariable`
  - `RPCConnectRPCRequestMetadata`
  - `RPCConnectRPCResponseMetadata`
  - `RPCGRPCRequestMetadata`
  - `RPCGRPCResponseMetadata`
- Add `ErrorType` attribute helper function to the
`go.opentelmetry.io/otel/semconv/v1.34.0` package. (#6962)
- Add `WithAllowKeyDuplication` in `go.opentelemetry.io/otel/sdk/log`
which can be used to disable deduplication for log records. (#6968)
- Add `WithCardinalityLimit` option to configure the cardinality limit
in `go.opentelemetry.io/otel/sdk/metric`. (#6996, #7065, #7081, #7164,
#7165, #7179)
- Add `Clone` method to `Record` in `go.opentelemetry.io/otel/log` that
returns a copy of the record with no shared state. (#7001)
- Add experimental self-observability span and batch span processor
metrics in `go.opentelemetry.io/otel/sdk/trace`. Check the
`go.opentelemetry.io/otel/sdk/trace/internal/x` package documentation
for more information. (#7027, #6393, #7209)
- The `go.opentelemetry.io/otel/semconv/v1.36.0` package. The package
contains semantic conventions from the `v1.36.0` version of the
OpenTelemetry Semantic Conventions. See the [migration
documentation](./semconv/v1.36.0/MIGRATION.md) for information on how to
upgrade from `go.opentelemetry.io/otel/semconv/v1.34.0.`(#7032, #7041)
- Add support for configuring Prometheus name translation using
`WithTranslationStrategy` option in
`go.opentelemetry.io/otel/exporters/prometheus`. The current default
translation strategy when UTF-8 mode is enabled is
`NoUTF8EscapingWithSuffixes`, but a future release will change the
default strategy to `UnderscoreEscapingWithSuffixes` for compliance with
the specification. (#7111)
- Add experimental self-observability log metrics in
`go.opentelemetry.io/otel/sdk/log`. Check the
`go.opentelemetry.io/otel/sdk/log/internal/x` package documentation for
more information. (#7121)
- Add experimental self-observability trace exporter metrics in
`go.opentelemetry.io/otel/exporters/stdout/stdouttrace`. Check the
`go.opentelemetry.io/otel/exporters/stdout/stdouttrace/internal/x`
package documentation for more information. (#7133)
- Support testing of [Go 1.25]. (#7187)
- The `go.opentelemetry.io/otel/semconv/v1.37.0` package. The package
contains semantic conventions from the `v1.37.0` version of the
OpenTelemetry Semantic Conventions. See the [migration
documentation](./semconv/v1.37.0/MIGRATION.md) for information on how to
upgrade from `go.opentelemetry.io/otel/semconv/v1.36.0.`(#7254)

### Changed

- Optimize `TraceIDFromHex` and `SpanIDFromHex` in
`go.opentelemetry.io/otel/sdk/trace`. (#6791)
- Change `AssertEqual` in `go.opentelemetry.io/otel/log/logtest` to
accept `TestingT` in order to support benchmarks and fuzz tests. (#6908)
- Change `DefaultExemplarReservoirProviderSelector` in
`go.opentelemetry.io/otel/sdk/metric` to use `runtime.GOMAXPROCS(0)`
instead of `runtime.NumCPU()` for the `FixedSizeReservoirProvider`
default size. (#7094)

### Fixed

- `SetBody` method of `Record` in `go.opentelemetry.io/otel/sdk/log` now
deduplicates key-value collections (`log.Value` of `log.KindMap` from
`go.opentelemetry.io/otel/log`). (#7002)
- Fix `go.opentelemetry.io/otel/exporters/prometheus` to not append a
suffix if it's already present in metric name. (#7088)
- Fix the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace`
self-observability component type and name. (#7195)
- Fix partial export count metric in
`go.opentelemetry.io/otel/exporters/stdout/stdouttrace`. (#7199)

### Deprecated

- Deprecate `WithoutUnits` and `WithoutCounterSuffixes` options,
preferring `WithTranslationStrategy` instead. (#7111)
- Deprecate support for `OTEL_GO_X_CARDINALITY_LIMIT` environment
variable in `go.opentelemetry.io/otel/sdk/metric`. Use
`WithCardinalityLimit` option instead. (#7166)
2025-08-29 12:42:52 -07:00
Tyler Yahn
5358fd737d Upgrade semconv dependencies to v1.37.0 (#7260)
Resolve https://github.com/open-telemetry/opentelemetry-go/issues/7255
2025-08-28 11:29:52 +02:00
renovate[bot]
25d02741f7 fix(deps): update module github.com/stretchr/testify to v1.11.1 (#7261)
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
|
[github.com/stretchr/testify](https://redirect.github.com/stretchr/testify)
| `v1.11.0` -> `v1.11.1` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fstretchr%2ftestify/v1.11.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fstretchr%2ftestify/v1.11.0/v1.11.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

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

---

### Release Notes

<details>
<summary>stretchr/testify (github.com/stretchr/testify)</summary>

###
[`v1.11.1`](https://redirect.github.com/stretchr/testify/releases/tag/v1.11.1)

[Compare
Source](https://redirect.github.com/stretchr/testify/compare/v1.11.0...v1.11.1)

This release fixes
[#&#8203;1785](https://redirect.github.com/stretchr/testify/issues/1785)
introduced in v1.11.0 where expected argument values implementing the
stringer interface (`String() string`) with a method which mutates their
value, when passed to mock.Mock.On (`m.On("Method",
<expected>).Return()`) or actual argument values passed to
mock.Mock.Called may no longer match one another where they previously
did match. The behaviour prior to v1.11.0 where the stringer is always
called is restored. Future testify releases may not call the stringer
method at all in this case.

#### What's Changed

- Backport
[#&#8203;1786](https://redirect.github.com/stretchr/testify/issues/1786)
to release/1.11: mock: revert to pre-v1.11.0 argument matching behavior
for mutating stringers by
[@&#8203;brackendawson](https://redirect.github.com/brackendawson) in
[#&#8203;1788](https://redirect.github.com/stretchr/testify/pull/1788)

**Full Changelog**:
<https://github.com/stretchr/testify/compare/v1.11.0...v1.11.1>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

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

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

🔕 **Ignore**: Close this PR and you won't be reminded about 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:eyJjcmVhdGVkSW5WZXIiOiI0MS44Mi43IiwidXBkYXRlZEluVmVyIjoiNDEuODIuNyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiU2tpcCBDaGFuZ2Vsb2ciLCJkZXBlbmRlbmNpZXMiXX0=-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: dmathieu <damien.mathieu@elastic.co>
2025-08-27 20:20:20 +02:00
Tyler Yahn
4b2bef6dd9 [chore] Upgrade semconv pkg use to v1.36.0 (#7237)
Fix #7236
2025-08-25 16:33:34 +02:00
renovate[bot]
713a1d9a2a fix(deps): update module github.com/stretchr/testify to v1.11.0 (#7242)
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
|
[github.com/stretchr/testify](https://redirect.github.com/stretchr/testify)
| `v1.10.0` -> `v1.11.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fstretchr%2ftestify/v1.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fstretchr%2ftestify/v1.10.0/v1.11.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

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

---

### Release Notes

<details>
<summary>stretchr/testify (github.com/stretchr/testify)</summary>

###
[`v1.11.0`](https://redirect.github.com/stretchr/testify/releases/tag/v1.11.0)

[Compare
Source](https://redirect.github.com/stretchr/testify/compare/v1.10.0...v1.11.0)

#### What's Changed

##### Functional Changes

v1.11.0 Includes a number of performance improvements.

- Call stack perf change for CallerInfo by
[@&#8203;mikeauclair](https://redirect.github.com/mikeauclair) in
[#&#8203;1614](https://redirect.github.com/stretchr/testify/pull/1614)
- Lazily render mock diff output on successful match by
[@&#8203;mikeauclair](https://redirect.github.com/mikeauclair) in
[#&#8203;1615](https://redirect.github.com/stretchr/testify/pull/1615)
- assert: check early in Eventually, EventuallyWithT, and Never by
[@&#8203;cszczepaniak](https://redirect.github.com/cszczepaniak) in
[#&#8203;1427](https://redirect.github.com/stretchr/testify/pull/1427)
- assert: add IsNotType by
[@&#8203;bartventer](https://redirect.github.com/bartventer) in
[#&#8203;1730](https://redirect.github.com/stretchr/testify/pull/1730)
- assert.JSONEq: shortcut if same strings by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[#&#8203;1754](https://redirect.github.com/stretchr/testify/pull/1754)
- assert.YAMLEq: shortcut if same strings by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[#&#8203;1755](https://redirect.github.com/stretchr/testify/pull/1755)
- assert: faster and simpler isEmpty using reflect.Value.IsZero by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[#&#8203;1761](https://redirect.github.com/stretchr/testify/pull/1761)
- suite: faster methods filtering (internal refactor) by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[#&#8203;1758](https://redirect.github.com/stretchr/testify/pull/1758)

##### Fixes

- assert.ErrorAs: log target type by
[@&#8203;craig65535](https://redirect.github.com/craig65535) in
[#&#8203;1345](https://redirect.github.com/stretchr/testify/pull/1345)
- Fix failure message formatting for Positive and Negative asserts in
[#&#8203;1062](https://redirect.github.com/stretchr/testify/pull/1062)
- Improve ErrorIs message when error is nil but an error was expected by
[@&#8203;tsioftas](https://redirect.github.com/tsioftas) in
[#&#8203;1681](https://redirect.github.com/stretchr/testify/pull/1681)
- fix Subset/NotSubset when calling with mixed input types by
[@&#8203;siliconbrain](https://redirect.github.com/siliconbrain) in
[#&#8203;1729](https://redirect.github.com/stretchr/testify/pull/1729)
- Improve ErrorAs failure message when error is nil by
[@&#8203;ccoVeille](https://redirect.github.com/ccoVeille) in
[#&#8203;1734](https://redirect.github.com/stretchr/testify/pull/1734)
- mock.AssertNumberOfCalls: improve error msg by
[@&#8203;3scalation](https://redirect.github.com/3scalation) in
[#&#8203;1743](https://redirect.github.com/stretchr/testify/pull/1743)

##### Documentation, Build & CI

- docs: Fix typo in README by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[#&#8203;1688](https://redirect.github.com/stretchr/testify/pull/1688)
- Replace deprecated io/ioutil with io and os by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[#&#8203;1684](https://redirect.github.com/stretchr/testify/pull/1684)
- Document consequences of calling t.FailNow() by
[@&#8203;greg0ire](https://redirect.github.com/greg0ire) in
[#&#8203;1710](https://redirect.github.com/stretchr/testify/pull/1710)
- chore: update docs for Unset
[#&#8203;1621](https://redirect.github.com/stretchr/testify/issues/1621)
by [@&#8203;techfg](https://redirect.github.com/techfg) in
[#&#8203;1709](https://redirect.github.com/stretchr/testify/pull/1709)
- README: apply gofmt to examples by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[#&#8203;1687](https://redirect.github.com/stretchr/testify/pull/1687)
- refactor: use %q and %T to simplify fmt.Sprintf by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[#&#8203;1674](https://redirect.github.com/stretchr/testify/pull/1674)
- Propose Christophe Colombier (ccoVeille) as approver by
[@&#8203;brackendawson](https://redirect.github.com/brackendawson) in
[#&#8203;1716](https://redirect.github.com/stretchr/testify/pull/1716)
- Update documentation for the Error function in assert or require
package by [@&#8203;architagr](https://redirect.github.com/architagr) in
[#&#8203;1675](https://redirect.github.com/stretchr/testify/pull/1675)
- assert: remove deprecated build constraints by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[#&#8203;1671](https://redirect.github.com/stretchr/testify/pull/1671)
- assert: apply gofumpt to internal test suite by
[@&#8203;ccoVeille](https://redirect.github.com/ccoVeille) in
[#&#8203;1739](https://redirect.github.com/stretchr/testify/pull/1739)
- CI: fix shebang in .ci.\*.sh scripts by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[#&#8203;1746](https://redirect.github.com/stretchr/testify/pull/1746)
- assert,require: enable parallel testing on (almost) all top tests by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[#&#8203;1747](https://redirect.github.com/stretchr/testify/pull/1747)
- suite.Passed: add one more status test report by
[@&#8203;Ararsa-Derese](https://redirect.github.com/Ararsa-Derese) in
[#&#8203;1706](https://redirect.github.com/stretchr/testify/pull/1706)
- Add Helper() method in internal mocks and assert.CollectT by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[#&#8203;1423](https://redirect.github.com/stretchr/testify/pull/1423)
- assert.Same/NotSame: improve usage of Sprintf by
[@&#8203;ccoVeille](https://redirect.github.com/ccoVeille) in
[#&#8203;1742](https://redirect.github.com/stretchr/testify/pull/1742)
- mock: enable parallel testing on internal testsuite by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[#&#8203;1756](https://redirect.github.com/stretchr/testify/pull/1756)
- suite: cleanup use of 'testing' internals at runtime by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[#&#8203;1751](https://redirect.github.com/stretchr/testify/pull/1751)
- assert: check test failure message for Empty and NotEmpty by
[@&#8203;ccoVeille](https://redirect.github.com/ccoVeille) in
[#&#8203;1745](https://redirect.github.com/stretchr/testify/pull/1745)
- deps: fix dependency cycle with objx (again) by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[#&#8203;1567](https://redirect.github.com/stretchr/testify/pull/1567)
- assert.Empty: comprehensive doc of "Empty"-ness rules by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[#&#8203;1753](https://redirect.github.com/stretchr/testify/pull/1753)
- doc: improve godoc of top level 'testify' package by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[#&#8203;1760](https://redirect.github.com/stretchr/testify/pull/1760)
- assert.ErrorAs: simplify retrieving the type name by
[@&#8203;ccoVeille](https://redirect.github.com/ccoVeille) in
[#&#8203;1740](https://redirect.github.com/stretchr/testify/pull/1740)
- assert.EqualValues: improve test coverage to 100% by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[#&#8203;1763](https://redirect.github.com/stretchr/testify/pull/1763)
- suite.Run: simplify running of Setup/TeardownSuite by
[@&#8203;renzoarreaza](https://redirect.github.com/renzoarreaza) in
[#&#8203;1769](https://redirect.github.com/stretchr/testify/pull/1769)
- assert.CallerInfo: micro optimization by using LastIndexByte by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[#&#8203;1767](https://redirect.github.com/stretchr/testify/pull/1767)
- assert.CallerInfo: micro cleanup by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[#&#8203;1768](https://redirect.github.com/stretchr/testify/pull/1768)
- assert: refactor Test*FileExists and Test*DirExists tests to enable
parallel testing by [@&#8203;dolmen](https://redirect.github.com/dolmen)
in
[#&#8203;1766](https://redirect.github.com/stretchr/testify/pull/1766)
- suite.Run: refactor handling of stats for improved readability by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[#&#8203;1764](https://redirect.github.com/stretchr/testify/pull/1764)
- tests: improve captureTestingT helper by
[@&#8203;ccoVeille](https://redirect.github.com/ccoVeille) in
[#&#8203;1741](https://redirect.github.com/stretchr/testify/pull/1741)
- build(deps): bump actions/checkout from 4 to 5 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;1778](https://redirect.github.com/stretchr/testify/pull/1778)

#### New Contributors

- [@&#8203;greg0ire](https://redirect.github.com/greg0ire) made their
first contribution in
[#&#8203;1710](https://redirect.github.com/stretchr/testify/pull/1710)
- [@&#8203;techfg](https://redirect.github.com/techfg) made their first
contribution in
[#&#8203;1709](https://redirect.github.com/stretchr/testify/pull/1709)
- [@&#8203;mikeauclair](https://redirect.github.com/mikeauclair) made
their first contribution in
[#&#8203;1614](https://redirect.github.com/stretchr/testify/pull/1614)
- [@&#8203;cszczepaniak](https://redirect.github.com/cszczepaniak) made
their first contribution in
[#&#8203;1427](https://redirect.github.com/stretchr/testify/pull/1427)
- [@&#8203;architagr](https://redirect.github.com/architagr) made their
first contribution in
[#&#8203;1675](https://redirect.github.com/stretchr/testify/pull/1675)
- [@&#8203;tsioftas](https://redirect.github.com/tsioftas) made their
first contribution in
[#&#8203;1681](https://redirect.github.com/stretchr/testify/pull/1681)
- [@&#8203;siliconbrain](https://redirect.github.com/siliconbrain) made
their first contribution in
[#&#8203;1729](https://redirect.github.com/stretchr/testify/pull/1729)
- [@&#8203;bartventer](https://redirect.github.com/bartventer) made
their first contribution in
[#&#8203;1730](https://redirect.github.com/stretchr/testify/pull/1730)
- [@&#8203;Ararsa-Derese](https://redirect.github.com/Ararsa-Derese)
made their first contribution in
[#&#8203;1706](https://redirect.github.com/stretchr/testify/pull/1706)
- [@&#8203;renzoarreaza](https://redirect.github.com/renzoarreaza) made
their first contribution in
[#&#8203;1769](https://redirect.github.com/stretchr/testify/pull/1769)
- [@&#8203;3scalation](https://redirect.github.com/3scalation) made
their first contribution in
[#&#8203;1743](https://redirect.github.com/stretchr/testify/pull/1743)

**Full Changelog**:
<https://github.com/stretchr/testify/compare/v1.10.0...v1.11.0>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

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

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

🔕 **Ignore**: Close this PR and you won't be reminded about 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:eyJjcmVhdGVkSW5WZXIiOiI0MS44Mi43IiwidXBkYXRlZEluVmVyIjoiNDEuODIuNyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiU2tpcCBDaGFuZ2Vsb2ciLCJkZXBlbmRlbmNpZXMiXX0=-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: flc1125 <four_leaf_clover@foxmail.com>
2025-08-25 14:38:44 +02: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
Mikhail Mazurskiy
5e1c62a2d5 Modernize (#7089)
Use
https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize
to update code to new style.

---------

Co-authored-by: Flc゛ <four_leaf_clover@foxmail.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
2025-07-29 10:19:11 +02:00
Robert Pająk
69e81088ad Release 1.37.0/0.59.0/0.13.0 (#6925)
### Added

- The `go.opentelemetry.io/otel/semconv/v1.33.0` package.
The package contains semantic conventions from the `v1.33.0` version of
the OpenTelemetry Semantic Conventions.
See the [migration documentation](./semconv/v1.33.0/MIGRATION.md) for
information on how to upgrade from
`go.opentelemetry.io/otel/semconv/v1.32.0.`(#6799)
- The `go.opentelemetry.io/otel/semconv/v1.34.0` package.
The package contains semantic conventions from the `v1.34.0` version of
the OpenTelemetry Semantic Conventions. (#6812)
- Add metric's schema URL as `otel_scope_schema_url` label in
`go.opentelemetry.io/otel/exporters/prometheus`. (#5947)
- Add metric's scope attributes as `otel_scope_[attribute]` labels in
`go.opentelemetry.io/otel/exporters/prometheus`. (#5947)
- Add `EventName` to `EnabledParameters` in
`go.opentelemetry.io/otel/log`. (#6825)
- Add `EventName` to `EnabledParameters` in
`go.opentelemetry.io/otel/sdk/log`. (#6825)
- Changed handling of `go.opentelemetry.io/otel/exporters/prometheus`
metric renaming to add unit suffixes when it doesn't match one of the
pre-defined values in the unit suffix map. (#6839)

### Changed

- The semantic conventions have been upgraded from `v1.26.0` to
`v1.34.0` in `go.opentelemetry.io/otel/bridge/opentracing`. (#6827)
- The semantic conventions have been upgraded from `v1.26.0` to
`v1.34.0` in `go.opentelemetry.io/otel/exporters/zipkin`. (#6829)
- The semantic conventions have been upgraded from `v1.26.0` to
`v1.34.0` in `go.opentelemetry.io/otel/metric`. (#6832)
- The semantic conventions have been upgraded from `v1.26.0` to
`v1.34.0` in `go.opentelemetry.io/otel/sdk/resource`. (#6834)
- The semantic conventions have been upgraded from `v1.26.0` to
`v1.34.0` in `go.opentelemetry.io/otel/sdk/trace`. (#6835)
- The semantic conventions have been upgraded from `v1.26.0` to
`v1.34.0` in `go.opentelemetry.io/otel/trace`. (#6836)
- `Record.Resource` now returns `*resource.Resource` instead of
`resource.Resource` in `go.opentelemetry.io/otel/sdk/log`. (#6864)
- Retry now shows error cause for context timeout in
`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`,
`go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`,
`go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`,
`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`,
`go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`,
`go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#6898)

### Fixed

- Stop stripping trailing slashes from configured endpoint URL in
`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`.
(#6710)
- Stop stripping trailing slashes from configured endpoint URL in
`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`.
(#6710)
- Stop stripping trailing slashes from configured endpoint URL in
`go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`.
(#6710)
- Stop stripping trailing slashes from configured endpoint URL in
`go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`.
(#6710)
- Validate exponential histogram scale range for Prometheus
compatibility in `go.opentelemetry.io/otel/exporters/prometheus`.
(#6822)
- Context cancellation during metric pipeline produce does not corrupt
data in `go.opentelemetry.io/otel/sdk/metric`. (#6914)

### Removed

- `go.opentelemetry.io/otel/exporters/prometheus` no longer exports
`otel_scope_info` metric. (#6770)
2025-06-25 08:41:12 +02:00
Tyler Yahn
91bf875c49 Upgrade semconv to 1.34.0 in metric (#6832) 2025-05-28 10:49:03 -07:00
renovate[bot]
261ed77ee2 fix(deps): update module github.com/go-logr/logr to v1.4.3 (#6842) 2025-05-28 18:02:07 +02:00
Damien Mathieu
a85ae98dce Release v1.36.0/v0.58.0/v0.12.0 (#6793)
# Overview

Closes https://github.com/open-telemetry/opentelemetry-go/issues/6786

### Added

- Add exponential histogram support in
`go.opentelemetry.io/otel/exporters/prometheus`. (#6421)
- The `go.opentelemetry.io/otel/semconv/v1.31.0` package.
The package contains semantic conventions from the `v1.31.0` version of
the OpenTelemetry Semantic Conventions.
See the [migration documentation](./semconv/v1.31.0/MIGRATION.md) for
information on how to upgrade from
`go.opentelemetry.io/otel/semconv/v1.30.0`. (#6479)
- Add `Recording`, `Scope`, and `Record` types in
`go.opentelemetry.io/otel/log/logtest`. (#6507)
- Add `WithHTTPClient` option to configure the `http.Client` used by
`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`.
(#6751)
- Add `WithHTTPClient` option to configure the `http.Client` used by
`go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`.
(#6752)
- Add `WithHTTPClient` option to configure the `http.Client` used by
`go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#6688)
- Add `ValuesGetter` in `go.opentelemetry.io/otel/propagation`, a
`TextMapCarrier` that supports retrieving multiple values for a single
key. (#5973)
- Add `Values` method to `HeaderCarrier` to implement the new
`ValuesGetter` interface in `go.opentelemetry.io/otel/propagation`.
(#5973)
- Update `Baggage` in `go.opentelemetry.io/otel/propagation` to retrieve
multiple values for a key when the carrier implements `ValuesGetter`.
(#5973)
- Add `AssertEqual` function in `go.opentelemetry.io/otel/log/logtest`.
(#6662)
- The `go.opentelemetry.io/otel/semconv/v1.32.0` package.
The package contains semantic conventions from the `v1.32.0` version of
the OpenTelemetry Semantic Conventions.
See the [migration documentation](./semconv/v1.32.0/MIGRATION.md) for
information on how to upgrade from
`go.opentelemetry.io/otel/semconv/v1.31.0`(#6782)
- Add `Transform` option in `go.opentelemetry.io/otel/log/logtest`.
(#6794)
- Add `Desc` option in `go.opentelemetry.io/otel/log/logtest`. (#6796)

### Removed

- Drop support for [Go 1.22]. (#6381, #6418)
- Remove `Resource` field from `EnabledParameters` in
`go.opentelemetry.io/otel/sdk/log`. (#6494)
- Remove `RecordFactory` type from
`go.opentelemetry.io/otel/log/logtest`. (#6492)
- Remove `ScopeRecords`, `EmittedRecord`, and `RecordFactory` types from
`go.opentelemetry.io/otel/log/logtest`. (#6507)
- Remove `AssertRecordEqual` function in
`go.opentelemetry.io/otel/log/logtest`, use `AssertEqual` instead.
(#6662)

### Changed

- ⚠️ Update `github.com/prometheus/client_golang` to `v1.21.1`, which
changes the `NameValidationScheme` to `UTF8Validation`.
This allows metrics names to keep original delimiters (e.g. `.`), rather
than replacing with underscores.
This can be reverted by setting
`github.com/prometheus/common/model.NameValidationScheme` to
`LegacyValidation` in `github.com/prometheus/common/model`. (#6433)
- Initialize map with `len(keys)` in `NewAllowKeysFilter` and
`NewDenyKeysFilter` to avoid unnecessary allocations in
`go.opentelemetry.io/otel/attribute`. (#6455)
- `go.opentelemetry.io/otel/log/logtest` is now a separate Go module.
(#6465)
- `go.opentelemetry.io/otel/sdk/log/logtest` is now a separate Go
module. (#6466)
- `Recorder` in `go.opentelemetry.io/otel/log/logtest` no longer
separately stores records emitted by loggers with the same
instrumentation scope. (#6507)
- Improve performance of `BatchProcessor` in
`go.opentelemetry.io/otel/sdk/log` by not exporting when exporter cannot
accept more. (#6569, #6641)

### Deprecated

- Deprecate support for `model.LegacyValidation` for
`go.opentelemetry.io/otel/exporters/prometheus`. (#6449)

### Fixes

- Stop percent encoding header environment variables in
`go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc` and
`go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#6392)
- Ensure the `noopSpan.tracerProvider` method is not inlined in
`go.opentelemetry.io/otel/trace` so the `go.opentelemetry.io/auto`
instrumentation can instrument non-recording spans. (#6456)
- Use a `sync.Pool` instead of allocating `metricdata.ResourceMetrics`
in `go.opentelemetry.io/otel/exporters/prometheus`. (#6472)

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
2025-05-21 09:35:39 +02:00
Sean Liao
a571c52b0a all: replace math/rand with math/rand/v2 (#6732)
Update to new stdlib apis.

The new Float64 is uniform, which resolves a long comment.


https://cs.opensource.google/go/go/+/refs/tags/go1.24.2:src/math/rand/v2/rand.go;l=209

> // There are exactly 1<<53 float64s in [0,1). Use Intn(1<<53) /
(1<<53).
	return float64(r.Uint64()<<11>>11) / (1 << 53)

```
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/sdk/trace
cpu: 12th Gen Intel(R) Core(TM) i7-1260P
                                 │   old.txt    │               new.txt                │
                                 │    sec/op    │    sec/op     vs base                │
TraceStart/with_a_simple_span-16   387.1n ±  5%   306.8n ± 15%  -20.73% (p=0.000 n=10)
TraceStart/with_several_links-16   542.2n ±  5%   501.0n ±  2%   -7.61% (p=0.000 n=10)
TraceStart/with_attributes-16      521.4n ± 14%   571.6n ±  6%   +9.64% (p=0.009 n=10)
geomean                            478.3n         444.6n         -7.05%

                                 │  old.txt   │               new.txt               │
                                 │    B/op    │    B/op     vs base                 │
TraceStart/with_a_simple_span-16   528.0 ± 0%   528.0 ± 0%       ~ (p=1.000 n=10) ¹
TraceStart/with_several_links-16   704.0 ± 0%   704.0 ± 0%       ~ (p=1.000 n=10) ¹
TraceStart/with_attributes-16      784.0 ± 0%   784.0 ± 0%       ~ (p=1.000 n=10) ¹
geomean                            663.0        663.0       +0.00%
¹ all samples are equal

                                 │  old.txt   │               new.txt               │
                                 │ allocs/op  │ allocs/op   vs base                 │
TraceStart/with_a_simple_span-16   2.000 ± 0%   2.000 ± 0%       ~ (p=1.000 n=10) ¹
TraceStart/with_several_links-16   3.000 ± 0%   3.000 ± 0%       ~ (p=1.000 n=10) ¹
TraceStart/with_attributes-16      4.000 ± 0%   4.000 ± 0%       ~ (p=1.000 n=10) ¹
geomean                            2.884        2.884       +0.00%
¹ all samples are equal
```

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
2025-05-15 09:21:49 +02: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
Sam Xie
09ff8b107a Drop support for Go 1.22 (#6381) 2025-03-05 22:23:10 -08:00
Sam Xie
5ba5e7a449 Release v1.35.0/v0.57.0/v0.11.0 (#6407)
## Overview

This release is the last to support [Go 1.22].
The next release will require at least [Go 1.23].

### Added

- Add `ValueFromAttribute` and `KeyValueFromAttribute` in
`go.opentelemetry.io/otel/log`. (#6180)
- Add `EventName` and `SetEventName` to `Record` in
`go.opentelemetry.io/otel/log`. (#6187)
- Add `EventName` to `RecordFactory` in
`go.opentelemetry.io/otel/log/logtest`. (#6187)
- `AssertRecordEqual` in `go.opentelemetry.io/otel/log/logtest` checks
`Record.EventName`. (#6187)
- Add `EventName` and `SetEventName` to `Record` in
`go.opentelemetry.io/otel/sdk/log`. (#6193)
- Add `EventName` to `RecordFactory` in
`go.opentelemetry.io/otel/sdk/log/logtest`. (#6193)
- Emit `Record.EventName` field in
`go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#6211)
- Emit `Record.EventName` field in
`go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#6211)
- Emit `Record.EventName` field in
`go.opentelemetry.io/otel/exporters/stdout/stdoutlog` (#6210)
- The `go.opentelemetry.io/otel/semconv/v1.28.0` package.
The package contains semantic conventions from the `v1.28.0` version of
the OpenTelemetry Semantic Conventions.
See the [migration documentation](./semconv/v1.28.0/MIGRATION.md) for
information on how to upgrade from
`go.opentelemetry.io/otel/semconv/v1.27.0`(#6236)
- The `go.opentelemetry.io/otel/semconv/v1.30.0` package.
The package contains semantic conventions from the `v1.30.0` version of
the OpenTelemetry Semantic Conventions.
See the [migration documentation](./semconv/v1.30.0/MIGRATION.md) for
information on how to upgrade from
`go.opentelemetry.io/otel/semconv/v1.28.0`(#6240)
- Document the pitfalls of using `Resource` as a comparable type.
`Resource.Equal` and `Resource.Equivalent` should be used instead.
(#6272)
- Support [Go 1.24]. (#6304)
- Add `FilterProcessor` and `EnabledParameters` in
`go.opentelemetry.io/otel/sdk/log`.
It replaces
`go.opentelemetry.io/otel/sdk/log/internal/x.FilterProcessor`.
Compared to previous version it additionally gives the possibility to
filter by resource and instrumentation scope. (#6317)

### Changed

- Update `github.com/prometheus/common` to v0.62.0., which changes the
`NameValidationScheme` to `NoEscaping`. This allows metrics names to
keep original delimiters (e.g. `.`), rather than replacing with
underscores. This is controlled by the `Content-Type` header, or can be
reverted by setting `NameValidationScheme` to `LegacyValidation` in
`github.com/prometheus/common/model`. (#6198)

### Fixes

- Eliminate goroutine leak for the processor returned by
`NewSimpleSpanProcessor` when `Shutdown` is called and the passed `ctx`
is canceled and `SpanExporter.Shutdown` has not returned. (#6368)
- Eliminate goroutine leak for the processor returned by
`NewBatchSpanProcessor` when `ForceFlush` is called and the passed `ctx`
is canceled and `SpanExporter.Export` has not returned. (#6369)

[Go 1.23]: https://go.dev/doc/go1.23
[Go 1.22]: https://go.dev/doc/go1.22

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2025-03-05 10:33:59 -08:00
renovate[bot]
cbb4e2499e fix(deps): update module github.com/google/go-cmp to v0.7.0 (#6359)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/google/go-cmp](https://redirect.github.com/google/go-cmp)
| `v0.6.0` -> `v0.7.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgoogle%2fgo-cmp/v0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgoogle%2fgo-cmp/v0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgoogle%2fgo-cmp/v0.6.0/v0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgoogle%2fgo-cmp/v0.6.0/v0.7.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>google/go-cmp (github.com/google/go-cmp)</summary>

###
[`v0.7.0`](https://redirect.github.com/google/go-cmp/releases/tag/v0.7.0)

[Compare
Source](https://redirect.github.com/google/go-cmp/compare/v0.6.0...v0.7.0)

New API:

- ([#&#8203;367](https://redirect.github.com/google/go-cmp/issues/367))
Support compare functions with SortSlices and SortMaps

Panic messaging:

- ([#&#8203;370](https://redirect.github.com/google/go-cmp/issues/370))
Detect proto.Message types when failing to export a field

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

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

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

🔕 **Ignore**: Close this PR and you won't be reminded about 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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com>
2025-02-23 08:21:15 -08:00
Tyler Yahn
edc378fa8d Release v1.34.0/v0.56.0/v0.10.0 (#6174)
## Overview

### Changed

- Remove the notices from `Logger` to make the whole Logs API
user-facing in `go.opentelemetry.io/otel/log`. (#6167)

### Fixed

- Relax minimum Go version to 1.22.0 in various modules. (#6073)
- The `Type` name logged for the
`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` client
is corrected from `otlphttpgrpc` to `otlptracegrpc`. (#6143)
- The `Type` name logged for the
`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlphttpgrpc` client
is corrected from `otlphttphttp` to `otlptracehttp`. (#6143)
2025-01-17 08:21:54 -08:00
Tyler Yahn
8c38f80ec3 Release v1.33.0 (#6035)
### Added

- Add `Reset` method to `SpanRecorder` in
`go.opentelemetry.io/otel/sdk/trace/tracetest`. (#5994)
- Add `EnabledInstrument` interface in
`go.opentelemetry.io/otel/sdk/metric/internal/x`. This is an
experimental interface that is implemented by synchronous instruments
provided by `go.opentelemetry.io/otel/sdk/metric`. Users can use it to
avoid performing computationally expensive operations when recording
measurements. It does not fall within the scope of the OpenTelemetry Go
versioning and stability [policy](./VERSIONING.md) and it may be changed
in backwards incompatible ways or removed in feature releases. (#6016)

### Changed

- The default global API now supports full auto-instrumentation from the
`go.opentelemetry.io/auto` package. See that package for more
information. (#5920)
- Propagate non-retryable error messages to client in
`go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#5929)
- Propagate non-retryable error messages to client in
`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`.
(#5929)
- Propagate non-retryable error messages to client in
`go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`.
(#5929)
- Performance improvements for attribute value `AsStringSlice`,
`AsFloat64Slice`, `AsInt64Slice`, `AsBoolSlice`. (#6011)
- Change `EnabledParameters` to have a `Severity` field instead of a
getter and setter in `go.opentelemetry.io/otel/log`. (#6009)

### Fixed

- Fix inconsistent request body closing in
`go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#5954)
- Fix inconsistent request body closing in
`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`.
(#5954)
- Fix inconsistent request body closing in
`go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`.
(#5954)
- Fix invalid exemplar keys in
`go.opentelemetry.io/otel/exporters/prometheus`. (#5995)
- Fix attribute value truncation in
`go.opentelemetry.io/otel/sdk/trace`. (#5997)
- Fix attribute value truncation in `go.opentelemetry.io/otel/sdk/log`.
(#6032)
2024-12-12 09:54:13 -08:00
renovate[bot]
b4a91a210c chore(deps): update module go.opentelemetry.io/auto/sdk to v1.1.0 (#6025)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[go.opentelemetry.io/auto/sdk](https://redirect.github.com/open-telemetry/opentelemetry-go-instrumentation)
| `v1.0.0` -> `v1.1.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fauto%2fsdk/v1.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fauto%2fsdk/v1.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fauto%2fsdk/v1.0.0/v1.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fauto%2fsdk/v1.0.0/v1.1.0?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 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:eyJjcmVhdGVkSW5WZXIiOiIzOS40Mi40IiwidXBkYXRlZEluVmVyIjoiMzkuNDIuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiU2tpcCBDaGFuZ2Vsb2ciLCJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-05 12:57:07 -08:00
renovate[bot]
8b510c36ed fix(deps): update module github.com/stretchr/testify to v1.10.0 (#6000)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/stretchr/testify](https://redirect.github.com/stretchr/testify)
| `v1.9.0` -> `v1.10.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fstretchr%2ftestify/v1.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fstretchr%2ftestify/v1.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fstretchr%2ftestify/v1.9.0/v1.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fstretchr%2ftestify/v1.9.0/v1.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>stretchr/testify (github.com/stretchr/testify)</summary>

###
[`v1.10.0`](https://redirect.github.com/stretchr/testify/releases/tag/v1.10.0)

[Compare
Source](https://redirect.github.com/stretchr/testify/compare/v1.9.0...v1.10.0)

#### What's Changed

##### Functional Changes

- Add PanicAssertionFunc by
[@&#8203;fahimbagar](https://redirect.github.com/fahimbagar) in
[https://github.com/stretchr/testify/pull/1337](https://redirect.github.com/stretchr/testify/pull/1337)
- assert: deprecate CompareType by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[https://github.com/stretchr/testify/pull/1566](https://redirect.github.com/stretchr/testify/pull/1566)
- assert: make YAML dependency pluggable via build tags by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[https://github.com/stretchr/testify/pull/1579](https://redirect.github.com/stretchr/testify/pull/1579)
- assert: new assertion NotElementsMatch by
[@&#8203;hendrywiranto](https://redirect.github.com/hendrywiranto) in
[https://github.com/stretchr/testify/pull/1600](https://redirect.github.com/stretchr/testify/pull/1600)
- mock: in order mock calls by
[@&#8203;ReyOrtiz](https://redirect.github.com/ReyOrtiz) in
[https://github.com/stretchr/testify/pull/1637](https://redirect.github.com/stretchr/testify/pull/1637)
- Add assertion for NotErrorAs by
[@&#8203;palsivertsen](https://redirect.github.com/palsivertsen) in
[https://github.com/stretchr/testify/pull/1129](https://redirect.github.com/stretchr/testify/pull/1129)
- Record Return Arguments of a Call by
[@&#8203;jayd3e](https://redirect.github.com/jayd3e) in
[https://github.com/stretchr/testify/pull/1636](https://redirect.github.com/stretchr/testify/pull/1636)
- assert.EqualExportedValues: accepts everything by
[@&#8203;redachl](https://redirect.github.com/redachl) in
[https://github.com/stretchr/testify/pull/1586](https://redirect.github.com/stretchr/testify/pull/1586)

##### Fixes

- assert: make tHelper a type alias by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[https://github.com/stretchr/testify/pull/1562](https://redirect.github.com/stretchr/testify/pull/1562)
- Do not get argument again unnecessarily in Arguments.Error() by
[@&#8203;TomWright](https://redirect.github.com/TomWright) in
[https://github.com/stretchr/testify/pull/820](https://redirect.github.com/stretchr/testify/pull/820)
- Fix time.Time compare by
[@&#8203;myxo](https://redirect.github.com/myxo) in
[https://github.com/stretchr/testify/pull/1582](https://redirect.github.com/stretchr/testify/pull/1582)
- assert.Regexp: handle \[]byte array properly by
[@&#8203;kevinburkesegment](https://redirect.github.com/kevinburkesegment)
in
[https://github.com/stretchr/testify/pull/1587](https://redirect.github.com/stretchr/testify/pull/1587)
- assert: collect.FailNow() should not panic by
[@&#8203;marshall-lee](https://redirect.github.com/marshall-lee) in
[https://github.com/stretchr/testify/pull/1481](https://redirect.github.com/stretchr/testify/pull/1481)
- mock: simplify implementation of FunctionalOptions by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[https://github.com/stretchr/testify/pull/1571](https://redirect.github.com/stretchr/testify/pull/1571)
- mock: caller information for unexpected method call by
[@&#8203;spirin](https://redirect.github.com/spirin) in
[https://github.com/stretchr/testify/pull/1644](https://redirect.github.com/stretchr/testify/pull/1644)
- suite: fix test failures by
[@&#8203;stevenh](https://redirect.github.com/stevenh) in
[https://github.com/stretchr/testify/pull/1421](https://redirect.github.com/stretchr/testify/pull/1421)
- Fix issue
[#&#8203;1662](https://redirect.github.com/stretchr/testify/issues/1662)
(comparing infs should fail) by
[@&#8203;ybrustin](https://redirect.github.com/ybrustin) in
[https://github.com/stretchr/testify/pull/1663](https://redirect.github.com/stretchr/testify/pull/1663)
- NotSame should fail if args are not pointers
[#&#8203;1661](https://redirect.github.com/stretchr/testify/issues/1661)
by [@&#8203;sikehish](https://redirect.github.com/sikehish) in
[https://github.com/stretchr/testify/pull/1664](https://redirect.github.com/stretchr/testify/pull/1664)
- Increase timeouts in Test_Mock_Called_blocks to reduce flakiness in CI
by [@&#8203;sikehish](https://redirect.github.com/sikehish) in
[https://github.com/stretchr/testify/pull/1667](https://redirect.github.com/stretchr/testify/pull/1667)
- fix: compare functional option names for indirect calls by
[@&#8203;arjun-1](https://redirect.github.com/arjun-1) in
[https://github.com/stretchr/testify/pull/1626](https://redirect.github.com/stretchr/testify/pull/1626)

##### Documantation, Build & CI

- .gitignore: ignore "go test -c" binaries by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[https://github.com/stretchr/testify/pull/1565](https://redirect.github.com/stretchr/testify/pull/1565)
- mock: improve doc by
[@&#8203;dolmen](https://redirect.github.com/dolmen) in
[https://github.com/stretchr/testify/pull/1570](https://redirect.github.com/stretchr/testify/pull/1570)
- mock: fix FunctionalOptions docs by
[@&#8203;snirye](https://redirect.github.com/snirye) in
[https://github.com/stretchr/testify/pull/1433](https://redirect.github.com/stretchr/testify/pull/1433)
- README: link out to the excellent testifylint by
[@&#8203;brackendawson](https://redirect.github.com/brackendawson) in
[https://github.com/stretchr/testify/pull/1568](https://redirect.github.com/stretchr/testify/pull/1568)
- assert: fix typo in comment by
[@&#8203;JohnEndson](https://redirect.github.com/JohnEndson) in
[https://github.com/stretchr/testify/pull/1580](https://redirect.github.com/stretchr/testify/pull/1580)
- Correct the EventuallyWithT and EventuallyWithTf example by
[@&#8203;JonCrowther](https://redirect.github.com/JonCrowther) in
[https://github.com/stretchr/testify/pull/1588](https://redirect.github.com/stretchr/testify/pull/1588)
- CI: bump softprops/action-gh-release from 1 to 2 by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/stretchr/testify/pull/1575](https://redirect.github.com/stretchr/testify/pull/1575)
- mock: document more alternatives to deprecated AnythingOfTypeArgument
by [@&#8203;dolmen](https://redirect.github.com/dolmen) in
[https://github.com/stretchr/testify/pull/1569](https://redirect.github.com/stretchr/testify/pull/1569)
- assert: Correctly document EqualValues behavior by
[@&#8203;brackendawson](https://redirect.github.com/brackendawson) in
[https://github.com/stretchr/testify/pull/1593](https://redirect.github.com/stretchr/testify/pull/1593)
- fix: grammar in godoc by
[@&#8203;miparnisari](https://redirect.github.com/miparnisari) in
[https://github.com/stretchr/testify/pull/1607](https://redirect.github.com/stretchr/testify/pull/1607)
- .github/workflows: Run tests for Go 1.22 by
[@&#8203;HaraldNordgren](https://redirect.github.com/HaraldNordgren) in
[https://github.com/stretchr/testify/pull/1629](https://redirect.github.com/stretchr/testify/pull/1629)
- Document suite's lack of support for t.Parallel by
[@&#8203;brackendawson](https://redirect.github.com/brackendawson) in
[https://github.com/stretchr/testify/pull/1645](https://redirect.github.com/stretchr/testify/pull/1645)
- assert: fix typos in comments by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[https://github.com/stretchr/testify/pull/1650](https://redirect.github.com/stretchr/testify/pull/1650)
- mock: fix doc comment for NotBefore by
[@&#8203;alexandear](https://redirect.github.com/alexandear) in
[https://github.com/stretchr/testify/pull/1651](https://redirect.github.com/stretchr/testify/pull/1651)
- Generate better comments for require package by
[@&#8203;Neokil](https://redirect.github.com/Neokil) in
[https://github.com/stretchr/testify/pull/1610](https://redirect.github.com/stretchr/testify/pull/1610)
- README: replace Testify V2 notice with
[@&#8203;dolmen](https://redirect.github.com/dolmen)'s V2 manifesto by
[@&#8203;hendrywiranto](https://redirect.github.com/hendrywiranto) in
[https://github.com/stretchr/testify/pull/1518](https://redirect.github.com/stretchr/testify/pull/1518)

#### New Contributors

- [@&#8203;fahimbagar](https://redirect.github.com/fahimbagar) made
their first contribution in
[https://github.com/stretchr/testify/pull/1337](https://redirect.github.com/stretchr/testify/pull/1337)
- [@&#8203;TomWright](https://redirect.github.com/TomWright) made their
first contribution in
[https://github.com/stretchr/testify/pull/820](https://redirect.github.com/stretchr/testify/pull/820)
- [@&#8203;snirye](https://redirect.github.com/snirye) made their first
contribution in
[https://github.com/stretchr/testify/pull/1433](https://redirect.github.com/stretchr/testify/pull/1433)
- [@&#8203;myxo](https://redirect.github.com/myxo) made their first
contribution in
[https://github.com/stretchr/testify/pull/1582](https://redirect.github.com/stretchr/testify/pull/1582)
- [@&#8203;JohnEndson](https://redirect.github.com/JohnEndson) made
their first contribution in
[https://github.com/stretchr/testify/pull/1580](https://redirect.github.com/stretchr/testify/pull/1580)
- [@&#8203;JonCrowther](https://redirect.github.com/JonCrowther) made
their first contribution in
[https://github.com/stretchr/testify/pull/1588](https://redirect.github.com/stretchr/testify/pull/1588)
- [@&#8203;miparnisari](https://redirect.github.com/miparnisari) made
their first contribution in
[https://github.com/stretchr/testify/pull/1607](https://redirect.github.com/stretchr/testify/pull/1607)
- [@&#8203;marshall-lee](https://redirect.github.com/marshall-lee) made
their first contribution in
[https://github.com/stretchr/testify/pull/1481](https://redirect.github.com/stretchr/testify/pull/1481)
- [@&#8203;spirin](https://redirect.github.com/spirin) made their first
contribution in
[https://github.com/stretchr/testify/pull/1644](https://redirect.github.com/stretchr/testify/pull/1644)
- [@&#8203;ReyOrtiz](https://redirect.github.com/ReyOrtiz) made their
first contribution in
[https://github.com/stretchr/testify/pull/1637](https://redirect.github.com/stretchr/testify/pull/1637)
- [@&#8203;stevenh](https://redirect.github.com/stevenh) made their
first contribution in
[https://github.com/stretchr/testify/pull/1421](https://redirect.github.com/stretchr/testify/pull/1421)
- [@&#8203;jayd3e](https://redirect.github.com/jayd3e) made their first
contribution in
[https://github.com/stretchr/testify/pull/1636](https://redirect.github.com/stretchr/testify/pull/1636)
- [@&#8203;Neokil](https://redirect.github.com/Neokil) made their first
contribution in
[https://github.com/stretchr/testify/pull/1610](https://redirect.github.com/stretchr/testify/pull/1610)
- [@&#8203;redachl](https://redirect.github.com/redachl) made their
first contribution in
[https://github.com/stretchr/testify/pull/1586](https://redirect.github.com/stretchr/testify/pull/1586)
- [@&#8203;ybrustin](https://redirect.github.com/ybrustin) made their
first contribution in
[https://github.com/stretchr/testify/pull/1663](https://redirect.github.com/stretchr/testify/pull/1663)
- [@&#8203;sikehish](https://redirect.github.com/sikehish) made their
first contribution in
[https://github.com/stretchr/testify/pull/1664](https://redirect.github.com/stretchr/testify/pull/1664)
- [@&#8203;arjun-1](https://redirect.github.com/arjun-1) made their
first contribution in
[https://github.com/stretchr/testify/pull/1626](https://redirect.github.com/stretchr/testify/pull/1626)

**Full Changelog**:
https://github.com/stretchr/testify/compare/v1.9.0...v1.10.0

</details>

---

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

---

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

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <codingalias@gmail.com>
2024-11-23 07:49:00 -08:00
Tyler Yahn
99c3c661e0 Use auto-instrumentation SDK in global tracing (#5920)
When the auto-instrumentation attaches to a process using the global
TracerProvider, and there has not been a delegate set, create a span
from the go.opentelemetry.io/auto/sdk package so the OTel Go
auto-instrumentation can instrument the application by default.

Resolve #5702

### Benchmarks

```terminal
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/internal/global
cpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
                    │   old.txt    │            new.txt             │
                    │    sec/op    │    sec/op     vs base          │
StartEndSpanNoSDK-8   244.2n ± 21%   250.2n ± 23%  ~ (p=0.739 n=10)
```
2024-11-21 10:54:58 -08:00
Damien Mathieu
2c15a77942 Fix lint issues for golangci-lint 1.62.0 (#5967)
This fixes the new lint issues brough by the golangci-lint upgrade in
https://github.com/open-telemetry/opentelemetry-go/pull/5966
2024-11-13 08:58:59 +01:00
Robert Pająk
7cfbd86a60 Release v1.32.0/v0.54.0/v0.8.0/v0.0.11 (#5960)
### Added

- Add `go.opentelemetry.io/otel/sdk/metric/exemplar.AlwaysOffFilter`,
which can be used to disable exemplar recording. (#5850)
- Add `go.opentelemetry.io/otel/sdk/metric.WithExemplarFilter`, which
can be used to configure the exemplar filter used by the metrics SDK.
(#5850)
- Add `ExemplarReservoirProviderSelector` and
`DefaultExemplarReservoirProviderSelector` to
`go.opentelemetry.io/otel/sdk/metric`, which defines the exemplar
reservoir to use based on the aggregation of the metric. (#5861)
- Add `ExemplarReservoirProviderSelector` to
`go.opentelemetry.io/otel/sdk/metric.Stream` to allow using views to
configure the exemplar reservoir to use for a metric. (#5861)
- Add `ReservoirProvider`, `HistogramReservoirProvider` and
`FixedSizeReservoirProvider` to
`go.opentelemetry.io/otel/sdk/metric/exemplar` to make it convenient to
use providers of Reservoirs. (#5861)
- The `go.opentelemetry.io/otel/semconv/v1.27.0` package.
The package contains semantic conventions from the `v1.27.0` version of
the OpenTelemetry Semantic Conventions. (#5894)
- Add `Attributes attribute.Set` field to `Scope` in
`go.opentelemetry.io/otel/sdk/instrumentation`. (#5903)
- Add `Attributes attribute.Set` field to `ScopeRecords` in
`go.opentelemetry.io/otel/log/logtest`. (#5927)
- `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` adds
instrumentation scope attributes. (#5934)
- `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` adds
instrumentation scope attributes. (#5934)
- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`
adds instrumentation scope attributes. (#5935)
- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`
adds instrumentation scope attributes. (#5935)
- `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc` adds
instrumentation scope attributes. (#5933)
- `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` adds
instrumentation scope attributes. (#5933)
- `go.opentelemetry.io/otel/exporters/prometheus` adds instrumentation
scope attributes in `otel_scope_info` metric as labels. (#5932)

### Changed

- Support scope attributes and make them as identifying for `Tracer` in
`go.opentelemetry.io/otel` and `go.opentelemetry.io/otel/sdk/trace`.
(#5924)
- Support scope attributes and make them as identifying for `Meter` in
`go.opentelemetry.io/otel` and `go.opentelemetry.io/otel/sdk/metric`.
(#5926)
- Support scope attributes and make them as identifying for `Logger` in
`go.opentelemetry.io/otel` and `go.opentelemetry.io/otel/sdk/log`.
(#5925)
- Make schema URL and scope attributes as identifying for `Tracer` in
`go.opentelemetry.io/otel/bridge/opentracing`. (#5931)
- Clear unneeded slice elements to allow GC to collect the objects in
`go.opentelemetry.io/otel/sdk/metric` and
`go.opentelemetry.io/otel/sdk/trace`. (#5804)

### Fixed

- Global MeterProvider registration unwraps global instrument Observers,
the undocumented Unwrap() methods are now private. (#5881)
- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`
now keeps the metadata already present in the context when `WithHeaders`
is used. (#5892)
- `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc` now
keeps the metadata already present in the context when `WithHeaders` is
used. (#5911)
- `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` now
keeps the metadata already present in the context when `WithHeaders` is
used. (#5915)
- Fix `go.opentelemetry.io/otel/exporters/prometheus` trying to add
exemplars to Gauge metrics, which is unsupported. (#5912)
- Fix `WithEndpointURL` to always use a secure connection when an https
URL is passed in
`go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`.
(#5944)
- Fix `WithEndpointURL` to always use a secure connection when an https
URL is passed in
`go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`.
(#5944)
- Fix `WithEndpointURL` to always use a secure connection when an https
URL is passed in
`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`.
(#5944)
- Fix `WithEndpointURL` to always use a secure connection when an https
URL is passed in
`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`.
(#5944)
- Fix incorrect metrics generated from callbacks when multiple readers
are used in `go.opentelemetry.io/otel/sdk/metric`. (#5900)

### Removed

- Remove all examples under `go.opentelemetry.io/otel/example` as they
are moved to [Contrib
repository](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/examples).
(#5930)
2024-11-08 18:52:26 +01:00
David Ashpole
bc2fe88756 Release v1.31.0/v0.53.0/v0.7.0/v0.0.10 (#5883)
### Added

- Add `go.opentelemetry.io/otel/sdk/metric/exemplar` package which
includes `Exemplar`, `Filter`, `TraceBasedFilter`, `AlwaysOnFilter`,
`HistogramReservoir`, `FixedSizeReservoir`, `Reservoir`, `Value` and
`ValueType` types. These will be used for configuring the exemplar
reservoir for the metrics sdk. (#5747, #5862)
- Add `WithExportBufferSize` option to log batch processor.(#5877)

### Changed

- Enable exemplars by default in `go.opentelemetry.io/otel/sdk/metric`.
Exemplars can be disabled by setting
`OTEL_METRICS_EXEMPLAR_FILTER=always_off` (#5778)
- `Logger.Enabled` in `go.opentelemetry.io/otel/log` now accepts a newly
introduced `EnabledParameters` type instead of `Record`. (#5791)
- `FilterProcessor.Enabled` in
`go.opentelemetry.io/otel/sdk/log/internal/x` now accepts
`EnabledParameters` instead of `Record`. (#5791)
- The `Record` type in `go.opentelemetry.io/otel/log` is no longer
comparable. (#5847)
- Performance improvements for the trace SDK `SetAttributes` method in
`Span`. (#5864)
- Reduce memory allocations for the `Event` and `Link` lists in `Span`.
(#5858)
- Performance improvements for the trace SDK `AddEvent`, `AddLink`,
`RecordError` and `End` methods in `Span`. (#5874)

### Deprecated

- Deprecate all examples under `go.opentelemetry.io/otel/example` as
they are moved to [Contrib
repository](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/examples).
(#5854)

### Fixed

- The race condition for multiple `FixedSize` exemplar reservoirs
identified in #5814 is resolved. (#5819)
- Fix log records duplication in case of heterogeneous resource
attributes by correctly mapping each log record to it's resource and
scope. (#5803)
- Fix timer channel drain to avoid hanging on Go 1.23. (#5868)
- Fix delegation for global meter providers, and panic when calling
otel.SetMeterProvider. (#5827)
- Change the `reflect.TypeOf` to use a nil pointer to not allocate on
the heap unless necessary. (#5827)
2024-10-11 12:59:27 -04:00
Matthieu MOREL
6edc7a63df [chore]: enable expected-actual rule from testifylint (#5848)
Testifylint is a linter that provides best practices with the use of
testify.

This PR enables
[expected-actual](https://github.com/Antonboom/testifylint?tab=readme-ov-file#expected-actual)
rule from [testifylint](https://github.com/Antonboom/testifylint)

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2024-09-26 12:04:33 +02:00
Cattī Crūdēlēs
38b9734230 doc(metric): fix incorrect explanation of how metric.WithAttributes works (#5822) 2024-09-16 09:09:28 +02:00
Sam Xie
ed4fc75758 Release v1.30.0/v0.52.0/v0.6.0/v0.0.9 (#5797)
### Added

- Support `OTEL_EXPORTER_OTLP_LOGS_INSECURE` and
`OTEL_EXPORTER_OTLP_INSECURE` environments in
`go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#5739)
- The `WithResource` option for `NewMeterProvider` now merges the
provided resources with the ones from environment variables. (#5773)
- The `WithResource` option for `NewLoggerProvider` now merges the
provided resources with the ones from environment variables. (#5773)
- Add UTF-8 support to `go.opentelemetry.io/otel/exporters/prometheus`.
(#5755)
### Fixed

- Fix memory leak in the global `MeterProvider` when identical
instruments are repeatedly created. (#5754)
- Fix panic instruments creation when setting meter provider. (#5758)
- Fix panic on instruments creation when setting meter provider. (#5758)
- Fix an issue where `SetMeterProvider` in `go.opentelemetry.io/otel`
might miss the delegation for instruments and registries. (#5780)

### Removed

- Drop support for [Go 1.21](https://go.dev/doc/go1.21). (#5736, #5740,
#5800)
2024-09-10 14:10:56 -07:00
Nathan Baulch
506a9baf5e Fix typos (#5763) 2024-09-09 08:53:15 +02:00
Sam Xie
172cfb7208 Replace go 1.21 with go 1.22 in go mod (#5740)
Related #5736
2024-08-26 18:50:33 -07:00
Tyler Yahn
6b1d94f21c Release v1.29.0/v0.51.0/v0.5.0 (#5732)
This release is the last to support [Go 1.21]. The next release will
require at least [Go 1.22].

### Added

- Add MacOS ARM64 platform to the compatibility testing suite. (#5577)
- Add `InstrumentationScope` field to `SpanStub` in
`go.opentelemetry.io/otel/sdk/trace/tracetest`, as a replacement for the
deprecated `InstrumentationLibrary`. (#5627)
- Make the initial release of
`go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. This new
module contains an OTLP exporter that transmits log telemetry using
gRPC. This module is unstable and breaking changes may be introduced.
See our [versioning policy](VERSIONING.md) for more information about
these stability guarantees. (#5629)
- Add `Walk` function to `TraceState` in
`go.opentelemetry.io/otel/trace` to iterate all the key-value pairs.
(#5651)
- Bridge the trace state in
`go.opentelemetry.io/otel/bridge/opencensus`. (#5651)
- Zero value of `SimpleProcessor` in `go.opentelemetry.io/otel/sdk/log`
no longer panics. (#5665)
- The `FilterProcessor` interface type is added in
`go.opentelemetry.io/otel/sdk/log/internal/x`. This is an optional and
experimental interface that log `Processor`s can implement to instruct
the `Logger` if a `Record` will be processed or not. It replaces the
existing `Enabled` method that is removed from the `Processor` interface
itself. It does not fall within the scope of the OpenTelemetry Go
versioning and stability [policy](./VERSIONING.md) and it may be changed
in backwards incompatible ways or removed in feature releases. (#5692)
- Support [Go 1.23]. (#5720)

### Changed

- `NewMemberRaw`, `NewKeyProperty` and `NewKeyValuePropertyRaw` in
`go.opentelemetry.io/otel/baggage` allow UTF-8 string in key. (#5132)
- `Processor.OnEmit` in `go.opentelemetry.io/otel/sdk/log` now accepts a
pointer to `Record` instead of a value so that the record modifications
done in a processor are propagated to subsequent registered processors.
(#5636)
- `SimpleProcessor.Enabled` in `go.opentelemetry.io/otel/sdk/log` now
returns `false` if the exporter is `nil`. (#5665)
- Update the concurrency requirements of `Exporter` in
`go.opentelemetry.io/otel/sdk/log`. (#5666)
- `SimpleProcessor` in `go.opentelemetry.io/otel/sdk/log` synchronizes
`OnEmit` calls. (#5666)
- The `Processor` interface in `go.opentelemetry.io/otel/sdk/log` no
longer includes the `Enabled` method. See the `FilterProcessor`
interface type added in `go.opentelemetry.io/otel/sdk/log/internal/x` to
continue providing this functionality. (#5692)
- The `SimpleProcessor` type in `go.opentelemetry.io/otel/sdk/log` is no
longer comparable. (#5693)
- The `BatchProcessor` type in `go.opentelemetry.io/otel/sdk/log` is no
longer comparable. (#5693)

### Fixed

- Correct comments for the priority of the `WithEndpoint` and
`WithEndpointURL` options and their corresponding environment variables
in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`.
(#5584)
- Pass the underlying error rather than a generic retry-able failure in
`go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`,
`go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` and
`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`.
(#5541)
- Correct the `Tracer`, `Meter`, and `Logger` names used in
`go.opentelemetry.io/otel/example/dice`. (#5612)
- Correct the `Tracer` names used in
`go.opentelemetry.io/otel/example/namedtracer`. (#5612)
- Correct the `Tracer` name used in
`go.opentelemetry.io/otel/example/opencensus`. (#5612)
- Correct the `Tracer` and `Meter` names used in
`go.opentelemetry.io/otel/example/otel-collector`. (#5612)
- Correct the `Tracer` names used in
`go.opentelemetry.io/otel/example/passthrough`. (#5612)
- Correct the `Meter` name used in
`go.opentelemetry.io/otel/example/prometheus`. (#5612)
- Correct the `Tracer` names used in
`go.opentelemetry.io/otel/example/zipkin`. (#5612)
- Correct comments for the priority of the `WithEndpoint` and
`WithEndpointURL` options and their corresponding environment variables
in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`
and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`.
(#5641)
- Correct comments for the priority of the `WithEndpoint` and
`WithEndpointURL` options and their corresponding environment variables
in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`.
(#5650)
- Stop percent encoding header environment variables in
`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`,
`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`,
`go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and
`go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`
(#5705)
- Remove invalid environment variable header keys in
`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`,
`go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`,
`go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and
`go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`
(#5705)

### Removed

- The `Enabled` method of the `SimpleProcessor` in
`go.opentelemetry.io/otel/sdk/log` is removed. (#5692)
- The `Enabled` method of the `BatchProcessor` in
`go.opentelemetry.io/otel/sdk/log` is removed. (#5692)

[Go 1.23]: https://go.dev/doc/go1.23
[Go 1.22]: https://go.dev/doc/go1.22
[Go 1.21]: https://go.dev/doc/go1.21
2024-08-23 13:13:40 -07:00
Robert Pająk
5edfc73c67 Fix interfaces doc formatting (#5658)
The methods should be separated by lines if there are GoDoc comments.
2024-08-05 21:14:00 +02:00
Tyler Yahn
81216fb002 Releases v1.28.0/v0.50.0/v0.4.0 (#5569)
### Added

- The `IsEmpty` method is added to the `Instrument` type in
`go.opentelemetry.io/otel/sdk/metric`.
This method is used to check if an `Instrument` instance is a
zero-value. (#5431)
- Store and provide the emitted `context.Context` in `ScopeRecords` of
`go.opentelemetry.io/otel/sdk/log/logtest`. (#5468)
- The `go.opentelemetry.io/otel/semconv/v1.26.0` package.
The package contains semantic conventions from the `v1.26.0` version of
the OpenTelemetry Semantic Conventions. (#5476)
- The `AssertRecordEqual` method to
`go.opentelemetry.io/otel/log/logtest` to allow comparison of two log
records in tests. (#5499)
- The `WithHeaders` option to
`go.opentelemetry.io/otel/exporters/zipkin` to allow configuring custom
http headers while exporting spans. (#5530)

### Changed

- `Tracer.Start` in `go.opentelemetry.io/otel/trace/noop` no longer
allocates a span for empty span context. (#5457)
- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to
`go.opentelemetry.io/otel/semconv/v1.26.0` in
`go.opentelemetry.io/otel/example/otel-collector`. (#5490)
- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to
`go.opentelemetry.io/otel/semconv/v1.26.0` in
`go.opentelemetry.io/otel/example/zipkin`. (#5490)
- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to
`go.opentelemetry.io/otel/semconv/v1.26.0` in
`go.opentelemetry.io/otel/exporters/zipkin`. (#5490)
- The exporter no longer exports the deprecated "otel.library.name" or
"otel.library.version" attributes.
- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to
`go.opentelemetry.io/otel/semconv/v1.26.0` in
`go.opentelemetry.io/otel/sdk/resource`. (#5490)
- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to
`go.opentelemetry.io/otel/semconv/v1.26.0` in
`go.opentelemetry.io/otel/sdk/trace`. (#5490)
- `SimpleProcessor.OnEmit` in `go.opentelemetry.io/otel/sdk/log` no
longer allocates a slice which makes it possible to have a
zero-allocation log processing using `SimpleProcessor`. (#5493)
- Use non-generic functions in the `Start` method of
`"go.opentelemetry.io/otel/sdk/trace".Trace` to reduce memory
allocation. (#5497)
- `service.instance.id` is populated for a `Resource` created with
`"go.opentelemetry.io/otel/sdk/resource".Default` with a default value
when `OTEL_GO_X_RESOURCE` is set. (#5520)
- Improve performance of metric instruments in
`go.opentelemetry.io/otel/sdk/metric` by removing unnecessary calls to
`time.Now`. (#5545)

### Fixed

- Log a warning to the OpenTelemetry internal logger when a `Record` in
`go.opentelemetry.io/otel/sdk/log` drops an attribute due to a limit
being reached. (#5376)
- Identify the `Tracer` returned from the global `TracerProvider` in
`go.opentelemetry.io/otel/global` with its schema URL. (#5426)
- Identify the `Meter` returned from the global `MeterProvider` in
`go.opentelemetry.io/otel/global` with its schema URL. (#5426)
- Log a warning to the OpenTelemetry internal logger when a `Span` in
`go.opentelemetry.io/otel/sdk/trace` drops an attribute, event, or link
due to a limit being reached. (#5434)
- Document instrument name requirements in
`go.opentelemetry.io/otel/metric`. (#5435)
- Prevent random number generation data-race for experimental rand
exemplars in `go.opentelemetry.io/otel/sdk/metric`. (#5456)
- Fix counting number of dropped attributes of `Record` in
`go.opentelemetry.io/otel/sdk/log`. (#5464)
- Fix panic in baggage creation when a member contains `0x80` char in
key or value. (#5494)
- Correct comments for the priority of the `WithEndpoint` and
`WithEndpointURL` options and their corresponding environment variables
in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`.
(#5508)
- Retry trace and span ID generation if it generated an invalid one in
`go.opentelemetry.io/otel/sdk/trace`. (#5514)
- Fix stale timestamps reported by the last-value aggregation. (#5517)
- Indicate the `Exporter` in
`go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` must be
created by the `New` method. (#5521)
- Improved performance in all `{Bool,Int64,Float64,String}SliceValue`
functions of `go.opentelemetry.io/attributes` by reducing the number of
allocations. (#5549)
2024-07-02 13:29:45 -07:00
Joonsoo Park
a814b359a0 Add example for synchronous gauge (#5492)
Added example for synchronous gauge

Related: #5414
2024-06-24 07:37:40 -07:00
Tyler Yahn
6a0fa3c911 Upgrade semconv use to v1.26.0 (#5490)
Follow up to #5476
2024-06-06 09:36:59 -07:00
Tyler Yahn
baa8efe132 Document instrument name requirements (#5435)
Fix #5377

---------

Co-authored-by: Sam Xie <sam@samxie.me>
2024-05-30 13:59:58 -07:00
renovate[bot]
8ea894949f fix(deps): update module github.com/go-logr/logr to v1.4.2 (#5393)
[![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/go-logr/logr](https://togithub.com/go-logr/logr) |
`v1.4.1` -> `v1.4.2` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgo-logr%2flogr/v1.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgo-logr%2flogr/v1.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgo-logr%2flogr/v1.4.1/v1.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgo-logr%2flogr/v1.4.1/v1.4.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>go-logr/logr (github.com/go-logr/logr)</summary>

### [`v1.4.2`](https://togithub.com/go-logr/logr/releases/tag/v1.4.2)

[Compare
Source](https://togithub.com/go-logr/logr/compare/v1.4.1...v1.4.2)

#### What's Changed

- Fix lint: named but unused params by
[@&#8203;thockin](https://togithub.com/thockin) in
[https://github.com/go-logr/logr/pull/268](https://togithub.com/go-logr/logr/pull/268)
- Add a Go report card, fix lint by
[@&#8203;thockin](https://togithub.com/thockin) in
[https://github.com/go-logr/logr/pull/271](https://togithub.com/go-logr/logr/pull/271)
- funcr: Handle nested empty groups properly by
[@&#8203;thockin](https://togithub.com/thockin) in
[https://github.com/go-logr/logr/pull/274](https://togithub.com/go-logr/logr/pull/274)

##### Dependencies:

- build(deps): bump github/codeql-action from 3.22.11 to 3.22.12 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/254](https://togithub.com/go-logr/logr/pull/254)
- build(deps): bump github/codeql-action from 3.22.12 to 3.23.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/256](https://togithub.com/go-logr/logr/pull/256)
- build(deps): bump actions/upload-artifact from 4.0.0 to 4.1.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/257](https://togithub.com/go-logr/logr/pull/257)
- build(deps): bump github/codeql-action from 3.23.0 to 3.23.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/259](https://togithub.com/go-logr/logr/pull/259)
- build(deps): bump actions/upload-artifact from 4.1.0 to 4.2.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/260](https://togithub.com/go-logr/logr/pull/260)
- build(deps): bump actions/upload-artifact from 4.2.0 to 4.3.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/263](https://togithub.com/go-logr/logr/pull/263)
- build(deps): bump github/codeql-action from 3.23.1 to 3.23.2 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/262](https://togithub.com/go-logr/logr/pull/262)
- build(deps): bump github/codeql-action from 3.23.2 to 3.24.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/264](https://togithub.com/go-logr/logr/pull/264)
- build(deps): bump actions/upload-artifact from 4.3.0 to 4.3.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/266](https://togithub.com/go-logr/logr/pull/266)
- build(deps): bump golangci/golangci-lint-action from 3.7.0 to 4.0.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/267](https://togithub.com/go-logr/logr/pull/267)
- build(deps): bump github/codeql-action from 3.24.0 to 3.24.3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/270](https://togithub.com/go-logr/logr/pull/270)
- build(deps): bump github/codeql-action from 3.24.3 to 3.24.5 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/272](https://togithub.com/go-logr/logr/pull/272)
- build(deps): bump github/codeql-action from 3.24.5 to 3.24.6 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/275](https://togithub.com/go-logr/logr/pull/275)
- build(deps): bump actions/checkout from 4.1.1 to 4.1.2 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/276](https://togithub.com/go-logr/logr/pull/276)
- build(deps): bump github/codeql-action from 3.24.6 to 3.24.7 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/277](https://togithub.com/go-logr/logr/pull/277)
- build(deps): bump github/codeql-action from 3.24.7 to 3.24.9 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/278](https://togithub.com/go-logr/logr/pull/278)
- build(deps): bump github/codeql-action from 3.24.9 to 3.24.10 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/279](https://togithub.com/go-logr/logr/pull/279)
- build(deps): bump actions/upload-artifact from 4.3.1 to 4.3.2 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/280](https://togithub.com/go-logr/logr/pull/280)
- build(deps): bump actions/checkout from 4.1.2 to 4.1.3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/281](https://togithub.com/go-logr/logr/pull/281)
- build(deps): bump github/codeql-action from 3.24.10 to 3.25.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/282](https://togithub.com/go-logr/logr/pull/282)
- build(deps): bump github/codeql-action from 3.25.1 to 3.25.3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/283](https://togithub.com/go-logr/logr/pull/283)
- build(deps): bump golangci/golangci-lint-action from 4.0.0 to 5.0.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/284](https://togithub.com/go-logr/logr/pull/284)
- build(deps): bump actions/checkout from 4.1.3 to 4.1.4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/285](https://togithub.com/go-logr/logr/pull/285)
- build(deps): bump actions/upload-artifact from 4.3.2 to 4.3.3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/286](https://togithub.com/go-logr/logr/pull/286)
- build(deps): bump actions/setup-go from 5.0.0 to 5.0.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/288](https://togithub.com/go-logr/logr/pull/288)
- build(deps): bump golangci/golangci-lint-action from 5.0.0 to 5.3.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/289](https://togithub.com/go-logr/logr/pull/289)
- build(deps): bump golangci/golangci-lint-action from 5.3.0 to 6.0.1 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/293](https://togithub.com/go-logr/logr/pull/293)
- build(deps): bump github/codeql-action from 3.25.3 to 3.25.4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/292](https://togithub.com/go-logr/logr/pull/292)
- build(deps): bump actions/checkout from 4.1.4 to 4.1.5 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/291](https://togithub.com/go-logr/logr/pull/291)
- build(deps): bump ossf/scorecard-action from 2.3.1 to 2.3.3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/290](https://togithub.com/go-logr/logr/pull/290)
- build(deps): bump github/codeql-action from 3.25.4 to 3.25.5 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/294](https://togithub.com/go-logr/logr/pull/294)
- build(deps): bump actions/checkout from 4.1.5 to 4.1.6 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/go-logr/logr/pull/295](https://togithub.com/go-logr/logr/pull/295)

**Full Changelog**:
https://github.com/go-logr/logr/compare/v1.4.1...v1.4.2

</details>

---

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

---

- [ ] <!-- rebase-check -->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).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbIlNraXAgQ2hhbmdlbG9nIiwiZGVwZW5kZW5jaWVzIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-21 13:58:14 -07:00
Tyler Yahn
5661ff0ded Release v1.27.0/v0.49.0/v0.3.0 (#5392)
This release includes the first beta release of the OpenTelemetry Logs
Bridge API and SDK for Go.

### Added

- Add example for `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`.
(#5242)
- Add `RecordFactory` in `go.opentelemetry.io/otel/sdk/log/logtest` to
facilitate testing exporter and processor implementations. (#5258)
- Add `RecordFactory` in `go.opentelemetry.io/otel/log/logtest` to
facilitate testing bridge implementations. (#5263)
- The count of dropped records from the `BatchProcessor` in
`go.opentelemetry.io/otel/sdk/log` is logged. (#5276)
- Add metrics in the `otel-collector` example. (#5283)
- Add the synchronous gauge instrument to
`go.opentelemetry.io/otel/metric`. (#5304)
- An `int64` or `float64` synchronous gauge instrument can now be
created from a `Meter`.
- All implementations of the API
(`go.opentelemetry.io/otel/metric/noop`,
`go.opentelemetry.io/otel/sdk/metric`) are updated to support this
instrument.
- Add logs to `go.opentelemetry.io/otel/example/dice`. (#5349)

### Changed

- The `Shutdown` method of `Exporter` in
`go.opentelemetry.io/otel/exporters/stdout/stdouttrace` ignores the
context cancellation and always returns `nil`. (#5189)
- The `ForceFlush` and `Shutdown` methods of the exporter returned by
`New` in `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` ignore
the context cancellation and always return `nil`. (#5189)
- Apply the value length limits to `Record` attributes in
`go.opentelemetry.io/otel/sdk/log`. (#5230)
- De-duplicate map attributes added to a `Record` in
`go.opentelemetry.io/otel/sdk/log`. (#5230)
- `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` won't print
timestamps when `WithoutTimestamps` option is set. (#5241)
- The `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` exporter
won't print `AttributeValueLengthLimit` and `AttributeCountLimit` fields
now, instead it prints the `DroppedAttributes` field. (#5272)
- Improved performance in the `Stringer` implementation of
`go.opentelemetry.io/otel/baggage.Member` by reducing the number of
allocations. (#5286)
- Set the start time for last-value aggregates in
`go.opentelemetry.io/otel/sdk/metric`. (#5305)
- The `Span` in `go.opentelemetry.io/otel/sdk/trace` will record links
without span context if either non-empty `TraceState` or attributes are
provided. (#5315)
- Upgrade all dependencies of `go.opentelemetry.io/otel/semconv/v1.24.0`
to `go.opentelemetry.io/otel/semconv/v1.25.0`. (#5374)

### Fixed

- Comparison of unordered maps for
`go.opentelemetry.io/otel/log.KeyValue` and
`go.opentelemetry.io/otel/log.Value`. (#5306)
- Fix the empty output of `go.opentelemetry.io/otel/log.Value` in
`go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. (#5311)
- Split the behavior of `Recorder` in
`go.opentelemetry.io/otel/log/logtest` so it behaves as a
`LoggerProvider` only. (#5365)
- Fix wrong package name of the error message when parsing endpoint URL
in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`.
(#5371)
- Identify the `Logger` returned from the global `LoggerProvider` in
`go.opentelemetry.io/otel/log/global` with its schema URL. (#5375)
2024-05-21 10:59:36 -07:00
Tyler Yahn
999c6a07b3 Update all semconv use to v1.25.0 (#5374)
Resolve #5373
2024-05-19 07:16:33 +02:00
Tyler Yahn
dafe137bbe Add the synchronous gauge to the metric API and SDK (#5304)
Resolve #5225 

The specification has [added a synchronous gauge
instrument](https://github.com/open-telemetry/opentelemetry-specification/pull/3540).
That instrument has now been
[stabilized](https://github.com/open-telemetry/opentelemetry-specification/pull/4019),
and that stabilization is included in the [next
release](https://github.com/open-telemetry/opentelemetry-specification/pull/4034).

This adds the new synchronous gauge instrument to the metric API and all
implementation we publish.

This change will be a breaking change for any SDK developer. The
`embedded` package is updated to ensure our compatibility guarantees are
meet.

---------

Co-authored-by: David Ashpole <dashpole@google.com>
2024-05-16 09:56:40 -07:00
Tyler Yahn
f23078e52a Fix HistogramConfig docs (#5301) 2024-05-06 19:16:41 +02:00
Tyler Yahn
f8840b9a51 Fix type error in float64 instrument docs (#5302) 2024-05-06 19:04:57 +02:00
Sam Xie
9656d0afa7 Release 1.26.0/0.48.0/0.2.0-alpha (#5260)
* Bump versions in versions.yaml

* Prepare stable-v1 for version v1.26.0

* Prepare experimental-metrics for version v0.48.0

* Prepare experimental-logs for version v0.2.0-alpha

* Prepare experimental-schema for version v0.0.9

* Update CHANGELOG

* Unbump experimental-schema

* Update CHANGELOG.md

Co-authored-by: Robert Pająk <pellared@hotmail.com>

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2024-04-24 07:27:22 -07:00