1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-30 21:20:04 +02:00
Commit Graph

3038 Commits

Author SHA1 Message Date
renovate[bot]
ef12bf858d
chore(deps): update golang.org/x (#5957)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| golang.org/x/sys | `v0.26.0` -> `v0.27.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fsys/v0.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fsys/v0.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fsys/v0.26.0/v0.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fsys/v0.26.0/v0.27.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| golang.org/x/text | `v0.19.0` -> `v0.20.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2ftext/v0.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2ftext/v0.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2ftext/v0.19.0/v0.20.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2ftext/v0.19.0/v0.20.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.

👻 **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:eyJjcmVhdGVkSW5WZXIiOiIzOS43LjEiLCJ1cGRhdGVkSW5WZXIiOiIzOS43LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbIlNraXAgQ2hhbmdlbG9nIiwiZGVwZW5kZW5jaWVzIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-08 09:18:44 +01:00
Mikhail Mazurskiy
85eb76f2fd
Allow GC to collect unneeded slice elements (#5804)
```go
type interInst struct {
	x int
}

type inter interface {
}

var sink []inter

func BenchmarkX(b *testing.B) {
	sink = make([]inter, b.N)
	for i := 0; i < b.N; i++ {
		sink[i] = &interInst{}
	}
	clear(sink)
	sink = sink[:0]
	runtime.GC()
	var ms runtime.MemStats
	runtime.ReadMemStats(&ms)
	b.Log(b.N, ms.Frees) // Frees is the cumulative count of heap objects freed.
}
```

```
clear:
    ioz_test.go:35: 1 589
    ioz_test.go:35: 100 711
    ioz_test.go:35: 10000 10729
    ioz_test.go:35: 1000000 1010750  <-- 1m+ freed
    ioz_test.go:35: 16076874 17087643
    ioz_test.go:35: 19514749 36602412
```
```
no clear:
    ioz_test.go:35: 1 585
    ioz_test.go:35: 100 606
    ioz_test.go:35: 10000 725
    ioz_test.go:35: 1000000 10745  <-- some "overhead" objects freed, not the slice.
    ioz_test.go:35: 16391445 1010765
    ioz_test.go:35: 21765238 17402230
```

This is documented at https://go.dev/wiki/SliceTricks:

> NOTE If the type of the element is a pointer or a struct with pointer
fields, which need to be garbage collected, the above implementations of
Cut and Delete have a potential memory leak problem: some elements with
values are still referenced by slice a’s underlying array, just not
“visible” in the slice. Because the “deleted” value is referenced in the
underlying array, the deleted value is still “reachable” during GC, even
though the value cannot be referenced by your code. If the underlying
array is long-lived, this represents a leak.

Followed by examples of how zeroing out the slice elements solves
the problem. This PR does the same.
2024-11-08 07:36:35 +01:00
pree-dew
1492efa719
Fix incorrect metrics getting generated from multiple readers (#5900)
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/5866

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2024-11-08 07:29:38 +01:00
renovate[bot]
d2b066346b
fix(deps): update module go.opentelemetry.io/build-tools/multimod to v0.15.0 (#5951)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[go.opentelemetry.io/build-tools/multimod](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools)
| `v0.14.0` -> `v0.15.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fbuild-tools%2fmultimod/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fbuild-tools%2fmultimod/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fbuild-tools%2fmultimod/v0.14.0/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fbuild-tools%2fmultimod/v0.14.0/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>open-telemetry/opentelemetry-go-build-tools
(go.opentelemetry.io/build-tools/multimod)</summary>

###
[`v0.15.0`](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/blob/HEAD/CHANGELOG.md#v0150)

[Compare
Source](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/compare/v0.14.0...v0.15.0)

##### 💡 Enhancements 💡

- `all`: bump minimum Go version to 1.22
([#&#8203;605](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/605))
- `multimod`: Improve error message when the Go proxy misbehaves
([#&#8203;610](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/610))

##### 🧰 Bug fixes 🧰

- `chloggen`: Fix bug that directed all output to stderr
([#&#8203;612](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/612))

</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 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:eyJjcmVhdGVkSW5WZXIiOiIzOS43LjEiLCJ1cGRhdGVkSW5WZXIiOiIzOS43LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbIlNraXAgQ2hhbmdlbG9nIiwiZGVwZW5kZW5jaWVzIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-07 16:03:16 -08:00
renovate[bot]
394cbd2890
chore(deps): update lycheeverse/lychee-action action to v2.1.0 (#5950)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[lycheeverse/lychee-action](https://redirect.github.com/lycheeverse/lychee-action)
| action | minor | `v2.0.2` -> `v2.1.0` |

---

### Release Notes

<details>
<summary>lycheeverse/lychee-action (lycheeverse/lychee-action)</summary>

###
[`v2.1.0`](https://redirect.github.com/lycheeverse/lychee-action/releases/tag/v2.1.0):
Version 2.1.0

[Compare
Source](https://redirect.github.com/lycheeverse/lychee-action/compare/v2.0.2...v2.1.0)

#### What's Changed

- Add missing argument `failIfEmpty` by
[@&#8203;LitoMore](https://redirect.github.com/LitoMore) in
[https://github.com/lycheeverse/lychee-action/pull/261](https://redirect.github.com/lycheeverse/lychee-action/pull/261)
- Fix bugs about the exit code by
[@&#8203;YDX-2147483647](https://redirect.github.com/YDX-2147483647) in
[https://github.com/lycheeverse/lychee-action/pull/262](https://redirect.github.com/lycheeverse/lychee-action/pull/262)
- Bump lychee version to 0.17.0 by
[@&#8203;mre](https://redirect.github.com/mre) in
[https://github.com/lycheeverse/lychee-action/pull/263](https://redirect.github.com/lycheeverse/lychee-action/pull/263)

#### New Contributors

- [@&#8203;LitoMore](https://redirect.github.com/LitoMore) made their
first contribution in
[https://github.com/lycheeverse/lychee-action/pull/261](https://redirect.github.com/lycheeverse/lychee-action/pull/261)
- [@&#8203;YDX-2147483647](https://redirect.github.com/YDX-2147483647)
made their first contribution in
[https://github.com/lycheeverse/lychee-action/pull/262](https://redirect.github.com/lycheeverse/lychee-action/pull/262)

**Full Changelog**:
https://github.com/lycheeverse/lychee-action/compare/v2...v2.1.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 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:eyJjcmVhdGVkSW5WZXIiOiIzOS43LjEiLCJ1cGRhdGVkSW5WZXIiOiIzOS43LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbIlNraXAgQ2hhbmdlbG9nIiwiZGVwZW5kZW5jaWVzIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-07 15:07:19 -08:00
renovate[bot]
37b2537692
fix(deps): update github.com/opentracing-contrib/go-grpc digest to e3cbcab (#5952)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[github.com/opentracing-contrib/go-grpc](https://redirect.github.com/opentracing-contrib/go-grpc)
| require | digest | `d08aa2b` -> `e3cbcab` |

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOS43LjEiLCJ1cGRhdGVkSW5WZXIiOiIzOS43LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbIlNraXAgQ2hhbmdlbG9nIiwiZGVwZW5kZW5jaWVzIl19-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2024-11-07 11:06:23 -08:00
renovate[bot]
7f68356a7d
fix(deps): update module go.opentelemetry.io/build-tools/semconvgen to v0.15.0 (#5953)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[go.opentelemetry.io/build-tools/semconvgen](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools)
| `v0.14.0` -> `v0.15.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fbuild-tools%2fsemconvgen/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fbuild-tools%2fsemconvgen/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fbuild-tools%2fsemconvgen/v0.14.0/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fbuild-tools%2fsemconvgen/v0.14.0/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>open-telemetry/opentelemetry-go-build-tools
(go.opentelemetry.io/build-tools/semconvgen)</summary>

###
[`v0.15.0`](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/blob/HEAD/CHANGELOG.md#v0150)

[Compare
Source](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/compare/v0.14.0...v0.15.0)

##### 💡 Enhancements 💡

- `all`: bump minimum Go version to 1.22
([#&#8203;605](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/605))
- `multimod`: Improve error message when the Go proxy misbehaves
([#&#8203;610](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/610))

##### 🧰 Bug fixes 🧰

- `chloggen`: Fix bug that directed all output to stderr
([#&#8203;612](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/612))

</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 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:eyJjcmVhdGVkSW5WZXIiOiIzOS43LjEiLCJ1cGRhdGVkSW5WZXIiOiIzOS43LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbIlNraXAgQ2hhbmdlbG9nIiwiZGVwZW5kZW5jaWVzIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-07 09:47:57 -08:00
renovate[bot]
030ffdf4e4
fix(deps): update module go.opentelemetry.io/build-tools/crosslink to v0.15.0 (#5948)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[go.opentelemetry.io/build-tools/crosslink](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools)
| `v0.14.0` -> `v0.15.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fbuild-tools%2fcrosslink/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fbuild-tools%2fcrosslink/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fbuild-tools%2fcrosslink/v0.14.0/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fbuild-tools%2fcrosslink/v0.14.0/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>open-telemetry/opentelemetry-go-build-tools
(go.opentelemetry.io/build-tools/crosslink)</summary>

###
[`v0.15.0`](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/blob/HEAD/CHANGELOG.md#v0150)

[Compare
Source](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/compare/v0.14.0...v0.15.0)

##### 💡 Enhancements 💡

- `all`: bump minimum Go version to 1.22
([#&#8203;605](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/605))
- `multimod`: Improve error message when the Go proxy misbehaves
([#&#8203;610](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/610))

##### 🧰 Bug fixes 🧰

- `chloggen`: Fix bug that directed all output to stderr
([#&#8203;612](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/612))

</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:eyJjcmVhdGVkSW5WZXIiOiIzOS43LjEiLCJ1cGRhdGVkSW5WZXIiOiIzOS43LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbIlNraXAgQ2hhbmdlbG9nIiwiZGVwZW5kZW5jaWVzIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-07 14:06:14 +01:00
renovate[bot]
b89de2df1f
fix(deps): update module go.opentelemetry.io/build-tools/gotmpl to v0.15.0 (#5949)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[go.opentelemetry.io/build-tools/gotmpl](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools)
| `v0.14.0` -> `v0.15.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fbuild-tools%2fgotmpl/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fbuild-tools%2fgotmpl/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fbuild-tools%2fgotmpl/v0.14.0/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fbuild-tools%2fgotmpl/v0.14.0/v0.15.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>open-telemetry/opentelemetry-go-build-tools
(go.opentelemetry.io/build-tools/gotmpl)</summary>

###
[`v0.15.0`](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/blob/HEAD/CHANGELOG.md#v0150)

[Compare
Source](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/compare/v0.14.0...v0.15.0)

##### 💡 Enhancements 💡

- `all`: bump minimum Go version to 1.22
([#&#8203;605](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/605))
- `multimod`: Improve error message when the Go proxy misbehaves
([#&#8203;610](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/610))

##### 🧰 Bug fixes 🧰

- `chloggen`: Fix bug that directed all output to stderr
([#&#8203;612](https://redirect.github.com/open-telemetry/opentelemetry-go-build-tools/issues/612))

</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:eyJjcmVhdGVkSW5WZXIiOiIzOS43LjEiLCJ1cGRhdGVkSW5WZXIiOiIzOS43LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbIlNraXAgQ2hhbmdlbG9nIiwiZGVwZW5kZW5jaWVzIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-07 13:56:54 +01:00
Seva Orlov
b62a3fdd25
Override insecure when endpoint URL is set (#5944)
When an endpoint is set in both Environment variable with "http" and
passed in WithEndpointURL with "https", Insecure is set to true while
the endpoint is used from WithEndpointURL.

Example
- OTEL_EXPORTER_OTLP_ENDPOINT is set to "http://env.endpoint/prefix" 
- WithEndpointURL is passed "https://someendpoint/somepath"

The real endpoint used is "http://someendpoint/somepath", which is
actually neither of both.

---------

Co-authored-by: Robert Pająk <pellared@hotmail.com>
2024-11-07 13:50:10 +01:00
renovate[bot]
937813dcce
fix(deps): update github.com/opentracing-contrib/go-grpc digest to d08aa2b (#5945)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[github.com/opentracing-contrib/go-grpc](https://redirect.github.com/opentracing-contrib/go-grpc)
| require | digest | `9dec25a` -> `d08aa2b` |

---

### Configuration

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

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

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

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

---

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-07 13:42:20 +01:00
Robert Pająk
ff07838976
prometheus: Add instrumentation scope attributes to otel_scope_info (#5932)
Towards https://github.com/open-telemetry/opentelemetry-go/issues/5846
2024-11-05 14:24:52 +01:00
Robert Pająk
12305663a9
log: Update package documentation (#5942)
Follows
https://github.com/open-telemetry/opentelemetry-specification/pull/4259

Fixes link which is no longer valid:
https://github.com/open-telemetry/opentelemetry-go/actions/runs/11662295388/job/32468365322
2024-11-05 12:56:07 +01:00
renovate[bot]
a62c45a580
chore(deps): update googleapis to dd2ea8e (#5943)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[google.golang.org/genproto/googleapis/api](https://redirect.github.com/googleapis/go-genproto)
| indirect | digest | `324edc3` -> `dd2ea8e` |
|
[google.golang.org/genproto/googleapis/rpc](https://redirect.github.com/googleapis/go-genproto)
| indirect | digest | `324edc3` -> `dd2ea8e` |
|
[google.golang.org/genproto/googleapis/rpc](https://redirect.github.com/googleapis/go-genproto)
| require | digest | `324edc3` -> `dd2ea8e` |

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOC4xNDIuNCIsInVwZGF0ZWRJblZlciI6IjM4LjE0Mi40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-05 09:09:46 +01:00
Robert Pająk
6e4c922495
prometheus: Refactor getAttrs (#5937)
Addresses
https://github.com/open-telemetry/opentelemetry-go/pull/5932#discussion_r1822469033

I feel that `getAttr` was doing too much and having:

```go
keys, values := getAttrs(dp.Attributes)
keys = append(keys, kv.keys...)
values = append(values, kv.vals...)
// ...
keys, values := getAttrs(*res.Set())
```

is more readable than:
```go
keys, values := getAttrs(dp.Attributes, ks, vs, resourceKV)
// ...
keys, values := getAttrs(*res.Set(), [2]string{}, [2]string{}, keyVals{})
```

Benchmarks results just in case to minimize the possibility of
accidental introduction of a performance overhead:

```
$ benchstat old.txt new.txt 
goos: linux
goarch: amd64
pkg: go.opentelemetry.io/otel/exporters/prometheus
cpu: Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz
                │   old.txt    │               new.txt               │
                │    sec/op    │    sec/op     vs base               │
Collect1-16       29.77µ ± 11%   30.33µ ± 10%       ~ (p=0.529 n=10)
Collect10-16      80.58µ ±  7%   77.93µ ± 15%       ~ (p=0.315 n=10)
Collect100-16     528.5µ ±  7%   511.2µ ±  2%  -3.28% (p=0.015 n=10)
Collect1000-16    3.179m ±  6%   3.344m ± 15%  +5.19% (p=0.003 n=10)
Collect10000-16   31.77m ±  2%   33.14m ±  7%  +4.34% (p=0.004 n=10)
geomean           662.9µ         668.9µ        +0.90%

                │   old.txt    │               new.txt               │
                │     B/op     │     B/op      vs base               │
Collect1-16       36.52Ki ± 0%   36.59Ki ± 0%  +0.17% (p=0.000 n=10)
Collect10-16      64.58Ki ± 0%   64.64Ki ± 0%  +0.09% (p=0.000 n=10)
Collect100-16     349.3Ki ± 0%   349.4Ki ± 0%  +0.03% (p=0.000 n=10)
Collect1000-16    3.163Mi ± 0%   3.163Mi ± 0%       ~ (p=0.247 n=10)
Collect10000-16   31.05Mi ± 0%   31.06Mi ± 0%  +0.02% (p=0.009 n=10)
geomean           610.6Ki        611.0Ki       +0.06%

                │   old.txt   │              new.txt               │
                │  allocs/op  │  allocs/op   vs base               │
Collect1-16        70.00 ± 0%    72.00 ± 0%  +2.86% (p=0.000 n=10)
Collect10-16       396.0 ± 0%    398.0 ± 0%  +0.51% (p=0.000 n=10)
Collect100-16     3.661k ± 0%   3.663k ± 0%  +0.05% (p=0.000 n=10)
Collect1000-16    36.15k ± 0%   36.15k ± 0%  +0.01% (p=0.000 n=10)
Collect10000-16   361.4k ± 0%   361.5k ± 0%  +0.03% (p=0.009 n=10)
geomean           4.212k        4.241k       +0.68%
```
2024-11-04 11:21:52 +01:00
renovate[bot]
7fd5942eb4
chore(deps): update module github.com/grpc-ecosystem/grpc-gateway/v2 to v2.23.0 (#5939)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/grpc-ecosystem/grpc-gateway/v2](https://redirect.github.com/grpc-ecosystem/grpc-gateway)
| `v2.22.0` -> `v2.23.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgrpc-ecosystem%2fgrpc-gateway%2fv2/v2.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgrpc-ecosystem%2fgrpc-gateway%2fv2/v2.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgrpc-ecosystem%2fgrpc-gateway%2fv2/v2.22.0/v2.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgrpc-ecosystem%2fgrpc-gateway%2fv2/v2.22.0/v2.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>grpc-ecosystem/grpc-gateway
(github.com/grpc-ecosystem/grpc-gateway/v2)</summary>

###
[`v2.23.0`](https://redirect.github.com/grpc-ecosystem/grpc-gateway/releases/tag/v2.23.0)

[Compare
Source](https://redirect.github.com/grpc-ecosystem/grpc-gateway/compare/v2.22.0...v2.23.0)

#### What's Changed

- Remove extra $ to avoid copy-and-run failure. by
[@&#8203;pkusunjy](https://redirect.github.com/pkusunjy) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/4639](https://redirect.github.com/grpc-ecosystem/grpc-gateway/pull/4639)
- Fix doc for responseEnvelope example by
[@&#8203;renatocribeiro](https://redirect.github.com/renatocribeiro) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/4750](https://redirect.github.com/grpc-ecosystem/grpc-gateway/pull/4750)
- Fix typos by
[@&#8203;NathanBaulch](https://redirect.github.com/NathanBaulch) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/4762](https://redirect.github.com/grpc-ecosystem/grpc-gateway/pull/4762)
- Upgrade buf grpc protobuf by
[@&#8203;johanbrandhorst](https://redirect.github.com/johanbrandhorst)
in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/4818](https://redirect.github.com/grpc-ecosystem/grpc-gateway/pull/4818)
- Updates buf example from v1 to v2. by
[@&#8203;iFurySt](https://redirect.github.com/iFurySt) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/4347](https://redirect.github.com/grpc-ecosystem/grpc-gateway/pull/4347)
- Fixed required body parameter when part of the proto message is path
param by
[@&#8203;MahikaJaguste](https://redirect.github.com/MahikaJaguste) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/4850](https://redirect.github.com/grpc-ecosystem/grpc-gateway/pull/4850)
- feat: expose invalid argument error to clients in bidirectional
streaming
([#&#8203;4795](https://redirect.github.com/grpc-ecosystem/grpc-gateway/issues/4795))
by [@&#8203;ianbbqzy](https://redirect.github.com/ianbbqzy) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/4819](https://redirect.github.com/grpc-ecosystem/grpc-gateway/pull/4819)
- feat: add expand_slashed_path_patterns flag by
[@&#8203;czabaj](https://redirect.github.com/czabaj) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/4813](https://redirect.github.com/grpc-ecosystem/grpc-gateway/pull/4813)
- feat: use StreamErrorHandler to send back invalid argument error in
bidirectional streaming by
[@&#8203;ianbbqzy](https://redirect.github.com/ianbbqzy) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/4864](https://redirect.github.com/grpc-ecosystem/grpc-gateway/pull/4864)
- fix: path parametrs of type number by
[@&#8203;czabaj](https://redirect.github.com/czabaj) in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/4866](https://redirect.github.com/grpc-ecosystem/grpc-gateway/pull/4866)

#### New Contributors

- [@&#8203;pkusunjy](https://redirect.github.com/pkusunjy) made their
first contribution in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/4639](https://redirect.github.com/grpc-ecosystem/grpc-gateway/pull/4639)
- [@&#8203;renatocribeiro](https://redirect.github.com/renatocribeiro)
made their first contribution in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/4750](https://redirect.github.com/grpc-ecosystem/grpc-gateway/pull/4750)
- [@&#8203;NathanBaulch](https://redirect.github.com/NathanBaulch) made
their first contribution in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/4762](https://redirect.github.com/grpc-ecosystem/grpc-gateway/pull/4762)
- [@&#8203;iFurySt](https://redirect.github.com/iFurySt) made their
first contribution in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/4347](https://redirect.github.com/grpc-ecosystem/grpc-gateway/pull/4347)
- [@&#8203;MahikaJaguste](https://redirect.github.com/MahikaJaguste)
made their first contribution in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/4850](https://redirect.github.com/grpc-ecosystem/grpc-gateway/pull/4850)
- [@&#8203;ianbbqzy](https://redirect.github.com/ianbbqzy) made their
first contribution in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/4819](https://redirect.github.com/grpc-ecosystem/grpc-gateway/pull/4819)
- [@&#8203;czabaj](https://redirect.github.com/czabaj) made their first
contribution in
[https://github.com/grpc-ecosystem/grpc-gateway/pull/4813](https://redirect.github.com/grpc-ecosystem/grpc-gateway/pull/4813)

**Full Changelog**:
https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.22.0...v2.23.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:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMzUuMiIsInVwZGF0ZWRJblZlciI6IjM4LjE0Mi40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-04 09:27:36 +01:00
Alex Boten
fb2b32bb1b
docs: updating outdated comments (#5940)
Found some comments that reference WithoutBuiltin that was removed some
time ago, and being able to pass in a parameter into WithTelemetrySDK
which is not valid.

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
2024-11-04 09:17:24 +01:00
Robert Pająk
06ee6f2be7
Remove examples (#5930)
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/5801

Remove all examples under go.opentelemetry.io/otel/example as they are
moved to Contrib repository.
2024-10-31 12:35:14 +01:00
Robert Pająk
2a50fab505
otlplog: Add instrumentation scope attributes (#5933)
Towards https://github.com/open-telemetry/opentelemetry-go/issues/5844
2024-10-31 12:28:11 +01:00
Robert Pająk
afd1311f3e
otlpmetric: Add instrumentation scope attributes (#5935)
Towards https://github.com/open-telemetry/opentelemetry-go/issues/5844
2024-10-31 11:34:44 +01:00
Robert Pająk
692cb35a80
otlptrace: Add instrumentation scope attributes (#5934)
Towards https://github.com/open-telemetry/opentelemetry-go/issues/5844
2024-10-31 10:34:58 +01:00
Robert Pająk
3cc4857fd8
opentracing: Make schemaURL and scope attributes as identifying for Tracer (#5931)
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/5928
2024-10-31 10:20:09 +01:00
Robert Pająk
4f94b1e661
log/logtest: Add Attributes to ScopeRecords (#5927)
Towards https://github.com/open-telemetry/opentelemetry-go/issues/3368
2024-10-30 06:40:14 +01:00
Robert Pająk
6a2f7de06d
Make scope attributes as identifying for Logger (#5925)
Towards https://github.com/open-telemetry/opentelemetry-go/issues/3368
2024-10-30 06:34:24 +01:00
Robert Pająk
ee56fb97e0
Make scope attributes as identifying for Meter (#5926)
Towards https://github.com/open-telemetry/opentelemetry-go/issues/3368
2024-10-30 06:29:32 +01:00
Robert Pająk
3742c54497
Make scope attributes as identifying for Tracer (#5924)
Towards https://github.com/open-telemetry/opentelemetry-go/issues/3368
2024-10-30 06:24:32 +01:00
Robert Pająk
30c0f3fa6e
sdk/instrumentation: Add Attributes to Scope (#5903)
Towards https://github.com/open-telemetry/opentelemetry-go/issues/3368
2024-10-29 13:47:14 +01:00
Damien Mathieu
078b2dd0d4
Add Cheng-Zhen as a triager (#5922)
This proposes adding @scorpionknifes as a triager for the Go SIG.
While Cheng-Zhen's contributions are all in the contrib repository, we
don't currently split roles between the two repos.

Cheng-Zhen's contributions in the log bridges, and his interest in being
more involved with the SIG make him a nice fit to be a triager.
2024-10-28 09:26:39 +01:00
renovate[bot]
5cf73e7dd2
fix(deps): update module github.com/prometheus/common to v0.60.1 (#5919)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/prometheus/common](https://redirect.github.com/prometheus/common)
| `v0.60.0` -> `v0.60.1` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fcommon/v0.60.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fcommon/v0.60.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fcommon/v0.60.0/v0.60.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fcommon/v0.60.0/v0.60.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>prometheus/common (github.com/prometheus/common)</summary>

###
[`v0.60.1`](https://redirect.github.com/prometheus/common/releases/tag/v0.60.1)

[Compare
Source](https://redirect.github.com/prometheus/common/compare/v0.60.0...v0.60.1)

##### What's Changed

- promslog: Only log basename, not full path by
[@&#8203;roidelapluie](https://redirect.github.com/roidelapluie) in
[https://github.com/prometheus/common/pull/705](https://redirect.github.com/prometheus/common/pull/705)
- Reload certificates even when no CA is used by
[@&#8203;roidelapluie](https://redirect.github.com/roidelapluie) in
[https://github.com/prometheus/common/pull/707](https://redirect.github.com/prometheus/common/pull/707)
- Synchronize common files from prometheus/prometheus by
[@&#8203;prombot](https://redirect.github.com/prombot) in
[https://github.com/prometheus/common/pull/701](https://redirect.github.com/prometheus/common/pull/701)

**Full Changelog**:
https://github.com/prometheus/common/compare/v0.60.0...v0.60.1

</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:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMjAuMSIsInVwZGF0ZWRJblZlciI6IjM4LjEyMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-25 07:52:08 -07:00
Damien Mathieu
c0f7c95f0d
Switch arm builds out of actuated and into the CNCF runners (#5923) 2024-10-25 07:26:44 -07:00
Travis Thompson
664a075380
Fix exemplars being added to gauge metrics in the prometheus exporter (#5912)
Prometheus Gauge metrics don't support exemplars and while
`addGaugeMetric()` doesn't add them, `addSumMetric()` will if the metric
is monotonic. This causes the prometheus client to throw an error:

```
* error collecting metric Desc{fqName: "http_server_request_body_size_bytes", help: "Measures size of RPC request messages (uncompressed).", constLabels: {}, variableLabels: {net_protocol_name,net_protocol_version,http_method,http_route,http_scheme,net_host_name,net_host_port,otel_scope_name,otel_scope_version}}: cannot inject exemplar into Gauge, Summary or Untyped
```

---------

Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: David Ashpole <dashpole@google.com>
2024-10-24 09:44:02 +02:00
pree-dew
30c4a9a330
Allow additional context to be added when WithHeaders is used in OTLP gRPC traces exporter (#5915)
Fix https://github.com/open-telemetry/opentelemetry-go/issues/5904
2024-10-24 09:33:39 +02:00
Sam Xie
3429e15b9a
Revert Cleanup interaction of exemplar and aggregation (#5913)
Topic: #5249

This reverts commit 8041156518 (PR: #5899)
due to the performance degradation found by Benchmarks CI
https://github.com/open-telemetry/opentelemetry-go/actions/runs/11447364022/job/31848519243

Here is the benchmark test on my machine:

```
goos: darwin
goarch: arm64
pkg: go.opentelemetry.io/otel/sdk/metric
                                       │   old.txt   │                new.txt                 │
                                       │   sec/op    │    sec/op     vs base                  │
Instrument/instrumentImpl/aggregate-10   3.378µ ± 3%   49.366µ ± 1%  +1361.40% (p=0.000 n=10)
Instrument/observable/observe-10         2.288µ ± 2%   37.791µ ± 1%  +1551.73% (p=0.000 n=10)
geomean                                  2.780µ         43.19µ       +1453.65%

                                       │   old.txt    │                 new.txt                 │
                                       │     B/op     │     B/op       vs base                  │
Instrument/instrumentImpl/aggregate-10   1.245Ki ± 1%   22.363Ki ± 0%  +1696.08% (p=0.000 n=10)
Instrument/observable/observe-10           823.0 ± 1%    17432.5 ± 0%  +2018.17% (p=0.000 n=10)
geomean                                  1.000Ki         19.51Ki       +1850.48%

                                       │  old.txt   │                new.txt                │
                                       │ allocs/op  │  allocs/op   vs base                  │
Instrument/instrumentImpl/aggregate-10   1.000 ± 0%   21.000 ± 0%  +2000.00% (p=0.000 n=10)
Instrument/observable/observe-10         1.000 ± 0%   16.000 ± 0%  +1500.00% (p=0.000 n=10)
```
2024-10-23 10:48:07 -07:00
renovate[bot]
7a153a01c6
chore(deps): update benchmark-action/github-action-benchmark action to v1.20.4 (#5916)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[benchmark-action/github-action-benchmark](https://redirect.github.com/benchmark-action/github-action-benchmark)
| action | patch | `v1.20.3` -> `v1.20.4` |

---

### Release Notes

<details>
<summary>benchmark-action/github-action-benchmark
(benchmark-action/github-action-benchmark)</summary>

###
[`v1.20.4`](https://redirect.github.com/benchmark-action/github-action-benchmark/blob/HEAD/CHANGELOG.md#v1204---23-Oct-2024)

[Compare
Source](https://redirect.github.com/benchmark-action/github-action-benchmark/compare/v1.20.3...v1.20.4)

- **feat** add typings and validation workflow
([#&#8203;257](https://redirect.github.com/benchmark-action/github-action-benchmark/issues/257))

</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:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMjAuMSIsInVwZGF0ZWRJblZlciI6IjM4LjEyMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-23 15:46:45 +02:00
Liang Xuhao
97f8401153
Keep metadata for gRPC in context for log signal (#5911)
Fixes #5905
2024-10-23 09:39:25 +02:00
Tyler Yahn
86a51dc049
[chore] Remove unnecessary type declaration in templated transforms (#5906)
The type is fully defined by the switch, no need to be redundant.
2024-10-22 16:06:26 -07:00
Tyler Yahn
92ccad7bd9
[chore] Use errors.Join to unify errors (#5907)
Resolve #3544

Replace all custom implementations for multi-error unification with the
`errors.Join` function of the standard library.
2024-10-22 15:10:05 -07:00
renovate[bot]
1a964cc449
chore(deps): update googleapis to 324edc3 (#5908)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[google.golang.org/genproto/googleapis/api](https://redirect.github.com/googleapis/go-genproto)
| indirect | digest | `796eee8` -> `324edc3` |
|
[google.golang.org/genproto/googleapis/rpc](https://redirect.github.com/googleapis/go-genproto)
| indirect | digest | `796eee8` -> `324edc3` |
|
[google.golang.org/genproto/googleapis/rpc](https://redirect.github.com/googleapis/go-genproto)
| require | digest | `796eee8` -> `324edc3` |

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMjAuMSIsInVwZGF0ZWRJblZlciI6IjM4LjEyMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-22 09:43:41 +02:00
David Ashpole
8041156518
Cleanup interaction of exemplar and aggregation (#5899)
Follow-up to
https://github.com/open-telemetry/opentelemetry-go/pull/5861. This is an
attempt to:

* Limit the API surface of the aggregate package
* Try to use predefined types (e.g. exemplar.Filter) over custom
functions where possible.
* Avoid using nil, and use No-Ops where it makes sense

This makes `aggregate.NewFilteredExemplarReservoir` no longer exported,
removes the `aggregate.FilteredExemplarReservoir` interface, and removes
the `aggregate.dropReservoir`.
2024-10-21 15:37:32 -04:00
mrasu
bf6a7e1e85
otlpmetricgrpc: Keep metadata for gRPC in context (#5892)
When using otlpmetricgrpc, we can inject metadata dynamically with
`metadata.AppendToOutgoingContext`. However when specifying headers with
`WithHeaders`, it becomes impossible to add additional metadata.

For example, the code below sends additional metadata in the header
```go
exp := otlpmetricgrpc.New(context.Background())

ctx := context.Background()
ctx = metadata.AppendToOutgoingContext(ctx, "dynamic-key", "value")
exp.Export(ctx, &metricdata.ResourceMetrics{}))
```


But when using `WithHeader` like below, no additional metadata will be
sent
```go
exp := otlpmetricgrpc.New(context.Background(), otlpmetricgrpc.WithHeaders("custom-key", "value"))

ctx := context.Background()
ctx = metadata.AppendToOutgoingContext(ctx, "dynamic-key", "value")
exp.Export(ctx, &metricdata.ResourceMetrics{}))
```

To eliminate this inconsistency, keep the metadata in the context and
send them in the header.

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2024-10-21 09:44:21 -07:00
Tyler Yahn
bd88af90f2
Generate semconv/v1.27.0 (#5894)
This is the last version of semantic conventions we can generate using
the existing tooling. The next version will require resolution of
https://github.com/open-telemetry/opentelemetry-go/issues/5668.

[Semantic Conventions v1.27.0
Release](https://github.com/open-telemetry/semantic-conventions/releases/tag/v1.27.0)

Resolve https://github.com/open-telemetry/opentelemetry-go/issues/5475
2024-10-20 07:50:39 -07:00
Joshua MacDonald
2578accaa8
otel: conceal unwrapping for global async instrument registration (#5881)
~Two defects are fixed here. However, note that async instrument
delegation appears to have been broken a long time.~

Internalizes and tests the behavior of the Global MeterProvider. This
moves the call to `Unwrap()` out of the SDK, fully concealing it within
the internal/global package (using an un-exported method).

This adds a test for the new functionality. While this test is not
comprehensive, because it doesn't test every instrument variation, it
explicitly tests that both the NewCallback function and the Observe
functions receive objects constructed by the alternate SDK.

Fixes #5827

---------

Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
2024-10-18 10:36:05 -07:00
David Ashpole
81b2a33e1b
Add selector of exemplar reservoir providers to metric.Stream configuration (#5861)
Resolve https://github.com/open-telemetry/opentelemetry-go/issues/5249

### Spec

> exemplar_reservoir: A functional type that generates an exemplar
reservoir a MeterProvider will use when storing exemplars. This
functional type needs to be a factory or callback similar to aggregation
selection functionality which allows different reservoirs to be chosen
by the aggregation.

> Users can provide an exemplar_reservoir, but it is up to their
discretion. Therefore, the stream configuration parameter needs to be
structured to accept an exemplar_reservoir, but MUST NOT obligate a user
to provide one. If the user does not provide an exemplar_reservoir
value, the MeterProvider MUST apply a [default exemplar
reservoir](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar-defaults).

Also,

> the reservoir MUST be given the Attributes associated with its
timeseries point either at construction so that additional sampling
performed by the reservoir has access to all attributes from a
measurement in the "offer" method.

### Changes

In sdk/metric/exemplar, add:
* `exemplar.ReservoirProvider`
* `exemplar.HistogramReservoirProvider`
* `exemplar.FixedSizeReservoirProvider`

In sdk/metric, add:
* `metric.ExemplarReservoirProviderSelector` (func Aggregation ->
ReservoirProvider)
* `metric.DefaultExemplarReservoirProviderSelector` (our default
implementation)
* `ExemplarReservoirProviderSelector` added to `metric.Stream`

Note: the only required public types are
`metric.ExemplarReservoirProviderSelector` and
`ExemplarReservoirProviderSelector` in `metric.Stream`. Others are for
convenience and readability.

### Alternatives considered

#### Add ExemplarReservoirProvider directly to metric.Stream, instead of
ExemplarReservoirProviderSelector

This would mean users can configure a `func() exemplar.Reservoir`
instead of a `func(Aggregation) func() exemplar.Reservoir`.

I don't think this complies with the statement: `This functional type
needs to be a factory or callback similar to aggregation selection
functionality which allows different reservoirs to be chosen by the
aggregation.`. I'm interpreting "allows different reservoirs to be
chosen by the aggregation" as meaning "allows different reservoirs to be
chosen **based on the** aggregation", rather than meaning that the
aggregation is somehow choosing the reservoir.

### Future work

There is some refactoring I plan to do after this to simplify the
interaction between the internal/aggregate and exemplar package. I've
omitted that from this PR to keep the diff smaller.

---------

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Robert Pająk <pellared@hotmail.com>
2024-10-18 09:05:10 -04:00
Damien Mathieu
cd754a629d
Remove company from emeritus (#5887)
Follows https://github.com/open-telemetry/community/pull/2391
2024-10-16 17:17:23 +02:00
renovate[bot]
a234754201
chore(deps): update googleapis to 796eee8 (#5888) 2024-10-16 07:22:46 +02:00
renovate[bot]
d70f3da34d
fix(deps): update module github.com/prometheus/client_golang to v1.20.5 (#5886)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[github.com/prometheus/client_golang](https://redirect.github.com/prometheus/client_golang)
| `v1.20.4` -> `v1.20.5` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fprometheus%2fclient_golang/v1.20.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fprometheus%2fclient_golang/v1.20.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fprometheus%2fclient_golang/v1.20.4/v1.20.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fprometheus%2fclient_golang/v1.20.4/v1.20.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>prometheus/client_golang
(github.com/prometheus/client_golang)</summary>

###
[`v1.20.5`](https://redirect.github.com/prometheus/client_golang/releases/tag/v1.20.5):
/ 2024-10-15

[Compare
Source](https://redirect.github.com/prometheus/client_golang/compare/v1.20.4...v1.20.5)

We decided to revert [the `testutil`
change](https://redirect.github.com/prometheus/client_golang/pull/1424)
that made our util functions less error-prone, but created a lot of work
for our downstream users. Apologies for the pain! This revert should not
cause any major breaking change, even if you already did the
work--unless you depend on the [exact error
message](https://redirect.github.com/grafana/mimir/pull/9624#issuecomment-2413401565).

Going forward, we plan to reinforce our release testing strategy
[\[1\]](https://redirect.github.com/prometheus/client_golang/issues/1646),[\[2\]](https://redirect.github.com/prometheus/client_golang/issues/1648)
and deliver an enhanced [`testutil`
package/module](https://redirect.github.com/prometheus/client_golang/issues/1639)
with more flexible and safer APIs.

Thanks to [@&#8203;dashpole](https://redirect.github.com/dashpole)
[@&#8203;dgrisonnet](https://redirect.github.com/dgrisonnet)
[@&#8203;kakkoyun](https://redirect.github.com/kakkoyun)
[@&#8203;ArthurSens](https://redirect.github.com/ArthurSens)
[@&#8203;vesari](https://redirect.github.com/vesari)
[@&#8203;logicalhan](https://redirect.github.com/logicalhan)
[@&#8203;krajorama](https://redirect.github.com/krajorama)
[@&#8203;bwplotka](https://redirect.github.com/bwplotka) who helped in
this patch release! 🤗

##### Changelog

\[BUGFIX] testutil: Reverted
[#&#8203;1424](https://redirect.github.com/prometheus/client_golang/issues/1424);
functions using compareMetricFamilies are (again) only failing if
filtered metricNames are in the expected input.
[#&#8203;1645](https://redirect.github.com/prometheus/client_golang/issues/1645)

</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:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMjAuMSIsInVwZGF0ZWRJblZlciI6IjM4LjEyMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-15 09:26:34 -07:00
renovate[bot]
ba4a2ab6be
chore(deps): update lycheeverse/lychee-action action to v2.0.2 (#5885)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[lycheeverse/lychee-action](https://redirect.github.com/lycheeverse/lychee-action)
| action | patch | `v2.0.1` -> `v2.0.2` |

---

### Release Notes

<details>
<summary>lycheeverse/lychee-action (lycheeverse/lychee-action)</summary>

###
[`v2.0.2`](https://redirect.github.com/lycheeverse/lychee-action/releases/tag/v2.0.2):
Version 2.0.2

[Compare
Source](https://redirect.github.com/lycheeverse/lychee-action/compare/v2.0.1...v2.0.2)

##### What's Changed

- Fix a typos by
[@&#8203;szepeviktor](https://redirect.github.com/szepeviktor) in
[https://github.com/lycheeverse/lychee-action/pull/257](https://redirect.github.com/lycheeverse/lychee-action/pull/257)
- Document and use correct permissions in the GitHub workflows by
[@&#8203;dscho](https://redirect.github.com/dscho) in
[https://github.com/lycheeverse/lychee-action/pull/258](https://redirect.github.com/lycheeverse/lychee-action/pull/258)
- Add security policy by
[@&#8203;mondeja](https://redirect.github.com/mondeja) in
[https://github.com/lycheeverse/lychee-action/pull/259](https://redirect.github.com/lycheeverse/lychee-action/pull/259)

##### New Contributors

- [@&#8203;szepeviktor](https://redirect.github.com/szepeviktor) made
their first contribution in
[https://github.com/lycheeverse/lychee-action/pull/257](https://redirect.github.com/lycheeverse/lychee-action/pull/257)
- [@&#8203;mondeja](https://redirect.github.com/mondeja) made their
first contribution in
[https://github.com/lycheeverse/lychee-action/pull/259](https://redirect.github.com/lycheeverse/lychee-action/pull/259)

**Full Changelog**:
https://github.com/lycheeverse/lychee-action/compare/v2...v2.0.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 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:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMjAuMSIsInVwZGF0ZWRJblZlciI6IjM4LjEyMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-14 11:24:09 +02:00
Damien Mathieu
fe5c3f8fdd
Run the test compatibility check even if tests failed (#5879)
This forces the test compatibility check to run, even if compatibility
test checks have failed, as having it skipped still allows merging PRs.

Related:
https://github.com/open-telemetry/opentelemetry-go-contrib/pull/6224
2024-10-14 10:02:36 +02:00
renovate[bot]
b3c313ff2f
chore(deps): update lycheeverse/lychee-action action to v2.0.1 (#5884) 2024-10-12 12:10:21 +02:00
David Ashpole
6b251b804c
Allow configuring the exemplar filter on the metrics SDK (#5850)
Part of https://github.com/open-telemetry/opentelemetry-go/issues/5249

### Spec

https://opentelemetry.io/docs/specs/otel/metrics/sdk/#exemplarfilter

> The ExemplarFilter configuration MUST allow users to select between
one of the built-in ExemplarFilters. While ExemplarFilter determines
which measurements are eligible for becoming an Exemplar, the
ExemplarReservoir makes the final decision if a measurement becomes an
exemplar and is stored.

> The ExemplarFilter SHOULD be a configuration parameter of a
MeterProvider for an SDK. The default value SHOULD be TraceBased. The
filter configuration SHOULD follow the [environment variable
specification](https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#exemplar).

> An OpenTelemetry SDK MUST support the following filters:

> *
[AlwaysOn](https://opentelemetry.io/docs/specs/otel/metrics/sdk/#alwayson)
> *
[AlwaysOff](https://opentelemetry.io/docs/specs/otel/metrics/sdk/#alwaysoff)
> *
[TraceBased](https://opentelemetry.io/docs/specs/otel/metrics/sdk/#tracebased)

### Changes

* adds exemplar.AlwaysOffFilter, which is one of the required filters
from the SDK:
https://opentelemetry.io/docs/specs/otel/metrics/sdk/#alwaysoff
* adds `metric.WithExemplarFilter` as an option for the metrics SDK.
* moves handling of `OTEL_METRICS_EXEMPLAR_FILTER` to the same location
as config handling to make code easier to navigate.



dropReservoir can actually be removed, but I plan to do that in a
follow-up refactor, since it will be a large diff.

---------

Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
2024-10-11 16:02:20 -04:00