mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2026-06-03 18:35:08 +02:00
ef61bb41838f2b9307156067c90599ff46229b44
1186 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
dbeb92241a |
fix(deps): update module golang.org/x/sys to v0.41.0 (#7885)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [golang.org/x/sys](https://pkg.go.dev/golang.org/x/sys) | [`v0.40.0` → `v0.41.0`](https://cs.opensource.google/go/x/sys/+/refs/tags/v0.40.0...refs/tags/v0.41.0) |  |  | --- > [!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. 🔕 **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:eyJjcmVhdGVkSW5WZXIiOiI0Mi45NS4yIiwidXBkYXRlZEluVmVyIjoiNDIuOTUuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiU2tpcCBDaGFuZ2Vsb2ciLCJkZXBlbmRlbmNpZXMiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
e0ad47f3fe |
sdk/log/observ: guard LogProcessed with Enabled (#7848)
Guards SLP.LogProcessed with processed.Enabled(ctx) to avoid building metric options/attributes when the processed counter is disabled. BenchmarkSLP (noop MeterProvider): LogProcessedWithError: ~106 ns/op, 232 B/op, 3 allocs/op -> ~0.46 ns/op, 0 B/op, 0 allocs/op No behavior change when enabled; existing tests cover enabled path. I don't believe this is a "notable" change, so doesn't need a CHANGELOG entry. Issue: #7800 Co-authored-by: Robert Pająk <pellared@hotmail.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> |
||
|
|
a3a5317c5c |
Release v1.40.0 (#7859)
### Added - Add `Enabled` method to all synchronous instrument interfaces (`Float64Counter`, `Float64UpDownCounter`, `Float64Histogram`, `Float64Gauge`, `Int64Counter`, `Int64UpDownCounter`, `Int64Histogram`, `Int64Gauge`,) in `go.opentelemetry.io/otel/metric`. This stabilizes the synchronous instrument enabled feature, allowing users to check if an instrument will process measurements before performing computationally expensive operations. (#7763) - Add `AlwaysRecord` sampler in `go.opentelemetry.io/otel/sdk/trace`. (#7724) - Add `go.opentelemetry.io/otel/semconv/v1.39.0` package. The package contains semantic conventions from the `v1.39.0` version of the OpenTelemetry Semantic Conventions. See the [migration documentation](https://github.com/open-telemetry/opentelemetry-go/blob/298cbedf256b7a9ab3c21e41fc5e3e6d6e4e94aa/semconv/v1.39.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.38.0.` (#7783, #7789) ### Changed - `Exporter` in `go.opentelemetry.io/otel/exporter/prometheus` ignores metrics with the scope `go.opentelemetry.io/contrib/bridges/prometheus`. This prevents scrape failures when the Prometheus exporter is misconfigured to get data from the Prometheus bridge. (#7688) - Improve performance of concurrent histogram measurements in `go.opentelemetry.io/otel/sdk/metric`. (#7474) - Add experimental observability metrics in `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric`. (#7492) - Improve the concurrent performance of `HistogramReservoir` in `go.opentelemetry.io/otel/sdk/metric/exemplar` by 4x. (#7443) - Improve performance of concurrent synchronous gauge measurements in `go.opentelemetry.io/otel/sdk/metric`. (#7478) - Improve performance of concurrent exponential histogram measurements in `go.opentelemetry.io/otel/sdk/metric`. (#7702) - Improve the concurrent performance of `FixedSizeReservoir` in `go.opentelemetry.io/otel/sdk/metric/exemplar`. (#7447) - The `rpc.grpc.status_code` attribute in the experimental metrics emitted from `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` is replaced with the `rpc.response.status_code` attribute to align with the semantic conventions. (#7854) - The `rpc.grpc.status_code` attribute in the experimental metrics emitted from `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc` is replaced with the `rpc.response.status_code` attribute to align with the semantic conventions. (#7854) ### Fixed - Fix bad log message when key-value pairs are dropped because of key duplication in `go.opentelemetry.io/otel/sdk/log`. (#7662) - Fix `DroppedAttributes` on `Record` in `go.opentelemetry.io/otel/sdk/log` to not count the non-attribute key-value pairs dropped because of key duplication. (#7662) - Fix `SetAttributes` on `Record` in `go.opentelemetry.io/otel/sdk/log` to not log that attributes are dropped when they are actually not dropped. (#7662) - `WithHostID` detector in `go.opentelemetry.io/otel/sdk/resource` to use full path for `ioreg` command on Darwin (macOS). (#7818) - Fix missing `request.GetBody` in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` to correctly handle HTTP2 GOAWAY frame. (#7794) ### Deprecated - Deprecate `go.opentelemetry.io/otel/exporters/zipkin`. For more information, see the [OTel blog post deprecating the Zipkin exporter](https://opentelemetry.io/blog/2025/deprecating-zipkin-exporters/). (#7670) --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> |
||
|
|
3264bf171b |
refactor: modernize code (#7850)
Enable the [`modernize`](https://golangci-lint.run/docs/linters/configuration/#modernize) linter in the golangci-lint configuration and fix the reported issues by running `golangci-lint run --enable-only modernize --fix`. The `modernize` linter is internally the same as [gopls modernize](https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize). Similar to #7089. |
||
|
|
82bf2f87b4 |
fix(x): correct source filename in generated test files (#7766)
ref: https://github.com/open-telemetry/opentelemetry-go/pull/7735#discussion_r2667558812 |
||
|
|
714ca7c32e |
Optimize fixedsize reservoir (#7447)
~Depends on #7441, #7443~ This improves the concurrent performance of the fixed size reservoir's Offer function by 4x (i.e. 75% reduction). This improves the performance of Measure() for fixed-size reservoirs by 60% overall. Accomplish this by: * using a single atomic for count and next. This assumes that both can fit in a uint32. * only use a lock to guard changing `w` and `next` together. Offer benchmarks: ``` │ main.txt │ fixedsize.txt │ │ sec/op │ sec/op vs base │ FixedSizeReservoirOffer-24 185.25n ± 4% 45.58n ± 1% -75.40% (p=0.002 n=6) ``` Measure benchmarks: ``` │ main.txt │ fixedsize.txt │ │ sec/op │ sec/op vs base │ SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/0-24 175.45n ± 6% 67.01n ± 9% -61.81% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/1-24 170.25n ± 1% 69.82n ± 6% -58.99% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/10-24 167.40n ± 2% 64.52n ± 10% -61.46% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/0-24 173.55n ± 0% 69.17n ± 12% -60.14% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/1-24 169.50n ± 1% 68.55n ± 5% -59.56% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/10-24 166.95n ± 1% 65.82n ± 6% -60.58% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/0-24 168.85n ± 1% 67.99n ± 11% -59.73% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/1-24 173.50n ± 1% 66.69n ± 2% -61.56% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/10-24 171.30n ± 5% 67.73n ± 8% -60.46% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/0-24 168.90n ± 2% 67.69n ± 9% -59.92% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/1-24 173.35n ± 2% 68.25n ± 9% -60.63% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/10-24 172.95n ± 2% 70.90n ± 7% -59.01% (p=0.002 n=6) geomean 171.0n 67.83n -60.33% ``` --------- Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> Co-authored-by: Robert Pająk <pellared@hotmail.com> |
||
|
|
d45961bcda |
resource: specify full path for ioreg command in Darwin host ID reader (#7818)
Use full path when calling `ioreg` to mitigate potential malicious code execution in case of [Path Interception](https://attack.mitre.org/techniques/T1574/007/). Note that path interception typically requires the attacker to influence the environment or place a malicious executable earlier in $PATH, which, in this context, generally implies the script itself would need to be introduced/uploaded (or otherwise placed/executed) in the target environment for the attacker’s substitute `ioreg` to be reached during execution. Reference: - https://cwe.mitre.org/data/definitions/426.html |
||
|
|
61f0e4855c |
Bump semconv from v1.37.0 to v1.39.0 (#7789)
Fixes #7788 --------- Co-authored-by: Damien Mathieu <42@dmathieu.com> |
||
|
|
f98af48bcc |
sdk/log: fix "limit reached" logging and Record.DroppedAttributes (#7662)
Fixes: #6983 Enhance logging and error reporting in the log record attribute handling code, specifically around dropped attributes and duplicate key-value pairs. The main focus is to provide clearer warnings when key-value pairs are dropped due to duplication, and to ensure warnings are only logged when actual drops occur. --------- Co-authored-by: Robert Pająk <pellared@hotmail.com> |
||
|
|
b9920822c3 |
Add TestMergeIdempotent and TestEquivalentStability tests (#7764)
Verifies that Resource.Equivalent() and Resource.Equal() are independent of attribute insertion order, ensuring stable equality semantics and safe use as map keys.Ensures that merging a resource with itself is a no-op, preserving both attributes and schema URL --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Damien Mathieu <42@dmathieu.com> |
||
|
|
7706e21e4a |
metric: add Enabled method to synchronous instruments (#7763)
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/7681 |
||
|
|
7e1ff96f6c |
sdk/trace: Add AlwaysRecord sampler (#7724)
### Description - Add `AlwaysRecord` sampler to `sdk/trace`. ### Related issue Closes #7714. --------- Signed-off-by: Vitor Vasconcellos <vitor.vasconcellos@mercadolivre.com> Co-authored-by: Flc゛ <i@flc.io> Co-authored-by: Damien Mathieu <42@dmathieu.com> |
||
|
|
8b00c5fa9c |
fix(deps): update module golang.org/x/sys to v0.40.0 (#7761)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [golang.org/x/sys](https://pkg.go.dev/golang.org/x/sys) | [`v0.39.0` → `v0.40.0`](https://cs.opensource.google/go/x/sys/+/refs/tags/v0.39.0...refs/tags/v0.40.0) |  |  | --- > [!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 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:eyJjcmVhdGVkSW5WZXIiOiI0Mi42OS4xIiwidXBkYXRlZEluVmVyIjoiNDIuNjkuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiU2tpcCBDaGFuZ2Vsb2ciLCJkZXBlbmRlbmNpZXMiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
594a13d31e |
fix(deps): update module github.com/golangci/golangci-lint/v2 to v2.8.0 (#7758)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [github.com/golangci/golangci-lint/v2](https://redirect.github.com/golangci/golangci-lint) | `v2.7.2` → `v2.8.0` |  |  | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>golangci/golangci-lint (github.com/golangci/golangci-lint/v2)</summary> ### [`v2.8.0`](https://redirect.github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v280) [Compare Source](https://redirect.github.com/golangci/golangci-lint/compare/v2.7.2...v2.8.0) *Released on 2026-01-07* 1. Linters new features or changes - `godoc-lint`: from 0.10.2 to 0.11.1 (new rule: `require-stdlib-doclink`) - `golines`: from [`442fd00`](https://redirect.github.com/golangci/golangci-lint/commit/442fd0091d95) to 0.14.0 - `gomoddirectives`: from 0.7.1 to 0.8.0 - `gosec`: from [`daccba6`](https://redirect.github.com/golangci/golangci-lint/commit/daccba6b93d7) to 2.22.11 (new rule: `G116`) - `modernize`: from 0.39.0 to 0.40.0 (new analyzers: `stringscut`, `unsafefuncs`) - `prealloc`: from 1.0.0 to 1.0.1 (message changes) - `unqueryvet`: from 1.3.0 to 1.4.0 (new options: `check-aliased-wildcard`, `check-string-concat`, `check-format-strings`, `check-string-builder`, `check-subqueries`, `ignored-functions`, `sql-builders`) 2. Linters bug fixes - `go-critic`: from 0.14.2 to 0.14.3 - `go-errorlint`: from 1.8.0 to 1.9.0 - `govet`: from 0.39.0 to 0.40.0 - `protogetter`: from 0.3.17 to 0.3.18 - `revive`: add missing enable-default-rules setting 3. Documentation - docs: split installation page </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:eyJjcmVhdGVkSW5WZXIiOiI0Mi42OS4xIiwidXBkYXRlZEluVmVyIjoiNDIuNjkuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiU2tpcCBDaGFuZ2Vsb2ciLCJkZXBlbmRlbmNpZXMiXX0=--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: dmathieu <damien.mathieu@elastic.co> |
||
|
|
fa89e4c5ed |
address feedback from #7478 (#7718)
Addresses https://github.com/open-telemetry/opentelemetry-go/pull/7478#pullrequestreview-3583818326, which was left after the PR merged. |
||
|
|
279f1453fe |
Exponential histogram: defer computing count until collect (#7702)
Tiny part of https://github.com/open-telemetry/opentelemetry-go/pull/7535 It doesn't make much of a difference now, since we are bound by lock contention, but it matters once we move to atomics. ``` │ main.txt │ defercount.txt │ │ sec/op │ sec/op vs base │ SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/0-24 300.9n ± 7% 282.8n ± 10% ~ (p=0.394 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/1-24 300.0n ± 8% 307.5n ± 3% ~ (p=0.394 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/10-24 301.4n ± 5% 300.7n ± 5% ~ (p=0.485 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/0-24 286.4n ± 4% 284.8n ± 3% ~ (p=0.420 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/1-24 303.8n ± 3% 294.3n ± 2% -3.11% (p=0.006 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/10-24 297.9n ± 4% 291.6n ± 3% -2.10% (p=0.024 n=6) geomean 298.3n 293.5n -1.62% ``` |
||
|
|
68d2f72614 |
Use sync.Map and atomics for lastvalue aggregations (#7478)
Depends on https://github.com/open-telemetry/opentelemetry-go/pull/7474 This applies similar optimizations as https://github.com/open-telemetry/opentelemetry-go/pull/7427 to the last value aggregation. Changes for last value are contained in https://github.com/open-telemetry/opentelemetry-go/pull/7478/commits/27e14829716bfa5b6cfcdf4841c45c93bf5f0a91. Parallel benchmarks: ``` │ main.txt │ lv.txt │ │ sec/op │ sec/op vs base │ SyncMeasure/NoView/ExemplarsDisabled/Int64Gauge/Attributes/10-24 264.60n ± 3% 66.46n ± 1% -74.88% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Gauge/Attributes/10-24 270.25n ± 4% 69.69n ± 1% -74.21% (p=0.002 n=6) geomean 267.4n 68.05n -74.55% ``` Co-authored-by: Damien Mathieu <42@dmathieu.com> |
||
|
|
e8542ae7f3 |
Optimize histogram reservoir (#7443)
This improves the concurrent performance of the histogram reservoir's
Offer function by 4x (i.e. 75% reduction).
Accomplish this by locking each measurement, rather than locking around
the entire storage. Also, defer extracting the trace context from
context.Context until collection time. This improves the performance of
Offer, which is on the measure hot path. Exemplars are often
overwritten, so deferring the operation until Collect reduces the
overall work.
```
│ main.txt │ hist.txt │
│ sec/op │ sec/op vs base │
FixedSizeReservoirOffer-24 211.4n ± 3% 177.5n ± 3% -16.04% (p=0.002 n=6)
HistogramReservoirOffer-24 200.85n ± 2% 47.41n ± 2% -76.40% (p=0.002 n=6)
geomean 206.1n 91.73n -55.48%
```
Benchmarks for Measure:
```
│ main.txt │ histres.txt │
│ sec/op │ sec/op vs base │
SyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/0-24 436.7n ± 4% 114.8n ± 5% -73.72% (p=0.002 n=6)
SyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/10-24 472.2n ± 2% 169.7n ± 8% -64.08% (p=0.002 n=6)
SyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/0-24 431.0n ± 2% 116.3n ± 2% -73.01% (p=0.002 n=6)
SyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/10-24 470.9n ± 1% 171.0n ± 5% -63.70% (p=0.002 n=6)
```
I explored using a []atomic.Pointer[measurement], but this had similar
performance while being much more complex (needing a sync.Pool to
eliminate allocations). The single-threaded performance was also much
worse for that solution. See
https://github.com/open-telemetry/opentelemetry-go/compare/main...dashpole:optimize_histogram_reservoir_old.
---------
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
|
||
|
|
5b8a1d1294 |
sdk/log: improve Processor documentation (#7695)
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/7685 - Clarify EnabledParameters contents and Enabled decision semantics - Remove the requirement of Enabled that param cannot be held by the implementation as it is immutable - Refine OnEmit docs around context cancellation and retry handling - Update Shutdown docs to mention Processor/Exporter and OnEmit instead of Export |
||
|
|
f57bf14de2 |
Use sync.Map and atomics for fixed bucket histograms (#7474)
Implement a lockless histogram using atomics, and use a sync.Map for attribute access. This improves performance by ~2x. The design is very similar to https://github.com/open-telemetry/opentelemetry-go/pull/7427, but with one additional change to make the histogram data point itself atomic: * For cumulative histograms, which do not use a hot/cold limitedSyncMap, we use a hot/cold data point. This way, we maintain the keys in the sync map, but still ensure that collection gets a consistent view of measure() calls. Parallel benchmarks: ``` │ main.txt │ hist.txt │ │ sec/op │ sec/op vs base │ SyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/10-24 274.5n ± 2% 125.2n ± 5% -54.42% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/10-24 274.1n ± 2% 132.5n ± 2% -51.65% (p=0.002 n=6) geomean 274.3n 128.8n -53.05% ``` zero memory allocations before and after this change for Measure(). Omitted for brevity Benchmarks for collect: ``` │ main.txt │ hist.txt │ │ sec/op │ sec/op vs base │ Collect/NoView/Int64Histogram/1/Attributes/0-24 1.799µ ± 60% 1.702µ ± 6% ~ (p=1.000 n=6) Collect/NoView/Int64Histogram/1/Attributes/1-24 973.7n ± 28% 1720.0n ± 5% +76.65% (p=0.002 n=6) Collect/NoView/Int64Histogram/1/Attributes/10-24 881.0n ± 17% 1710.0n ± 5% +94.09% (p=0.002 n=6) Collect/NoView/Int64Histogram/10/Attributes/0-24 996.1n ± 14% 1781.5n ± 4% +78.85% (p=0.002 n=6) Collect/NoView/Int64Histogram/10/Attributes/1-24 1.029µ ± 67% 1.733µ ± 3% +68.42% (p=0.009 n=6) Collect/NoView/Int64Histogram/10/Attributes/10-24 1.533µ ± 18% 1.708µ ± 4% ~ (p=0.240 n=6) Collect/NoView/Float64Histogram/1/Attributes/0-24 1.222µ ± 120% 1.733µ ± 4% ~ (p=0.065 n=6) Collect/NoView/Float64Histogram/1/Attributes/1-24 893.3n ± 8% 1733.0n ± 4% +94.00% (p=0.002 n=6) Collect/NoView/Float64Histogram/1/Attributes/10-24 860.7n ± 2% 1732.0n ± 5% +101.23% (p=0.002 n=6) Collect/NoView/Float64Histogram/10/Attributes/0-24 852.5n ± 4% 1758.0n ± 3% +106.22% (p=0.002 n=6) Collect/NoView/Float64Histogram/10/Attributes/1-24 853.8n ± 3% 1725.0n ± 3% +102.04% (p=0.002 n=6) Collect/NoView/Float64Histogram/10/Attributes/10-24 843.4n ± 2% 1755.0n ± 4% +108.10% (p=0.002 n=6) geomean 1.028µ 1.732µ +68.46% │ main.txt │ hist.txt │ │ B/op │ B/op vs base │ Collect/NoView/Int64Histogram/1/Attributes/0-24 336.0 ± 0% 2131.0 ± 0% +534.23% (p=0.002 n=6) Collect/NoView/Int64Histogram/1/Attributes/1-24 336.0 ± 0% 2131.0 ± 0% +534.23% (p=0.002 n=6) Collect/NoView/Int64Histogram/1/Attributes/10-24 336.0 ± 0% 2131.0 ± 0% +534.23% (p=0.002 n=6) Collect/NoView/Int64Histogram/10/Attributes/0-24 336.0 ± 0% 2131.0 ± 0% +534.23% (p=0.002 n=6) Collect/NoView/Int64Histogram/10/Attributes/1-24 336.0 ± 0% 2131.0 ± 0% +534.23% (p=0.002 n=6) Collect/NoView/Int64Histogram/10/Attributes/10-24 336.0 ± 0% 2131.0 ± 0% +534.23% (p=0.002 n=6) Collect/NoView/Float64Histogram/1/Attributes/0-24 336.0 ± 0% 2131.0 ± 0% +534.23% (p=0.002 n=6) Collect/NoView/Float64Histogram/1/Attributes/1-24 336.0 ± 0% 2130.5 ± 0% +534.08% (p=0.002 n=6) Collect/NoView/Float64Histogram/1/Attributes/10-24 336.0 ± 0% 2131.0 ± 0% +534.23% (p=0.002 n=6) Collect/NoView/Float64Histogram/10/Attributes/0-24 336.0 ± 0% 2131.0 ± 0% +534.23% (p=0.002 n=6) Collect/NoView/Float64Histogram/10/Attributes/1-24 336.0 ± 0% 2131.0 ± 0% +534.23% (p=0.002 n=6) Collect/NoView/Float64Histogram/10/Attributes/10-24 336.0 ± 0% 2131.0 ± 0% +534.23% (p=0.002 n=6) geomean 336.0 2.081Ki +534.21% │ main.txt │ hist.txt │ │ allocs/op │ allocs/op vs base │ Collect/NoView/Int64Histogram/1/Attributes/0-24 5.000 ± 0% 6.000 ± 0% +20.00% (p=0.002 n=6) Collect/NoView/Int64Histogram/1/Attributes/1-24 5.000 ± 0% 6.000 ± 0% +20.00% (p=0.002 n=6) Collect/NoView/Int64Histogram/1/Attributes/10-24 5.000 ± 0% 6.000 ± 0% +20.00% (p=0.002 n=6) Collect/NoView/Int64Histogram/10/Attributes/0-24 5.000 ± 0% 6.000 ± 0% +20.00% (p=0.002 n=6) Collect/NoView/Int64Histogram/10/Attributes/1-24 5.000 ± 0% 6.000 ± 0% +20.00% (p=0.002 n=6) Collect/NoView/Int64Histogram/10/Attributes/10-24 5.000 ± 0% 6.000 ± 0% +20.00% (p=0.002 n=6) Collect/NoView/Float64Histogram/1/Attributes/0-24 5.000 ± 0% 6.000 ± 0% +20.00% (p=0.002 n=6) Collect/NoView/Float64Histogram/1/Attributes/1-24 5.000 ± 0% 6.000 ± 0% +20.00% (p=0.002 n=6) Collect/NoView/Float64Histogram/1/Attributes/10-24 5.000 ± 0% 6.000 ± 0% +20.00% (p=0.002 n=6) Collect/NoView/Float64Histogram/10/Attributes/0-24 5.000 ± 0% 6.000 ± 0% +20.00% (p=0.002 n=6) Collect/NoView/Float64Histogram/10/Attributes/1-24 5.000 ± 0% 6.000 ± 0% +20.00% (p=0.002 n=6) Collect/NoView/Float64Histogram/10/Attributes/10-24 5.000 ± 0% 6.000 ± 0% +20.00% (p=0.002 n=6) geomean 5.000 6.000 +20.00% ``` Collect does get substantially worse, but Measure is expected to be called significantly more often than collect. --------- Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com> |
||
|
|
545883eb6a |
fix(deps): update opentelemetry-go monorepo to v0.15.0 (#7690)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [go.opentelemetry.io/otel/log](https://redirect.github.com/open-telemetry/opentelemetry-go) | `v0.14.0` -> `v0.15.0` |  |  | | [go.opentelemetry.io/otel/sdk/log](https://redirect.github.com/open-telemetry/opentelemetry-go) | `v0.14.0` -> `v0.15.0` |  |  | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>open-telemetry/opentelemetry-go (go.opentelemetry.io/otel/log)</summary> ### [`v0.15.0`](https://redirect.github.com/open-telemetry/opentelemetry-go/releases/tag/v0.15.0) [Compare Source](https://redirect.github.com/open-telemetry/opentelemetry-go/compare/v0.14.0...v0.15.0) ##### Added - The `WithIDGenerator` `TracerProviderOption` is added to the `go.opentelemetry.io/otel/trace` package to configure an `IDGenerator` for the `TracerProvider`. ([#​1363](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1363)) ##### Changed - The Zipkin exporter now uses the Span status code to determine. ([#​1328](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1328)) - `NewExporter` and `Start` functions in `go.opentelemetry.io/otel/exporters/otlp` now receive `context.Context` as a first parameter. ([#​1357](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1357)) - Move the OpenCensus example into `example` directory. ([#​1359](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1359)) - Moved the SDK's `internal.IDGenerator` interface in to the `sdk/trace` package to enable support for externally-defined ID generators. ([#​1363](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1363)) - Bump `github.com/google/go-cmp` from 0.5.3 to 0.5.4 ([#​1374](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1374)) - Bump `github.com/golangci/golangci-lint` in `/internal/tools` ([#​1375](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1375)) ##### Fixed - Metric SDK `SumObserver` and `UpDownSumObserver` instruments correctness fixes. ([#​1381](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1381)) # Raw changes made between v0.14.0 and v0.15.0 [`61e07a0`](https://redirect.github.com/open-telemetry/opentelemetry-go/commit/61e07a0d629ff6a0c8f7054205972adc09540a53) (HEAD -> master, tag: v0.15.0, tag: sdk/v0.15.0, tag: exporters/trace/zipkin/v0.15.0, tag: exporters/trace/jaeger/v0.15.0, tag: exporters/stdout/v0.15.0, tag: exporters/otlp/v0.15.0, tag: exporters/metric/prometheus/v0.15.0, tag: example/zipkin/v0.15.0, tag: example/prometheus/v0.15.0, tag: example/otel-collector/v0.15.0, tag: example/opencensus/v0.15.0, tag: example/namedtracer/v0.15.0, tag: example/jaeger/v0.15.0, tag: example/basic/v0.15.0, tag: bridge/opentracing/v0.15.0, tag: bridge/opencensus/v0.15.0, upstream/master, origin/master, origin/HEAD) Release v0.15.0 ([#​1392](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1392)) [`599c080`](https://redirect.github.com/open-telemetry/opentelemetry-go/commit/599c0803ccf2113875e7934b6bf3fdbf5733494b) Fix typo in readme ([#​1390](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1390)) [`eb28005`](https://redirect.github.com/open-telemetry/opentelemetry-go/commit/eb28005e2fad10fe050b777a585b64be8cf593cb) Metric Accumulator fix for SumObservers ([#​1381](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1381)) [`970755b`](https://redirect.github.com/open-telemetry/opentelemetry-go/commit/970755bd087801619575b7473806356818e24e15) Enable support for externally-defined ID generators ([#​1363](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1363)) [`0021ab0`](https://redirect.github.com/open-telemetry/opentelemetry-go/commit/0021ab0a3a47e4abb116bdb227fd77e912006b9e) Rework proto generation ([#​1371](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1371)) [`787e3f4`](https://redirect.github.com/open-telemetry/opentelemetry-go/commit/787e3f457a07e3659a7c08a0bd886505da1affab) chore(zipkin-exporter): relay on the status code for the request but still read the response body. ([#​1328](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1328)) [`66db2d8`](https://redirect.github.com/open-telemetry/opentelemetry-go/commit/66db2d845ba72bae8fcc1b3d43965470cbe8f5c3) (johananl/master) Build examples last ([#​1370](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1370)) [`958041d`](https://redirect.github.com/open-telemetry/opentelemetry-go/commit/958041ddf619a1282e92cfd4c50859f2bc71f9c8) Bump github.com/golangci/golangci-lint in /internal/tools ([#​1375](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1375)) [`e1ff2d1`](https://redirect.github.com/open-telemetry/opentelemetry-go/commit/e1ff2d15cfdebe3516d241048f40baa49980f60f) Bump github.com/google/go-cmp from 0.5.3 to 0.5.4 ([#​1374](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1374)) [`5d0372d`](https://redirect.github.com/open-telemetry/opentelemetry-go/commit/5d0372dd2ed447fed6fd036f219d208f77d5468d) Fix typo in comment ([#​1377](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1377)) [`55ff277`](https://redirect.github.com/open-telemetry/opentelemetry-go/commit/55ff27787da2cdbdd5cde3564e57841267757e58) Fix golint issue caused by typo ([#​1372](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1372)) [`5a728db`](https://redirect.github.com/open-telemetry/opentelemetry-go/commit/5a728db2e9713b66615943129568834c5af86ff8) Another batch of cleanups in otlp exporter ([#​1357](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1357)) [`e081978`](https://redirect.github.com/open-telemetry/opentelemetry-go/commit/e0819780f9d4ea1e8169109cd71b848fe08f788c) Move opencensus example to the example directory ([#​1359](https://redirect.github.com/open-telemetry/opentelemetry-go/issues/1359)) </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:eyJjcmVhdGVkSW5WZXIiOiI0Mi4zMi4yIiwidXBkYXRlZEluVmVyIjoiNDIuMzIuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiU2tpcCBDaGFuZ2Vsb2ciLCJkZXBlbmRlbmNpZXMiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
6ce14298b9 |
Release v1.39.0 (#7676)
## Overview ### Added - Greatly reduce the cost of recording metrics in `go.opentelemetry.io/otel/sdk/metric` using hashing for map keys. (#7175) - Add `WithInstrumentationAttributeSet` option to `go.opentelemetry.io/otel/log`, `go.opentelemetry.io/otel/metric`, and `go.opentelemetry.io/otel/trace` packages. This provides a concurrent-safe and performant alternative to `WithInstrumentationAttributes` by accepting a pre-constructed `attribute.Set`. (#7287) - Add experimental observability for the Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus`. Check the `go.opentelemetry.io/otel/exporters/prometheus/internal/x` package documentation for more information. (#7345) - Add experimental observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#7353) - Add temporality selector functions `DeltaTemporalitySelector`, `CumulativeTemporalitySelector`, `LowMemoryTemporalitySelector` to `go.opentelemetry.io/otel/sdk/metric`. (#7434) - Add experimental observability metrics for simple log processor in `go.opentelemetry.io/otel/sdk/log`. (#7548) - Add experimental observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#7459) - Add experimental observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#7486) - Add experimental observability metrics for simple span processor in `go.opentelemetry.io/otel/sdk/trace`. (#7374) - Add experimental observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#7512) - Add experimental observability metrics for manual reader in `go.opentelemetry.io/otel/sdk/metric`. (#7524) - Add experimental observability metrics for periodic reader in `go.opentelemetry.io/otel/sdk/metric`. (#7571) - Support `OTEL_EXPORTER_OTLP_LOGS_INSECURE` and `OTEL_EXPORTER_OTLP_INSECURE` environmental variables in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#7608) - Add `Enabled` method to the `Processor` interface in `go.opentelemetry.io/otel/sdk/log`. All `Processor` implementations now include an `Enabled` method. (#7639) - The `go.opentelemetry.io/otel/semconv/v1.38.0` package. The package contains semantic conventions from the `v1.38.0` version of the OpenTelemetry Semantic Conventions. See the [migration documentation](./semconv/v1.38.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.37.0.`(#7648) ### Changed - `Distinct` in `go.opentelemetry.io/otel/attribute` is no longer guaranteed to uniquely identify an attribute set. Collisions between `Distinct` values for different Sets are possible with extremely high cardinality (billions of series per instrument), but are highly unlikely. (#7175) - `WithInstrumentationAttributes` in `go.opentelemetry.io/otel/trace` synchronously de-duplicates the passed attributes instead of delegating it to the returned `TracerOption`. (#7266) - `WithInstrumentationAttributes` in `go.opentelemetry.io/otel/meter` synchronously de-duplicates the passed attributes instead of delegating it to the returned `MeterOption`. (#7266) - `WithInstrumentationAttributes` in `go.opentelemetry.io/otel/log` synchronously de-duplicates the passed attributes instead of delegating it to the returned `LoggerOption`. (#7266) - Rename the `OTEL_GO_X_SELF_OBSERVABILITY` environment variable to `OTEL_GO_X_OBSERVABILITY` in `go.opentelemetry.io/otel/sdk/trace`, `go.opentelemetry.io/otel/sdk/log`, and `go.opentelemetry.io/otel/exporters/stdout/stdouttrace`. (#7302) - Improve performance of histogram `Record` in `go.opentelemetry.io/otel/sdk/metric` when min and max are disabled using `NoMinMax`. (#7306) - Improve error handling for dropped data during translation by using `prometheus.NewInvalidMetric` in `go.opentelemetry.io/otel/exporters/prometheus`. ⚠️ **Breaking Change:** Previously, these cases were only logged and scrapes succeeded. Now, when translation would drop data (e.g., invalid label/value), the exporter emits a `NewInvalidMetric`, and Prometheus scrapes **fail with HTTP 500** by default. To preserve the prior behavior (scrapes succeed while errors are logged), configure your Prometheus HTTP handler with: `promhttp.HandlerOpts{ ErrorHandling: promhttp.ContinueOnError }`. (#7363) - Replace fnv hash with xxhash in `go.opentelemetry.io/otel/attribute` for better performance. (#7371) - The default `TranslationStrategy` in `go.opentelemetry.io/exporters/prometheus` is changed from `otlptranslator.NoUTF8EscapingWithSuffixes` to `otlptranslator.UnderscoreEscapingWithSuffixes`. (#7421) - Improve performance of concurrent measurements in `go.opentelemetry.io/otel/sdk/metric`. (#7427) - Include W3C TraceFlags (bits 0–7) in the OTLP `Span.Flags` field in `go.opentelemetry.io/exporters/otlp/otlptrace/otlptracehttp` and `go.opentelemetry.io/exporters/otlp/otlptrace/otlptracegrpc`. (#7438) - The `ErrorType` function in `go.opentelemetry.io/otel/semconv/v1.37.0` now handles custom error types. If an error implements an `ErrorType() string` method, the return value of that method will be used as the error type. (#7442) ### Fixed - 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. (#7300) - The equality of `attribute.Set` when using the `Equal` method is not affected by the user overriding the empty set pointed to by `attribute.EmptySet` in `go.opentelemetry.io/otel/attribute`. (#7357) - Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#7372) - Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#7372) - Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#7372) - Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#7372) - Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#7372) - Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#7372) - Fix `AddAttributes`, `SetAttributes`, `SetBody` on `Record` in `go.opentelemetry.io/otel/sdk/log` to not mutate input. (#7403) - Do not double record measurements of `RecordSet` methods in `go.opentelemetry.io/otel/semconv/v1.37.0`. (#7655) - Do not double record measurements of `RecordSet` methods in `go.opentelemetry.io/otel/semconv/v1.36.0`. (#7656) ### Removed - Drop support for [Go 1.23]. (#7274) - Remove the `FilterProcessor` interface in `go.opentelemetry.io/otel/sdk/log`. The `Enabled` method has been added to the `Processor` interface instead. All `Processor` implementations must now implement the `Enabled` method. Custom processors that do not filter records can implement `Enabled` to return `true`. (#7639) |
||
|
|
12e421a706 |
sdk/log: move Enabled method from FilterProcessor to Processor (#7639)
Fixes #7617 Simplify the Logs SDK by unifying processor capabilities into a single interface. - Add `Enabled(ctx context.Context, p EnabledParameters) bool` to `sdk/log.Processor`. - Remove `sdk/log.FilterProcessor` interface. `Processor` implementations must now implement the `Enabled` method. Custom processors that do not filter records can implement `Enabled` to return `true`. |
||
|
|
5982f16d24 |
fix(deps): update module golang.org/x/sys to v0.39.0 (#7684)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | golang.org/x/sys | `v0.38.0` -> `v0.39.0` |  |  | --- > [!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 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:eyJjcmVhdGVkSW5WZXIiOiI0Mi4zMi4yIiwidXBkYXRlZEluVmVyIjoiNDIuMzIuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiU2tpcCBDaGFuZ2Vsb2ciLCJkZXBlbmRlbmNpZXMiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: dmathieu <42@dmathieu.com> |
||
|
|
ca53078985 |
Instrument the SimpleLogProcessor from sdk/log (#7548)
ref #7016 ```txt goarch: amd64 pkg: go.opentelemetry.io/otel/sdk/log cpu: Intel(R) Core(TM) i7-14700 │ before.txt │ .\after_res.txt │ │ sec/op │ sec/op vs base │ SimpleProcessorObservability/NoObservability-28 27.68n ± 4% SimpleProcessorObservability/Observability-28 27.39n ± 5% geomean 27.68n 27.38n ? ¹ ² ¹ benchmark set differs from baseline; geomeans may not be comparable ² ratios must be >0 to compute geomean │ before.txt │ .\after_res.txt │ │ B/op │ B/op vs base │ SimpleProcessorObservability/NoObservability-28 0.000 ± 0% SimpleProcessorObservability/Observability-28 0.000 ± 0% geomean ¹ ? ² ¹ ³ ¹ summaries must be >0 to compute geomean ² benchmark set differs from baseline; geomeans may not be comparable ³ ratios must be >0 to compute geomean │ before.txt │ .\after_res.txt │ │ allocs/op │ allocs/op vs base │ SimpleProcessorObservability/NoObservability-28 0.000 ± 0% SimpleProcessorObservability/Observability-28 0.000 ± 0% geomean ¹ ? ² ¹ ³ ¹ summaries must be >0 to compute geomean ² benchmark set differs from baseline; geomeans may not be comparable ³ ratios must be >0 to compute geomean ``` --------- Co-authored-by: Flc゛ <i@flc.io> Co-authored-by: Cijo Thomas <cithomas@microsoft.com> Co-authored-by: Robert Pająk <pellared@hotmail.com> Co-authored-by: dmathieu <42@dmathieu.com> |
||
|
|
49292857b7 |
Replace fnv with xxhash (#7497)
**Objective**: - Performance comparison between fnv and xxhash in terms of ops/sec, allocations and collisions - Implement xxhash according to first objective **Changes**: - fnv is replaced by xxhash. Perform stats: - **Collision**: No collision upto 100M - **Allocations**: Same in both cases - **Ops/sec**: xxhash performed better in cases with medium to large strings **Benchmarks**: ``` benchstat old.txt new.txt goos: darwin goarch: arm64 pkg: go.opentelemetry.io/otel/attribute cpu: Apple M2 │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ NewSet-8 205.5n ± 1% 229.4n ± 1% +11.61% (p=0.002 n=6) NewSetSmallStrings-8 160.5n ± 1% 169.0n ± 5% +5.26% (p=0.002 n=6) NewSetMediumStrings-8 263.8n ± 6% 185.0n ± 1% -29.89% (p=0.002 n=6) NewSetLargeStrings-8 426.4n ± 9% 210.2n ± 1% -50.72% (p=0.002 n=6) NewSetVeryLargeStrings-8 1012.5n ± 7% 238.7n ± 2% -76.43% (p=0.002 n=6) NewSetHugeStrings-8 3622.0n ± 8% 397.1n ± 1% -89.04% (p=0.002 n=6) geomean 488.6n 228.6n -53.21% │ old.txt │ new.txt │ │ B/op │ B/op vs base │ NewSet-8 448.0 ± 0% 448.0 ± 0% ~ (p=1.000 n=6) ¹ NewSetSmallStrings-8 320.0 ± 0% 320.0 ± 0% ~ (p=1.000 n=6) ¹ NewSetMediumStrings-8 320.0 ± 0% 320.0 ± 0% ~ (p=1.000 n=6) ¹ NewSetLargeStrings-8 320.0 ± 0% 320.0 ± 0% ~ (p=1.000 n=6) ¹ NewSetVeryLargeStrings-8 320.0 ± 0% 320.0 ± 0% ~ (p=1.000 n=6) ¹ NewSetHugeStrings-8 320.0 ± 0% 320.0 ± 0% ~ (p=1.000 n=6) ¹ geomean 338.5 338.5 +0.00% ¹ all samples are equal │ old.txt │ new.txt │ │ allocs/op │ allocs/op vs base │ NewSet-8 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=6) ¹ NewSetSmallStrings-8 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=6) ¹ NewSetMediumStrings-8 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=6) ¹ NewSetLargeStrings-8 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=6) ¹ NewSetVeryLargeStrings-8 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=6) ¹ NewSetHugeStrings-8 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=6) ¹ geomean 1.000 1.000 +0.00% ¹ all samples are equal ``` Previous implementation for reference: https://github.com/open-telemetry/opentelemetry-go/blame/d0483a7c89d936dcced557fb523465daeac16967/CHANGELOG.md#L16 --------- Co-authored-by: Robert Pająk <pellared@hotmail.com> |
||
|
|
d1ebd7b9ff |
fix(deps): update golang.org/x (#7590)
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | golang.org/x/sync | `v0.17.0` -> `v0.18.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | golang.org/x/sys | `v0.37.0` -> `v0.38.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](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:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNTkuNCIsInVwZGF0ZWRJblZlciI6IjQxLjE1OS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
fe47da3017 |
sdk/log: update ExampleProcessor_eventName to use otel.event.name attribute (#7568)
Per https://github.com/open-telemetry/semantic-conventions/issues/2913 and https://github.com/open-telemetry/semantic-conventions/pull/2914 Related semconv PR: - https://github.com/open-telemetry/semantic-conventions/pull/3034 |
||
|
|
a80ee2de89 |
feat: instrument periodic reader from sdk/metric (#7571)
Resolve: #7010 ### Benchmarks ``` ➜ benchstat /tmp/bench_disabled.txt /tmp/bench_enabled.txt goos: darwin goarch: arm64 pkg: go.opentelemetry.io/otel/sdk/metric cpu: Apple M1 Max │ /tmp/bench_disabled.txt │ /tmp/bench_enabled.txt │ │ sec/op │ sec/op vs base │ PeriodicReaderInstrumentation/NoObservability-10 17.00µ ± 0% 17.02µ ± 0% ~ (p=0.400 n=50) PeriodicReaderInstrumentation/Observability-10 17.48µ ± 0% 17.47µ ± 0% ~ (p=0.361 n=50) geomean 17.24µ 17.24µ +0.04% │ /tmp/bench_disabled.txt │ /tmp/bench_enabled.txt │ │ B/op │ B/op vs base │ PeriodicReaderInstrumentation/NoObservability-10 47.63Ki ± 0% 47.63Ki ± 0% ~ (p=0.159 n=50) PeriodicReaderInstrumentation/Observability-10 47.65Ki ± 0% 47.65Ki ± 0% ~ (p=0.780 n=50) geomean 47.64Ki 47.64Ki +0.00% │ /tmp/bench_disabled.txt │ /tmp/bench_enabled.txt │ │ allocs/op │ allocs/op vs base │ PeriodicReaderInstrumentation/NoObservability-10 376.0 ± 0% 376.0 ± 0% ~ (p=1.000 n=50) ¹ PeriodicReaderInstrumentation/Observability-10 376.0 ± 0% 376.0 ± 0% ~ (p=1.000 n=50) ¹ geomean 376.0 376.0 +0.00% ¹ all samples are equal ``` --------- Co-authored-by: Damien Mathieu <42@dmathieu.com> |
||
|
|
68190cc102 |
Instrument manual reader from sdk/metric (#7524)
Resolve: #7009 ### Benchmarks ``` ➜ benchstat /tmp/manual_bench_disabled.txt /tmp/manual_bench_enabled.txt goos: darwin goarch: arm64 pkg: go.opentelemetry.io/otel/sdk/metric cpu: Apple M1 Max │ /tmp/manual_bench_disabled.txt │ /tmp/manual_bench_enabled.txt │ │ sec/op │ sec/op vs base │ ManualReaderInstrumentation/NoObservability-10 35.98µ ± 14% 36.29µ ± 11% ~ (p=0.665 n=40) ManualReaderInstrumentation/Observability-10 26.98µ ± 9% 28.23µ ± 3% ~ (p=0.207 n=40) geomean 31.16µ 32.01µ +2.73% │ /tmp/manual_bench_disabled.txt │ /tmp/manual_bench_enabled.txt │ │ B/op │ B/op vs base │ ManualReaderInstrumentation/NoObservability-10 49.24Ki ± 1% 49.24Ki ± 1% ~ (p=1.000 n=40) ManualReaderInstrumentation/Observability-10 51.78Ki ± 0% 51.78Ki ± 0% ~ (p=0.485 n=40) geomean 50.50Ki 50.50Ki +0.00% │ /tmp/manual_bench_disabled.txt │ /tmp/manual_bench_enabled.txt │ │ allocs/op │ allocs/op vs base │ ManualReaderInstrumentation/NoObservability-10 381.0 ± 1% 381.0 ± 1% ~ (p=1.000 n=40) ManualReaderInstrumentation/Observability-10 387.0 ± 0% 387.0 ± 1% ~ (p=0.485 n=40) geomean 384.0 384.0 +0.00% ``` --------- Co-authored-by: Damien Mathieu <42@dmathieu.com> Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> |
||
|
|
e308db8adf |
chore: handle Float64Histogram in log/observe errMeter (#7555)
Calling other metrics from this meter provider should be a noop, not a panic. This fixes the test suite in https://github.com/open-telemetry/opentelemetry-go/pull/7524 |
||
|
|
b15942f345 |
Added the internal/observ package to log (#7532)
- part of #7016 ```txt goos: darwin goarch: arm64 pkg: go.opentelemetry.io/otel/sdk/log/internal/observ cpu: Apple M3 │ bench_res.txt │ │ sec/op │ SLP/LogProcessed-8 0.8900n ± 2% SLP/LogProcessedWithError-8 119.2n ± 5% geomean 10.30n │ bench_res.txt │ │ B/op │ SLP/LogProcessed-8 0.000 ± 0% SLP/LogProcessedWithError-8 232.0 ± 0% geomean ¹ ¹ summaries must be >0 to compute geomean │ bench_res.txt │ │ allocs/op │ SLP/LogProcessed-8 0.000 ± 0% SLP/LogProcessedWithError-8 3.000 ± 0% geomean ¹ ¹ summaries must be >0 to compute geomean ``` --------- Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> Co-authored-by: Damien Mathieu <42@dmathieu.com> |
||
|
|
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` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | golang.org/x/exp/typeparams | indirect | digest | `27f1f14` -> `90e834f` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | golang.org/x/net | indirect | minor | `v0.45.0` -> `v0.46.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | golang.org/x/telemetry | indirect | digest | `ca0c2a9` -> `24f779f` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | golang.org/x/tools | require | minor | `v0.37.0` -> `v0.38.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](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> |
||
|
|
eb7ec3eb96 |
Simulate failures for histogram creation paths without risking a nil-interface panic (#7518)
Manual reader need to add Observability metric: #7009 . If the code under test calls meter.Float64Histogram(...), the call will be dispatched to the embedded mapi.Meter interface field, which is nil → runtime panic (nil interface method call). ``` go test -timeout 60s -race ./sdk/... ok go.opentelemetry.io/otel/sdk (cached) ? go.opentelemetry.io/otel/sdk/instrumentation [no test files] ok go.opentelemetry.io/otel/sdk/internal/x (cached) ok go.opentelemetry.io/otel/sdk/resource (cached) ok go.opentelemetry.io/otel/sdk/trace 1.995s ? go.opentelemetry.io/otel/sdk/trace/internal [no test files] ok go.opentelemetry.io/otel/sdk/trace/internal/env (cached) 2025/10/14 23:56:39 internal_logging.go:50: "msg"="Setting meter provider to its current value. No delegate will be configured" "error"="no delegate configured in meter provider" --- FAIL: TestBSPCallback (0.00s) panic: runtime error: invalid memory address or nil pointer dereference [recovered, repanicked] [signal SIGSEGV: segmentation violation code=0x2 addr=0x28 pc=0x1044c8c24] ``` **Resolution**: Add `Float64Histogram` to `errMeter` **Context**: https://github.com/open-telemetry/opentelemetry-go/pull/7500#discussion_r2431050902 |
||
|
|
f7d2882606 |
feat: sdk/trace: span processed metric for simple span processor (#7374)
Fixes #7004 This PR adds support for experimental otel.sdk.processor.span.processed metric in simple span processor. Definition of metric at: https://github.com/open-telemetry/semantic-conventions/blob/v1.36.0/docs/otel/sdk-metrics.md Experimental metrics are behind a feature flag: `OTEL_GO_X_OBSERVABILITY` <details> <summary>Observability Implementation Checklist</summary> ## Observability Implementation Checklist Based on the [project Observability guidelines](https://github.com/open-telemetry/opentelemetry-go/blob/e4ab3141123d0811125a69823dbbe4d9ec5a9b8f/CONTRIBUTING.md#observability), ensure the following are completed: ### Environment Variable Activation * [x] Observability features are disabled by default * [x] Features are activated through the `OTEL_GO_X_OBSERVABILITY` environment variable * [x] Use consistent pattern with `x.Observability.Enabled()` check [^1] * [x] Follow established experimental feature pattern [^2][^3] [^1]: https://github.com/open-telemetry/opentelemetry-go/blob/e4ab3141123d0811125a69823dbbe4d9ec5a9b8f/exporters/stdout/stdouttrace/internal/observ/instrumentation.go#L101-L103 [^2]: https://github.com/open-telemetry/opentelemetry-go/blob/e4ab3141123d0811125a69823dbbe4d9ec5a9b8f/exporters/stdout/stdouttrace/internal/x/x.go [^3]: https://github.com/open-telemetry/opentelemetry-go/blob/e4ab3141123d0811125a69823dbbe4d9ec5a9b8f/sdk/internal/x/x.go ### Encapsulation * [x] Instrumentation is encapsulated within a dedicated `struct` (e.g., [`Instrumentation`](https://github.com/open-telemetry/opentelemetry-go/blob/e4ab3141123d0811125a69823dbbe4d9ec5a9b8f/exporters/stdout/stdouttrace/internal/observ/instrumentation.go#L86-L94)) * [x] Instrumentation is not mixed into the instrumented component * [x] Instrumentation code is in its own file or package if complex/reused * [x] Instrumentation setup doesn't bloat the main component code ### Initialization * [x] Initialization is only done when observability is enabled * [x] Setup is explicit and side-effect free * [x] Return errors from initialization when appropriate * [x] Use the global Meter provider (e.g., `otel.GetMeterProvider()`) * [x] Include proper meter configuration with: * [x] Instrumentation package name is used for the Meter * [x] Instrumentation version (e.g. [`Version`](https://github.com/open-telemetry/opentelemetry-go/blob/e4ab3141123d0811125a69823dbbe4d9ec5a9b8f/exporters/stdout/stdouttrace/internal/observ/instrumentation.go#L40-L43)) * [x] Schema URL (e.g. [`SchemaURL`](https://github.com/open-telemetry/opentelemetry-go/blob/e4ab3141123d0811125a69823dbbe4d9ec5a9b8f/exporters/stdout/stdouttrace/internal/observ/instrumentation.go#L36-L38)) ### Performance * [x] Little to no overhead when observability is disabled * [x] Expensive operations are only executed when observability is enabled * [x] When enabled, instrumentation code paths are optimized to reduce allocation/computation overhead #### Attribute and Option Allocation Management * [x] Use `sync.Pool` for attribute slices and options with dynamic attributes * [x] Pool objects are properly reset before returning to pool * [x] Pools are scoped for maximum efficiency while ensuring correctness #### Caching * [x] Static attribute sets known at compile time are pre-computed and cached * [x] Common attribute combinations use lookup tables/maps #### Benchmarking * [x] Benchmarks provided for all instrumentation code * [ ] Benchmark scenarios include both enabled and disabled observability * [x] Benchmark results show impact on allocs/op, B/op, and ns/op (use `b.ReportAllocs()` in benchmarks) ### Error Handling and Robustness * [x] Errors are reported back to caller when possible * [x] Partial failures are handled gracefully * [x] Use partially initialized components when available * [x] Return errors to caller instead of only using `otel.Handle()` * [x] Use `otel.Handle()` only when component cannot report error to user ### Context Propagation * [x] Observability measurements receive the context from the function being measured (don't break context propagation by using `context.Background()`) ### Semantic Conventions Compliance * [x] All metrics follow [OpenTelemetry Semantic Conventions](https://github.com/open-telemetry/semantic-conventions/blob/5ee549b1ce30fe11fcb9b7e3bd35ebfb363f467f/docs/otel/sdk-metrics.md) * [x] Use the [`otelconv`](https://pkg.go.dev/go.opentelemetry.io/otel@v1.38.0/semconv/v1.37.0/otelconv) convenience package for metric semantic conventions * [x] Component names follow semantic conventions * [x] Use package path scope type as stable identifier for non-standard components * [x] Component names are stable unique identifiers * [x] Use global counter for uniqueness if necessary * [x] Component ID counter is resettable for deterministic testing ### Testing * [x] Use deterministic testing with isolated state * [x] Restore previous state after tests (`t.Cleanup()`) * [x] Isolate meter provider for testing * [x] Use `t.Setenv()` for environment variable testing * [x] Reset component ID counter for deterministic component names * [x] Test order doesn't affect results </details> ### Benchmarks ```console > benchstat bmark.result goos: darwin goarch: arm64 pkg: go.opentelemetry.io/otel/sdk/trace/internal/observ cpu: Apple M1 Pro │ bmark.result │ │ sec/op │ SSP/SpanProcessed-8 146.7n ± 15% SSP/SpanProcessedWithError-8 205.1n ± 3% geomean 173.5n │ bmark.result │ │ B/op │ SSP/SpanProcessed-8 280.0 ± 0% SSP/SpanProcessedWithError-8 408.0 ± 0% geomean 338.0 │ bmark.result │ │ allocs/op │ SSP/SpanProcessed-8 3.000 ± 0% SSP/SpanProcessedWithError-8 3.000 ± 0% geomean 3.000 ``` --------- Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> |
||
|
|
b5b6989c7a |
sdk/log: Fix AddAttributes, SetAttributes, SetBody on Record to not mutate input (#7403)
Fixes #7364 The allocations happen only when necessary. This is when deduplication happens or data is truncated because of the limits. ``` goos: linux goarch: amd64 pkg: go.opentelemetry.io/otel/sdk/log cpu: 13th Gen Intel(R) Core(TM) i7-13800H │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ AddAttributes/Single/NoLimits-20 57.91n ± 19% 29.12n ± 5% -49.71% (p=0.000 n=10) AddAttributes/Single/AllowDuplicates-20 24.21n ± 2% 24.46n ± 17% +1.05% (p=0.011 n=10) AddAttributes/Unique/NoLimits-20 174.6n ± 8% 184.2n ± 7% +5.47% (p=0.027 n=10) AddAttributes/Unique/AllowDuplicates-20 69.79n ± 22% 67.83n ± 9% -2.81% (p=0.019 n=10) AddAttributes/Deduplication/Enabled-20 144.5n ± 4% 165.8n ± 4% +14.71% (p=0.000 n=10) AddAttributes/NestedDeduplication/Enabled-20 439.2n ± 2% 792.4n ± 11% +80.41% (p=0.000 n=10) AddAttributes/NestedDeduplication/Disabled-20 162.60n ± 1% 86.84n ± 5% -46.59% (p=0.000 n=10) AddAttributes/Deduplication/Disabled-20 68.15n ± 8% 67.59n ± 8% ~ (p=0.190 n=10) AddAttributes/CountLimit/Hit-20 629.1n ± 4% 621.0n ± 7% ~ (p=0.325 n=10) AddAttributes/CountLimit/NotHit-20 914.6n ± 7% 944.2n ± 13% ~ (p=0.393 n=10) AddAttributes/ValueLimit/Hit-20 133.5n ± 2% 162.1n ± 2% +21.43% (p=0.000 n=10) AddAttributes/ValueLimit/NotHit-20 115.8n ± 9% 131.2n ± 8% +13.26% (p=0.000 n=10) SetAttributes/Single/NoLimits-20 59.38n ± 2% 28.89n ± 22% -51.36% (p=0.000 n=10) SetAttributes/Single/AllowDuplicates-20 24.19n ± 1% 24.30n ± 2% ~ (p=0.867 n=10) SetAttributes/Unique/NoLimits-20 179.8n ± 2% 200.7n ± 6% +11.66% (p=0.000 n=10) SetAttributes/Unique/AllowDuplicates-20 72.65n ± 6% 71.91n ± 6% ~ (p=0.218 n=10) SetAttributes/Deduplication/Enabled-20 143.9n ± 6% 188.5n ± 12% +30.96% (p=0.000 n=10) SetAttributes/Deduplication/Disabled-20 77.68n ± 12% 69.20n ± 8% -10.92% (p=0.008 n=10) SetAttributes/NestedDeduplication/Enabled-20 443.7n ± 11% 770.8n ± 7% +73.75% (p=0.000 n=10) SetAttributes/NestedDeduplication/Disabled-20 172.60n ± 4% 91.73n ± 11% -46.85% (p=0.000 n=10) SetAttributes/CountLimit/Hit-20 629.1n ± 2% 631.3n ± 7% ~ (p=0.971 n=10) SetAttributes/CountLimit/NotHit-20 909.2n ± 8% 866.4n ± 7% ~ (p=0.143 n=10) SetAttributes/ValueLimit/Hit-20 135.5n ± 2% 150.2n ± 5% +10.85% (p=0.000 n=10) SetAttributes/ValueLimit/NotHit-20 121.7n ± 7% 137.2n ± 6% +12.65% (p=0.001 n=10) SetAttributes/Overwrite/Existing-20 176.0n ± 5% 184.1n ± 2% +4.60% (p=0.005 n=10) SetBody/Simple/NoLimits-20 13.54n ± 1% 13.34n ± 2% -1.48% (p=0.027 n=10) SetBody/Simple/WithLimits-20 13.46n ± 11% 13.91n ± 9% ~ (p=0.541 n=10) SetBody/UniqueMap/NoLimits-20 216.2n ± 8% 183.8n ± 3% -14.94% (p=0.000 n=10) SetBody/UniqueMap/AllowDuplicates-20 12.89n ± 1% 12.75n ± 1% -1.05% (p=0.001 n=10) SetBody/Deduplication/Enabled-20 113.5n ± 2% 164.4n ± 4% +44.85% (p=0.000 n=10) SetBody/Deduplication/Disabled-20 12.93n ± 41% 12.74n ± 1% -1.51% (p=0.000 n=10) SetBody/NestedDeduplication/Enabled-20 206.4n ± 2% 493.4n ± 2% +139.05% (p=0.000 n=10) SetBody/NestedDeduplication/Disabled-20 12.93n ± 1% 12.98n ± 11% ~ (p=0.515 n=10) SetBody/ValueLimit/Hit-20 86.22n ± 1% 110.25n ± 3% +27.87% (p=0.000 n=10) SetBody/ValueLimit/NoHit-20 85.52n ± 8% 104.25n ± 1% +21.91% (p=0.000 n=10) geomean 104.2n 107.1n +2.84% │ old.txt │ new.txt │ │ B/op │ B/op vs base │ AddAttributes/Single/NoLimits-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ AddAttributes/Single/AllowDuplicates-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ AddAttributes/Unique/NoLimits-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ AddAttributes/Unique/AllowDuplicates-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ AddAttributes/Deduplication/Enabled-20 0.0 ± 0% 128.0 ± 0% ? (p=0.000 n=10) AddAttributes/NestedDeduplication/Enabled-20 0.0 ± 0% 312.0 ± 0% ? (p=0.000 n=10) AddAttributes/NestedDeduplication/Disabled-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ AddAttributes/Deduplication/Disabled-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ AddAttributes/CountLimit/Hit-20 208.0 ± 0% 208.0 ± 0% ~ (p=1.000 n=10) ¹ AddAttributes/CountLimit/NotHit-20 640.0 ± 0% 640.0 ± 0% ~ (p=1.000 n=10) ¹ AddAttributes/ValueLimit/Hit-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ AddAttributes/ValueLimit/NotHit-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/Single/NoLimits-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/Single/AllowDuplicates-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/Unique/NoLimits-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/Unique/AllowDuplicates-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/Deduplication/Enabled-20 0.0 ± 0% 128.0 ± 0% ? (p=0.000 n=10) SetAttributes/Deduplication/Disabled-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/NestedDeduplication/Enabled-20 0.0 ± 0% 312.0 ± 0% ? (p=0.000 n=10) SetAttributes/NestedDeduplication/Disabled-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/CountLimit/Hit-20 208.0 ± 0% 208.0 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/CountLimit/NotHit-20 640.0 ± 0% 640.0 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/ValueLimit/Hit-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/ValueLimit/NotHit-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/Overwrite/Existing-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetBody/Simple/NoLimits-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetBody/Simple/WithLimits-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetBody/UniqueMap/NoLimits-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetBody/UniqueMap/AllowDuplicates-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetBody/Deduplication/Enabled-20 0.0 ± 0% 128.0 ± 0% ? (p=0.000 n=10) SetBody/Deduplication/Disabled-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetBody/NestedDeduplication/Enabled-20 0.0 ± 0% 280.0 ± 0% ? (p=0.000 n=10) SetBody/NestedDeduplication/Disabled-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetBody/ValueLimit/Hit-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetBody/ValueLimit/NoHit-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ geomean ² ? ² ¹ all samples are equal ² summaries must be >0 to compute geomean │ old.txt │ new.txt │ │ allocs/op │ allocs/op vs base │ AddAttributes/Single/NoLimits-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ AddAttributes/Single/AllowDuplicates-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ AddAttributes/Unique/NoLimits-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ AddAttributes/Unique/AllowDuplicates-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ AddAttributes/Deduplication/Enabled-20 0.000 ± 0% 1.000 ± 0% ? (p=0.000 n=10) AddAttributes/NestedDeduplication/Enabled-20 0.000 ± 0% 5.000 ± 0% ? (p=0.000 n=10) AddAttributes/NestedDeduplication/Disabled-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ AddAttributes/Deduplication/Disabled-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ AddAttributes/CountLimit/Hit-20 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=10) ¹ AddAttributes/CountLimit/NotHit-20 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=10) ¹ AddAttributes/ValueLimit/Hit-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ AddAttributes/ValueLimit/NotHit-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/Single/NoLimits-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/Single/AllowDuplicates-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/Unique/NoLimits-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/Unique/AllowDuplicates-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/Deduplication/Enabled-20 0.000 ± 0% 1.000 ± 0% ? (p=0.000 n=10) SetAttributes/Deduplication/Disabled-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/NestedDeduplication/Enabled-20 0.000 ± 0% 5.000 ± 0% ? (p=0.000 n=10) SetAttributes/NestedDeduplication/Disabled-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/CountLimit/Hit-20 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/CountLimit/NotHit-20 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/ValueLimit/Hit-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/ValueLimit/NotHit-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetAttributes/Overwrite/Existing-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetBody/Simple/NoLimits-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetBody/Simple/WithLimits-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetBody/UniqueMap/NoLimits-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetBody/UniqueMap/AllowDuplicates-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetBody/Deduplication/Enabled-20 0.000 ± 0% 1.000 ± 0% ? (p=0.000 n=10) SetBody/Deduplication/Disabled-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetBody/NestedDeduplication/Enabled-20 0.000 ± 0% 4.000 ± 0% ? (p=0.000 n=10) SetBody/NestedDeduplication/Disabled-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetBody/ValueLimit/Hit-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ SetBody/ValueLimit/NoHit-20 0.000 ± 0% 0.000 ± 0% ~ (p=1.000 n=10) ¹ geomean ² ? ² ¹ all samples are equal ² summaries must be >0 to compute geomean ``` |
||
|
|
f346decaf6 |
chore: sdk/internal/x - generate x package from shared template (#7495)
Closes #7384 - Add sdk/internal/gen.go with gotmpl directives to generate x/x.go and x/x_test.go - Refactor sdk/internal/x/x.go to generic Feature[T] with multi-key support and Keys() - Move Resource feature into sdk/internal/x/features.go (case-insensitive true enables) - Add tests: generic feature tests in x_test.go and Resource tests in features_test.go - Aligns with sdk/log/internal/x pattern introduced in PR #7389 Internal note: replaces Key() with Keys() for internal Feature API. Build and lints pass --------- Co-authored-by: Damien Mathieu <42@dmathieu.com> |
||
|
|
9dea78c87f |
chore(deps): update module github.com/go-critic/go-critic to v0.14.0 (#7509)
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [github.com/go-critic/go-critic](https://redirect.github.com/go-critic/go-critic) | `v0.13.0` -> `v0.14.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](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>go-critic/go-critic (github.com/go-critic/go-critic)</summary> ### [`v0.14.0`](https://redirect.github.com/go-critic/go-critic/releases/tag/v0.14.0) [Compare Source](https://redirect.github.com/go-critic/go-critic/compare/v0.13.0...v0.14.0) #### What's Changed - checkers/exitAfterDefer: handle optional `defer` properly by [@​Afterous](https://redirect.github.com/Afterous) in [#​1437](https://redirect.github.com/go-critic/go-critic/pull/1437) - checkers/deprecatedComment: check that deprecated convention appears in a separate paragraph by [@​mx-psi](https://redirect.github.com/mx-psi) in [#​1470](https://redirect.github.com/go-critic/go-critic/pull/1470) - dev: enable goprintffuncname linter by [@​alexandear](https://redirect.github.com/alexandear) in [#​1478](https://redirect.github.com/go-critic/go-critic/pull/1478) - checkers: add dupOption by [@​alingse](https://redirect.github.com/alingse) in [#​1471](https://redirect.github.com/go-critic/go-critic/pull/1471) - all: rename gocritic to go-critic by [@​cristaloleg](https://redirect.github.com/cristaloleg) in [#​1482](https://redirect.github.com/go-critic/go-critic/pull/1482) - deps: bump golang.org/x/tools from 0.31.0 to 0.32.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​1484](https://redirect.github.com/go-critic/go-critic/pull/1484) - checker/badCond: rhs should be also check for safe expr by [@​codeimmortal](https://redirect.github.com/codeimmortal) in [#​1486](https://redirect.github.com/go-critic/go-critic/pull/1486) - deps: bump golang.org/x/tools from 0.32.0 to 0.33.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​1489](https://redirect.github.com/go-critic/go-critic/pull/1489) - checker: add `zeroByteRepeat` for avoiding `bytes.Repeat([]byte{0}, x)` by [@​codeimmortal](https://redirect.github.com/codeimmortal) in [#​1488](https://redirect.github.com/go-critic/go-critic/pull/1488) - docs/readme: add Homebrew install instructions by [@​krehel](https://redirect.github.com/krehel) in [#​1491](https://redirect.github.com/go-critic/go-critic/pull/1491) - deps: bump golang.org/x/tools from 0.33.0 to 0.34.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​1492](https://redirect.github.com/go-critic/go-critic/pull/1492) - deps: bump golang.org/x/tools from 0.34.0 to 0.35.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​1498](https://redirect.github.com/go-critic/go-critic/pull/1498) - ci: bump actions/checkout from 4 to 5 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​1501](https://redirect.github.com/go-critic/go-critic/pull/1501) - ci: bump actions/setup-go from 5 to 6 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​1503](https://redirect.github.com/go-critic/go-critic/pull/1503) - deps: bump golang.org/x/tools from 0.35.0 to 0.36.0 by [@​dependabot](https://redirect.github.com/dependabot)\[bot] in [#​1500](https://redirect.github.com/go-critic/go-critic/pull/1500) #### New Contributors - [@​mx-psi](https://redirect.github.com/mx-psi) made their first contribution in [#​1470](https://redirect.github.com/go-critic/go-critic/pull/1470) - [@​codeimmortal](https://redirect.github.com/codeimmortal) made their first contribution in [#​1486](https://redirect.github.com/go-critic/go-critic/pull/1486) - [@​krehel](https://redirect.github.com/krehel) made their first contribution in [#​1491](https://redirect.github.com/go-critic/go-critic/pull/1491) **Full Changelog**: <https://github.com/go-critic/go-critic/compare/v0.13.0...v0.14.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:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNDMuMSIsInVwZGF0ZWRJblZlciI6IjQxLjE0My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: dmathieu <damien.mathieu@elastic.co> |
||
|
|
691638a817 |
Move sdk/internal/env to sdk/trace/internal/env (#7437)
The `sdk/internal/env` package is only used by tracing, and having that internal package at the `sdk/` level means traces have a dependency on a specific version of the SDK, causing issues such as https://github.com/open-telemetry/opentelemetry-go/issues/6981 This moves the package to `sdk/trace/internal/env` to remove that dependency. |
||
|
|
0c97dfd6bd |
fix(deps): update golang.org/x (#7475)
This PR contains the following updates: | Package | Change | Age | Confidence | Type | Update | |---|---|---|---|---|---| | golang.org/x/sys | `v0.36.0` -> `v0.37.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | indirect | minor | | golang.org/x/sys | `v0.36.0` -> `v0.37.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | require | minor | | golang.org/x/telemetry | `4eae98a` -> `badf71c` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | indirect | digest | --- > [!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:eyJjcmVhdGVkSW5WZXIiOiI0MS4xMzEuOSIsInVwZGF0ZWRJblZlciI6IjQxLjEzMS45IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJTa2lwIENoYW5nZWxvZyIsImRlcGVuZGVuY2llcyJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
|
|
5f5f4af5e5 |
Document the ordering guarantees provided by the metrics SDK (#7453)
Forked from this discussion here: https://github.com/open-telemetry/opentelemetry-go/pull/7443#discussion_r2402481912 It seems like a good idea for us as a group to align on and document what we are comfortable with in terms of how ordered measurements are reflected in collected metric data. --------- Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> |
||
|
|
c8e3897521 |
Use sync.Map and atomics to improve sum performance (#7427)
Alternative to https://github.com/open-telemetry/opentelemetry-go/pull/7380 This uses a sync.Map and atomics for the sum's counter value. This intentionally introduces a new race condition that didn't previously exist: * It is possible for the exemplar to be recorded in the batch of metrics after the add() for cumulative sum aggregations. For cumulative, this isn't a huge issue since exemplars are expected to persist across collection cycles. This is difficult to fix because we can't manage the internal storage of an exemplar.Reservoir (to atomically swap between hot and cold storage). If we are able to make assumptions about how exemplar reservoirs are managed (i.e. that the number of and order of exemplars returned is always the same), then we could possibly fix this by merging at export time. ### Alternatives Considered #### RWLock for the map instead of sync.Map This is significantly less performant. #### Single sync.Map without hotColdWaitGroup Deleting keys from the sync.Map concurrently with measurements (during Clear() of the sync.Map) can cause measurements to be made to a counter that has already been read, exported and deleted. This can produce incorrect sums when delta is used. Instead, atomically switching writes to a completely empty sync.Map and waiting for writes to the previous sync.Map complete eliminates this issue. #### Use two sync.Map for cumulative sums One idea I explored was doing a hot-cold swap for cumulative sums just like we do for delta sums. We would swap the hot and cold sync.Maps, wait for writes to the cold sync.Map to complete while new writes go to the hot map. Then, once we are done reading the cold map, we could merge the contents of the cold map back into the new hot map. This approach has two issues: * It isn't possible to "merge" one exemplar reservoir into another. This is an issue for persistent exemplars that aren't overwritten in a collection interval. * We can't keep a consistent set of keys in overflow scenarios. Measurements that are made to the hot map before the merge of the cold into hot that should have been overflows will be added as new attribute sets. That, in turn, means we will need to change previously-exported attribute sets to the overflow set, which will cause issues for users. ### Benchmarks Parallel: ``` goos: linux goarch: amd64 pkg: go.opentelemetry.io/otel/sdk/metric cpu: AMD EPYC 7B12 │ main24.txt │ new24_new.txt │ │ sec/op │ sec/op vs base │ SyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/0-24 255.65n ± 13% 68.06n ± 3% -73.38% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/1-24 286.70n ± 8% 67.66n ± 4% -76.40% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/10-24 287.15n ± 14% 69.90n ± 3% -75.66% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/0-24 244.75n ± 9% 68.83n ± 4% -71.88% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/1-24 267.20n ± 14% 65.86n ± 3% -75.35% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/10-24 291.50n ± 13% 66.59n ± 11% -77.15% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/0-24 247.85n ± 7% 66.06n ± 3% -73.34% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/1-24 286.75n ± 10% 68.52n ± 2% -76.10% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/10-24 289.50n ± 20% 67.45n ± 4% -76.70% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/0-24 246.25n ± 14% 66.69n ± 2% -72.92% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/1-24 289.55n ± 9% 65.54n ± 5% -77.36% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/10-24 286.05n ± 14% 67.55n ± 2% -76.39% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Gauge/Attributes/0-24 254.8n ± 23% 225.9n ± 17% -11.32% (p=0.026 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Gauge/Attributes/1-24 304.4n ± 13% 234.4n ± 19% -23.01% (p=0.004 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Gauge/Attributes/10-24 308.9n ± 20% 217.6n ± 10% -29.56% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Gauge/Attributes/0-24 267.8n ± 14% 220.1n ± 19% -17.80% (p=0.004 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Gauge/Attributes/1-24 274.1n ± 21% 226.5n ± 5% -17.38% (p=0.024 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Gauge/Attributes/10-24 239.0n ± 14% 236.1n ± 18% ~ (p=0.589 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/0-24 223.7n ± 11% 234.8n ± 7% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/1-24 253.9n ± 10% 244.8n ± 11% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/10-24 272.6n ± 7% 250.0n ± 12% -8.33% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/0-24 232.6n ± 4% 232.2n ± 8% ~ (p=0.937 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/1-24 276.7n ± 20% 249.2n ± 11% ~ (p=0.485 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/10-24 265.9n ± 18% 246.4n ± 9% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/0-24 294.0n ± 11% 269.0n ± 5% -8.47% (p=0.015 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/1-24 314.6n ± 10% 268.8n ± 6% -14.54% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/10-24 303.9n ± 11% 285.4n ± 4% ~ (p=0.180 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/0-24 274.7n ± 13% 262.9n ± 7% ~ (p=0.145 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/1-24 296.1n ± 6% 288.9n ± 9% ~ (p=0.180 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/10-24 276.0n ± 14% 299.4n ± 12% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/0-24 191.4n ± 4% 176.0n ± 3% -8.05% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/1-24 223.2n ± 8% 172.8n ± 3% -22.54% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/10-24 265.7n ± 19% 172.2n ± 2% -35.21% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/0-24 179.4n ± 18% 171.0n ± 3% -4.74% (p=0.009 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/1-24 209.1n ± 16% 175.4n ± 5% -16.07% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/10-24 222.5n ± 17% 175.6n ± 4% -21.08% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/0-24 194.4n ± 11% 176.9n ± 5% -9.03% (p=0.004 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/1-24 207.5n ± 13% 175.1n ± 2% -15.66% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/10-24 243.7n ± 13% 172.6n ± 3% -29.15% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/0-24 218.3n ± 10% 177.6n ± 2% -18.67% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/1-24 193.5n ± 10% 176.1n ± 2% -8.99% (p=0.004 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/10-24 192.8n ± 11% 173.7n ± 2% -9.91% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Gauge/Attributes/0-24 185.1n ± 9% 204.8n ± 9% +10.61% (p=0.004 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Gauge/Attributes/1-24 218.8n ± 14% 229.7n ± 16% ~ (p=0.310 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Gauge/Attributes/10-24 242.7n ± 8% 209.1n ± 18% -13.84% (p=0.041 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Gauge/Attributes/0-24 182.8n ± 42% 255.2n ± 8% +39.67% (p=0.015 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Gauge/Attributes/1-24 198.0n ± 7% 280.6n ± 22% +41.72% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Gauge/Attributes/10-24 236.3n ± 18% 261.7n ± 8% ~ (p=0.065 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/0-24 223.2n ± 9% 226.9n ± 4% ~ (p=0.965 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/1-24 270.1n ± 10% 280.2n ± 6% ~ (p=0.143 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/10-24 257.2n ± 7% 252.0n ± 7% ~ (p=0.485 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/0-24 277.0n ± 5% 310.4n ± 12% ~ (p=0.065 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/1-24 287.3n ± 9% 271.2n ± 12% ~ (p=0.699 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/10-24 281.8n ± 9% 316.5n ± 22% +12.29% (p=0.041 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/0-24 289.1n ± 9% 297.1n ± 12% ~ (p=0.310 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/1-24 277.8n ± 6% 353.1n ± 11% +27.11% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/10-24 281.8n ± 11% 352.2n ± 16% +24.94% (p=0.009 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/0-24 294.1n ± 7% 317.5n ± 9% ~ (p=0.065 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/1-24 281.7n ± 10% 332.1n ± 8% +17.89% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/10-24 238.9n ± 12% 318.1n ± 9% +33.13% (p=0.002 n=6) geomean 251.9n 184.4n -26.77% ``` Single-threaded: ``` goos: linux goarch: amd64 pkg: go.opentelemetry.io/otel/sdk/metric cpu: Intel(R) Xeon(R) CPU @ 2.20GHz │ main1.txt │ sync1.txt │ │ sec/op │ sec/op vs base │ SyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/0 109.8n ± 7% 113.4n ± 23% ~ (p=1.000 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/1 115.0n ± 4% 113.3n ± 20% ~ (p=0.729 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/10 177.1n ± 34% 110.2n ± 16% -37.78% (p=0.009 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/0 110.5n ± 42% 109.2n ± 19% ~ (p=0.457 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/1 118.8n ± 2% 118.4n ± 5% ~ (p=0.619 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/10 119.0n ± 2% 116.8n ± 42% ~ (p=0.699 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/0 106.9n ± 1% 102.5n ± 5% -4.16% (p=0.030 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/1 117.2n ± 2% 116.9n ± 7% ~ (p=1.000 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/10 115.4n ± 1% 115.1n ± 5% ~ (p=0.937 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/0 109.5n ± 5% 104.2n ± 8% -4.84% (p=0.041 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/1 118.7n ± 14% 113.8n ± 35% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/10 116.6n ± 1% 116.8n ± 8% ~ (p=0.968 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Gauge/Attributes/0 106.6n ± 4% 109.4n ± 5% ~ (p=0.093 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Gauge/Attributes/1 114.7n ± 4% 117.9n ± 4% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Gauge/Attributes/10 115.2n ± 4% 114.5n ± 1% ~ (p=0.162 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Gauge/Attributes/0 109.4n ± 5% 107.5n ± 3% ~ (p=0.132 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Gauge/Attributes/1 118.3n ± 2% 117.9n ± 3% ~ (p=0.589 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Gauge/Attributes/10 117.7n ± 2% 120.8n ± 14% ~ (p=0.093 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/0 96.78n ± 1% 99.37n ± 3% ~ (p=0.065 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/1 103.0n ± 3% 116.5n ± 26% +13.16% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/10 102.8n ± 1% 107.6n ± 22% +4.67% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/0 93.95n ± 22% 99.88n ± 18% +6.32% (p=0.041 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/1 102.7n ± 5% 106.2n ± 6% ~ (p=0.089 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/10 104.1n ± 4% 108.3n ± 27% +4.03% (p=0.026 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/0 146.3n ± 1% 154.0n ± 24% +5.23% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/1 154.8n ± 3% 161.2n ± 2% +4.20% (p=0.004 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/10 155.5n ± 1% 164.0n ± 4% +5.43% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/0 145.9n ± 2% 159.7n ± 12% +9.42% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/1 155.2n ± 0% 164.0n ± 6% +5.70% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/10 219.3n ± 29% 159.5n ± 3% ~ (p=0.065 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/0 263.6n ± 36% 177.2n ± 1% ~ (p=0.065 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/1 189.1n ± 8% 190.4n ± 12% ~ (p=0.589 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/10 184.3n ± 3% 189.4n ± 6% ~ (p=0.065 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/0 180.7n ± 1% 182.7n ± 2% ~ (p=0.457 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/1 192.8n ± 9% 192.0n ± 1% ~ (p=1.000 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/10 192.3n ± 4% 190.2n ± 4% ~ (p=0.093 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/0 176.5n ± 2% 181.7n ± 4% +2.95% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/1 184.0n ± 4% 192.0n ± 1% +4.32% (p=0.015 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/10 184.4n ± 1% 195.2n ± 3% +5.83% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/0 183.0n ± 3% 177.4n ± 5% -3.06% (p=0.048 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/1 194.4n ± 4% 188.1n ± 5% ~ (p=0.084 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/10 193.0n ± 5% 194.1n ± 5% ~ (p=0.699 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Gauge/Attributes/0 178.4n ± 14% 185.6n ± 29% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Gauge/Attributes/1 189.0n ± 8% 193.2n ± 2% ~ (p=0.132 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Gauge/Attributes/10 197.7n ± 5% 198.8n ± 2% ~ (p=0.619 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Gauge/Attributes/0 185.5n ± 3% 188.8n ± 4% ~ (p=0.310 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Gauge/Attributes/1 191.2n ± 3% 190.2n ± 7% ~ (p=0.732 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Gauge/Attributes/10 186.8n ± 2% 197.1n ± 6% +5.54% (p=0.004 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/0 224.2n ± 4% 227.3n ± 2% ~ (p=0.394 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/1 232.5n ± 3% 242.5n ± 5% ~ (p=0.132 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/10 232.5n ± 3% 237.1n ± 5% +2.00% (p=0.045 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/0 227.5n ± 2% 238.5n ± 5% +4.81% (p=0.017 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/1 239.4n ± 8% 250.1n ± 6% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/10 241.5n ± 4% 254.0n ± 2% +5.18% (p=0.004 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/0 231.1n ± 5% 239.2n ± 3% ~ (p=0.084 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/1 260.2n ± 16% 253.8n ± 4% ~ (p=0.190 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/10 234.3n ± 1% 246.8n ± 2% +5.29% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/0 221.8n ± 6% 232.0n ± 4% +4.58% (p=0.037 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/1 228.2n ± 7% 240.6n ± 1% +5.41% (p=0.041 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/10 228.6n ± 7% 244.7n ± 1% +7.04% (p=0.015 n=6) geomean 158.1n 158.1n +0.00% ``` --------- Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> |
||
|
|
a10652b501 |
sdk/trace: trace id high 64 bit tests (#7212)
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/7160 - Modified `testIDGenerator` to have both low and high bits (in uint64 form) since we can't store 128 bits integer - start with high seed values (taken from https://github.com/open-telemetry/opentelemetry-go/pull/7155) - validate both high and low 64 bits of trace id Does not need a CHANGELOG entry - test only. --------- Co-authored-by: Damien Mathieu <42@dmathieu.com> Co-authored-by: Robert Pająk <pellared@hotmail.com> Co-authored-by: dmathieu <damien.mathieu@elastic.co> |
||
|
|
bd1b3da91c |
Add exemplar reservoir parallel benchmarks (#7441)
This also fixes a bug introduced in https://github.com/open-telemetry/opentelemetry-go/pull/7423, where we were only locking around storage and not around other shared fields (e.g. count). Fixing the bug is required for benchmarks to run properly, but wasn't caught by concurrent safe tests because the SDK does not currently call exemplar methods concurrently. ``` goos: linux goarch: amd64 pkg: go.opentelemetry.io/otel/sdk/metric/exemplar cpu: Intel(R) Xeon(R) CPU @ 2.20GHz BenchmarkFixedSizeReservoirOffer-24 498955 248.4 ns/op 0 B/op 0 allocs/op BenchmarkHistogramReservoirOffer-24 478068 250.1 ns/op 0 B/op 0 allocs/op ``` |
||
|
|
dee11e6ae3 |
Add temporality selector functions (#7434)
From: https://github.com/open-telemetry/opentelemetry-go/pull/7346 This PR exposes the default TemporalitySelector funcs that are used by the OTel env var processing. The reason to expose these funcs is because there is some discrepancy in various vendor documentation on how to enable these settings using go option args WithTemporalitySelector https://cloud-native.slack.com/archives/C01NPAXACKT/p1757443233624599 --------- Co-authored-by: Damien Mathieu <42@dmathieu.com> Co-authored-by: David Ashpole <dashpole@google.com> |
||
|
|
ea38204f20 |
Allow optimizing locking for built-in exemplar reservoirs (#7423)
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/7388 Benchmarks seem like mostly noise. It isn't actually necessary to lock in the exemplar reservoir today because of our SDK design, but this allows us to make optimizations in the future. After https://github.com/open-telemetry/opentelemetry-go/pull/7427, improvements to exemplar reservoir locking will greatly improve the ExemplarEnabled benchmarks. Parallel benchmarks: ``` goos: linux goarch: amd64 pkg: go.opentelemetry.io/otel/sdk/metric cpu: Intel(R) Xeon(R) CPU @ 2.20GHz │ main24.txt │ exemplar24.txt │ │ sec/op │ sec/op vs base │ SyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/0-24 399.5n ± 16% 367.8n ± 17% ~ (p=0.310 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/1-24 369.4n ± 27% 410.2n ± 11% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/10-24 372.6n ± 23% 398.9n ± 8% ~ (p=0.394 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/0-24 313.4n ± 12% 357.7n ± 20% ~ (p=0.065 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/1-24 389.9n ± 12% 379.5n ± 9% ~ (p=0.818 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/10-24 441.4n ± 13% 359.1n ± 18% -18.64% (p=0.009 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/0-24 415.8n ± 22% 400.3n ± 16% ~ (p=0.937 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/1-24 346.9n ± 8% 364.6n ± 19% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/10-24 358.9n ± 14% 407.1n ± 17% ~ (p=0.093 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/0-24 381.9n ± 27% 375.2n ± 10% ~ (p=0.937 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/1-24 361.9n ± 19% 389.6n ± 23% ~ (p=0.818 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/10-24 356.0n ± 8% 416.1n ± 14% +16.90% (p=0.015 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Gauge/Attributes/0-24 313.9n ± 11% 385.7n ± 19% +22.88% (p=0.041 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Gauge/Attributes/1-24 368.8n ± 18% 387.6n ± 17% ~ (p=0.394 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Gauge/Attributes/10-24 346.1n ± 40% 460.3n ± 16% ~ (p=0.065 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Gauge/Attributes/0-24 325.9n ± 10% 357.8n ± 19% +9.77% (p=0.026 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Gauge/Attributes/1-24 372.1n ± 18% 395.2n ± 14% ~ (p=0.180 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Gauge/Attributes/10-24 353.5n ± 23% 416.0n ± 15% +17.66% (p=0.024 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/0-24 351.8n ± 15% 362.7n ± 7% ~ (p=0.699 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/1-24 378.8n ± 17% 413.4n ± 13% ~ (p=0.288 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/10-24 361.5n ± 13% 418.2n ± 14% ~ (p=0.132 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/0-24 305.0n ± 21% 361.9n ± 13% ~ (p=0.065 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/1-24 411.1n ± 12% 403.9n ± 9% ~ (p=0.937 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/10-24 353.4n ± 39% 380.9n ± 17% ~ (p=0.394 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/0-24 457.5n ± 33% 454.2n ± 13% ~ (p=1.000 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/1-24 436.6n ± 23% 459.0n ± 10% ~ (p=0.310 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/10-24 383.3n ± 22% 461.9n ± 12% +20.51% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/0-24 371.9n ± 14% 421.4n ± 19% +13.33% (p=0.004 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/1-24 433.7n ± 20% 490.8n ± 10% ~ (p=0.310 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/10-24 433.2n ± 18% 511.4n ± 9% +18.05% (p=0.041 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/0-24 477.5n ± 14% 384.6n ± 7% -19.47% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/1-24 481.1n ± 17% 430.0n ± 18% ~ (p=0.065 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/10-24 425.1n ± 27% 436.3n ± 12% ~ (p=0.699 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/0-24 394.5n ± 8% 415.5n ± 15% ~ (p=0.589 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/1-24 434.4n ± 13% 440.8n ± 15% ~ (p=0.937 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/10-24 481.3n ± 19% 404.1n ± 14% -16.05% (p=0.009 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/0-24 364.9n ± 29% 424.3n ± 8% ~ (p=0.065 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/1-24 401.2n ± 24% 482.2n ± 12% +20.20% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/10-24 438.6n ± 19% 404.8n ± 18% ~ (p=0.485 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/0-24 392.7n ± 17% 427.7n ± 25% ~ (p=0.180 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/1-24 392.6n ± 5% 388.5n ± 7% ~ (p=0.818 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/10-24 401.3n ± 19% 409.7n ± 8% ~ (p=0.818 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Gauge/Attributes/0-24 369.8n ± 15% 374.2n ± 17% ~ (p=0.818 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Gauge/Attributes/1-24 359.4n ± 13% 387.1n ± 16% ~ (p=0.180 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Gauge/Attributes/10-24 393.2n ± 18% 450.0n ± 10% +14.43% (p=0.015 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Gauge/Attributes/0-24 399.8n ± 23% 361.2n ± 11% ~ (p=0.065 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Gauge/Attributes/1-24 439.4n ± 25% 412.0n ± 10% ~ (p=0.310 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Gauge/Attributes/10-24 401.7n ± 17% 380.0n ± 11% ~ (p=0.394 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/0-24 508.8n ± 18% 532.6n ± 16% ~ (p=0.937 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/1-24 505.9n ± 22% 494.8n ± 14% ~ (p=0.589 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/10-24 597.8n ± 10% 490.5n ± 23% ~ (p=0.065 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/0-24 566.2n ± 21% 482.9n ± 10% ~ (p=0.132 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/1-24 440.2n ± 9% 549.3n ± 8% +24.77% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/10-24 436.3n ± 16% 530.8n ± 19% ~ (p=0.093 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/0-24 395.8n ± 25% 441.6n ± 9% ~ (p=0.065 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/1-24 440.2n ± 9% 455.2n ± 7% ~ (p=0.180 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/10-24 415.7n ± 12% 527.5n ± 9% +26.91% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/0-24 376.1n ± 19% 461.9n ± 13% +22.81% (p=0.009 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/1-24 383.6n ± 10% 422.7n ± 26% +10.21% (p=0.015 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/10-24 398.5n ± 9% 538.5n ± 7% +35.13% (p=0.002 n=6) geomean 399.4n 422.3n +5.72% ``` Single-threaded benchmarks: ``` goos: linux goarch: amd64 pkg: go.opentelemetry.io/otel/sdk/metric cpu: Intel(R) Xeon(R) CPU @ 2.20GHz │ main1.txt │ exemplar1.txt │ │ sec/op │ sec/op vs base │ SyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/0 180.1n ± 21% 156.2n ± 10% ~ (p=0.132 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/1 168.4n ± 9% 179.2n ± 11% ~ (p=0.132 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/10 164.0n ± 10% 199.0n ± 20% +21.30% (p=0.004 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/0 153.9n ± 6% 170.1n ± 2% +10.53% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/1 178.0n ± 5% 178.5n ± 6% ~ (p=0.818 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/10 175.8n ± 7% 165.3n ± 18% ~ (p=0.589 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/0 152.0n ± 8% 163.1n ± 26% ~ (p=0.132 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/1 168.1n ± 8% 168.0n ± 14% ~ (p=0.818 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/10 167.4n ± 4% 164.3n ± 12% ~ (p=0.699 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/0 151.7n ± 17% 156.0n ± 28% ~ (p=0.310 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/1 173.6n ± 5% 169.3n ± 5% -2.45% (p=0.041 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/10 169.3n ± 4% 165.7n ± 7% ~ (p=0.394 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Gauge/Attributes/0 155.5n ± 15% 153.8n ± 11% ~ (p=0.558 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Gauge/Attributes/1 166.7n ± 3% 173.5n ± 7% ~ (p=0.132 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Gauge/Attributes/10 174.4n ± 17% 167.6n ± 13% ~ (p=0.699 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Gauge/Attributes/0 180.1n ± 32% 154.8n ± 5% -14.02% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Gauge/Attributes/1 204.6n ± 23% 173.8n ± 19% ~ (p=0.069 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Gauge/Attributes/10 226.6n ± 28% 174.5n ± 10% ~ (p=0.132 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/0 132.7n ± 13% 140.7n ± 14% ~ (p=0.132 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/1 143.4n ± 9% 162.6n ± 9% +13.42% (p=0.004 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/10 154.7n ± 7% 172.3n ± 6% +11.38% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/0 136.8n ± 10% 145.5n ± 14% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/1 148.4n ± 11% 159.7n ± 8% ~ (p=0.167 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/10 193.0n ± 25% 165.5n ± 9% ~ (p=0.310 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/0 249.8n ± 47% 229.5n ± 7% ~ (p=0.394 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/1 262.1n ± 20% 245.1n ± 12% ~ (p=0.699 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/10 285.4n ± 20% 249.9n ± 17% ~ (p=0.132 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/0 272.9n ± 20% 216.3n ± 6% -20.75% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/1 311.8n ± 29% 234.4n ± 6% ~ (p=0.132 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/10 228.2n ± 6% 234.2n ± 4% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/0 289.2n ± 39% 263.3n ± 10% ~ (p=1.000 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/1 271.9n ± 18% 280.6n ± 8% ~ (p=0.589 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/10 272.1n ± 6% 303.7n ± 14% ~ (p=0.310 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/0 280.1n ± 8% 268.8n ± 5% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/1 291.6n ± 81% 268.8n ± 7% ~ (p=0.180 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/10 276.3n ± 13% 278.1n ± 6% ~ (p=0.784 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/0 254.7n ± 7% 282.4n ± 5% +10.85% (p=0.026 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/1 277.5n ± 11% 285.2n ± 16% ~ (p=0.937 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/10 267.0n ± 10% 275.9n ± 5% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/0 256.9n ± 3% 286.4n ± 8% +11.46% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/1 267.9n ± 16% 278.0n ± 12% ~ (p=0.180 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/10 272.5n ± 4% 267.4n ± 6% ~ (p=0.310 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Gauge/Attributes/0 272.5n ± 22% 266.2n ± 14% ~ (p=0.589 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Gauge/Attributes/1 355.2n ± 11% 275.2n ± 7% -22.52% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Gauge/Attributes/10 281.3n ± 7% 268.9n ± 4% ~ (p=0.093 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Gauge/Attributes/0 257.0n ± 9% 308.9n ± 7% +20.20% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Gauge/Attributes/1 265.9n ± 9% 319.6n ± 7% +20.18% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Gauge/Attributes/10 279.9n ± 3% 332.9n ± 7% +18.92% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/0 313.9n ± 11% 345.1n ± 10% +9.91% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/1 332.1n ± 7% 359.9n ± 9% +8.37% (p=0.009 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/10 366.4n ± 55% 380.1n ± 4% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/0 336.8n ± 12% 346.3n ± 7% ~ (p=0.589 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/1 361.9n ± 18% 375.0n ± 8% +3.62% (p=0.004 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/10 351.8n ± 6% 392.1n ± 4% +11.46% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/0 358.8n ± 9% 344.3n ± 5% ~ (p=0.310 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/1 352.0n ± 7% 331.5n ± 5% -5.84% (p=0.041 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/10 373.5n ± 10% 353.7n ± 9% ~ (p=0.394 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/0 328.5n ± 9% 345.4n ± 5% +5.14% (p=0.015 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/1 349.1n ± 28% 337.8n ± 9% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/10 347.5n ± 10% 344.2n ± 10% ~ (p=1.000 n=6) geomean 235.3n 234.4n -0.38% ``` |
||
|
|
45539cf5a3 |
Only enforce cardinality limits when the attribute set does not already exist (#7422)
Fixes https://github.com/open-telemetry/opentelemetry-go/issues/7035 Benchmarks with a default value of 2000. Parallel ``` goos: linux goarch: amd64 pkg: go.opentelemetry.io/otel/sdk/metric cpu: Intel(R) Xeon(R) CPU @ 2.20GHz │ main24.txt │ newwithlimit24.txt │ │ sec/op │ sec/op vs base │ SyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/0-24 272.4n ± 6% 287.6n ± 11% ~ (p=0.310 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/1-24 318.1n ± 9% 289.9n ± 11% ~ (p=0.093 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/10-24 305.5n ± 13% 273.4n ± 9% ~ (p=0.180 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/0-24 263.4n ± 14% 273.1n ± 12% ~ (p=0.485 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/1-24 276.8n ± 8% 284.3n ± 10% ~ (p=0.310 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/10-24 266.2n ± 10% 285.9n ± 16% ~ (p=0.394 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/0-24 265.9n ± 11% 286.4n ± 14% ~ (p=0.310 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/1-24 301.6n ± 16% 286.1n ± 6% ~ (p=0.310 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/10-24 256.1n ± 16% 282.7n ± 14% +10.41% (p=0.041 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/0-24 269.1n ± 19% 272.0n ± 6% ~ (p=0.485 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/1-24 299.5n ± 12% 261.6n ± 16% -12.67% (p=0.013 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/10-24 286.3n ± 16% 275.8n ± 10% ~ (p=0.310 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Gauge/Attributes/0-24 265.4n ± 4% 243.1n ± 11% ~ (p=0.093 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Gauge/Attributes/1-24 260.6n ± 10% 258.7n ± 17% ~ (p=0.818 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Gauge/Attributes/10-24 266.6n ± 15% 251.8n ± 16% ~ (p=0.699 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Gauge/Attributes/0-24 265.4n ± 9% 263.3n ± 13% ~ (p=0.818 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Gauge/Attributes/1-24 271.7n ± 15% 305.4n ± 21% ~ (p=0.132 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Gauge/Attributes/10-24 287.4n ± 13% 265.7n ± 9% ~ (p=0.093 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/0-24 276.6n ± 9% 300.4n ± 25% ~ (p=0.180 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/1-24 294.9n ± 11% 276.8n ± 21% ~ (p=0.818 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/10-24 308.3n ± 8% 281.4n ± 20% ~ (p=0.180 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/0-24 296.1n ± 13% 286.5n ± 14% ~ (p=0.937 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/1-24 329.0n ± 19% 299.6n ± 8% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/10-24 288.1n ± 28% 309.9n ± 14% ~ (p=0.937 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/0-24 298.3n ± 12% 282.9n ± 9% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/1-24 309.7n ± 4% 355.2n ± 11% +14.67% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/10-24 308.5n ± 12% 307.6n ± 15% ~ (p=1.000 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/0-24 294.1n ± 17% 289.1n ± 24% ~ (p=0.818 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/1-24 326.6n ± 13% 299.2n ± 14% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/10-24 329.8n ± 19% 283.7n ± 15% ~ (p=0.132 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/0-24 269.9n ± 15% 266.7n ± 6% ~ (p=0.818 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/1-24 297.4n ± 9% 271.9n ± 5% -8.59% (p=0.009 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/10-24 326.4n ± 20% 276.3n ± 5% -15.32% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/0-24 298.1n ± 10% 259.6n ± 10% -12.92% (p=0.009 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/1-24 311.4n ± 6% 276.8n ± 7% -11.11% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/10-24 312.4n ± 7% 264.1n ± 8% -15.45% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/0-24 286.2n ± 8% 272.9n ± 13% ~ (p=0.180 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/1-24 310.1n ± 4% 289.2n ± 11% ~ (p=0.065 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/10-24 329.8n ± 8% 277.1n ± 11% -15.95% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/0-24 261.4n ± 17% 262.8n ± 7% ~ (p=0.965 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/1-24 292.3n ± 10% 271.2n ± 8% -7.22% (p=0.026 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/10-24 306.6n ± 12% 271.9n ± 7% ~ (p=0.065 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Gauge/Attributes/0-24 263.2n ± 22% 254.7n ± 6% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Gauge/Attributes/1-24 284.8n ± 5% 285.0n ± 11% ~ (p=0.937 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Gauge/Attributes/10-24 285.7n ± 17% 296.6n ± 10% ~ (p=0.485 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Gauge/Attributes/0-24 272.3n ± 11% 261.4n ± 8% ~ (p=0.093 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Gauge/Attributes/1-24 281.9n ± 21% 287.8n ± 11% ~ (p=0.937 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Gauge/Attributes/10-24 283.3n ± 15% 254.3n ± 12% -10.24% (p=0.041 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/0-24 296.1n ± 13% 295.5n ± 9% ~ (p=0.937 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/1-24 310.0n ± 19% 301.7n ± 11% ~ (p=0.485 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/10-24 298.8n ± 17% 297.1n ± 3% ~ (p=0.937 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/0-24 303.4n ± 7% 280.9n ± 8% ~ (p=0.093 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/1-24 292.2n ± 14% 290.7n ± 13% ~ (p=1.000 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/10-24 313.9n ± 20% 314.4n ± 8% ~ (p=1.000 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/0-24 289.8n ± 3% 287.3n ± 3% ~ (p=1.000 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/1-24 321.0n ± 6% 308.7n ± 8% -3.82% (p=0.041 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/10-24 313.1n ± 9% 315.4n ± 5% ~ (p=0.818 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/0-24 318.9n ± 13% 285.8n ± 24% ~ (p=0.180 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/1-24 319.0n ± 9% 317.0n ± 12% ~ (p=0.937 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/10-24 396.8n ± 15% 300.3n ± 5% -24.30% (p=0.002 n=6) geomean 294.1n 282.9n -3.80% ``` Single-threaded: ``` goos: linux goarch: amd64 pkg: go.opentelemetry.io/otel/sdk/metric cpu: Intel(R) Xeon(R) CPU @ 2.20GHz │ main1.txt │ newwithlimit1.txt │ │ sec/op │ sec/op vs base │ SyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/0 117.5n ± 5% 109.8n ± 20% ~ (p=0.089 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/1 128.5n ± 35% 118.5n ± 3% -7.79% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/10 126.4n ± 4% 117.3n ± 4% -7.16% (p=0.004 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/0 110.4n ± 1% 112.2n ± 3% +1.59% (p=0.028 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/1 119.8n ± 2% 118.4n ± 4% ~ (p=0.171 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/10 120.1n ± 2% 121.9n ± 3% ~ (p=0.394 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/0 117.3n ± 38% 109.5n ± 2% ~ (p=0.093 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/1 120.8n ± 28% 119.9n ± 8% ~ (p=1.000 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/10 121.1n ± 3% 117.0n ± 2% -3.38% (p=0.009 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/0 111.8n ± 11% 111.0n ± 2% ~ (p=0.331 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/1 121.7n ± 9% 117.5n ± 1% -3.49% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/10 126.5n ± 4% 122.3n ± 8% ~ (p=0.290 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Gauge/Attributes/0 125.5n ± 25% 109.2n ± 3% -12.98% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Gauge/Attributes/1 121.7n ± 6% 116.5n ± 6% -4.31% (p=0.022 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Gauge/Attributes/10 119.9n ± 4% 120.8n ± 4% ~ (p=0.838 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Gauge/Attributes/0 112.5n ± 6% 109.7n ± 40% ~ (p=0.310 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Gauge/Attributes/1 121.2n ± 6% 121.4n ± 3% ~ (p=0.727 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Gauge/Attributes/10 118.6n ± 2% 120.5n ± 2% +1.69% (p=0.045 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/0 97.38n ± 14% 96.56n ± 10% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/1 107.1n ± 4% 105.6n ± 5% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/10 109.7n ± 5% 108.4n ± 3% ~ (p=0.221 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/0 98.30n ± 4% 96.02n ± 2% -2.31% (p=0.015 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/1 107.9n ± 9% 106.2n ± 14% ~ (p=0.180 n=6) SyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/10 107.6n ± 1% 107.0n ± 1% ~ (p=0.485 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/0 151.5n ± 3% 149.7n ± 2% ~ (p=0.071 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/1 161.2n ± 2% 158.5n ± 3% -1.67% (p=0.035 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/10 162.3n ± 2% 159.9n ± 37% ~ (p=0.240 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/0 154.7n ± 10% 149.0n ± 1% -3.68% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/1 161.0n ± 2% 160.5n ± 3% ~ (p=0.732 n=6) SyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/10 162.9n ± 1% 162.6n ± 27% ~ (p=0.838 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/0 180.1n ± 4% 174.0n ± 7% ~ (p=0.065 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/1 193.2n ± 12% 198.7n ± 10% ~ (p=1.000 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/10 191.4n ± 43% 183.8n ± 3% -4.02% (p=0.004 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/0 182.7n ± 5% 179.8n ± 4% ~ (p=0.132 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/1 199.4n ± 3% 185.1n ± 2% -7.17% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/10 198.5n ± 6% 193.0n ± 5% ~ (p=0.589 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/0 184.7n ± 19% 173.5n ± 5% ~ (p=0.058 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/1 183.2n ± 7% 180.7n ± 2% -1.39% (p=0.037 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/10 185.3n ± 21% 183.6n ± 3% ~ (p=0.180 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/0 187.4n ± 7% 183.8n ± 6% ~ (p=0.310 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/1 194.6n ± 4% 189.2n ± 2% -2.75% (p=0.004 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/10 199.9n ± 5% 189.4n ± 3% -5.23% (p=0.026 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Gauge/Attributes/0 179.2n ± 5% 187.7n ± 4% ~ (p=0.065 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Gauge/Attributes/1 188.6n ± 2% 192.1n ± 4% ~ (p=0.221 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Gauge/Attributes/10 186.2n ± 1% 189.9n ± 3% +2.04% (p=0.009 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Gauge/Attributes/0 179.4n ± 4% 183.6n ± 8% ~ (p=0.093 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Gauge/Attributes/1 188.0n ± 2% 190.6n ± 2% ~ (p=0.180 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Gauge/Attributes/10 197.1n ± 6% 188.3n ± 6% ~ (p=0.180 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/0 222.6n ± 10% 227.8n ± 5% ~ (p=0.310 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/1 224.2n ± 7% 230.8n ± 6% ~ (p=0.937 n=6) SyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/10 240.6n ± 10% 233.6n ± 6% ~ (p=0.394 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/0 216.9n ± 4% 222.0n ± 5% ~ (p=0.937 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/1 223.3n ± 3% 221.4n ± 4% ~ (p=0.372 n=6) SyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/10 240.8n ± 5% 224.5n ± 19% ~ (p=0.093 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/0 224.5n ± 2% 218.2n ± 2% -2.83% (p=0.030 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/1 230.9n ± 2% 228.8n ± 1% -0.95% (p=0.026 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/10 231.5n ± 4% 242.1n ± 5% ~ (p=0.093 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/0 237.1n ± 3% 221.8n ± 6% -6.47% (p=0.004 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/1 245.3n ± 0% 234.4n ± 4% -4.46% (p=0.002 n=6) SyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/10 249.3n ± 11% 240.9n ± 17% ~ (p=0.589 n=6) geomean 159.1n 156.0n -1.97% ``` --------- Co-authored-by: Robert Pająk <pellared@hotmail.com> |
||
|
|
0db5ac7e0f |
sdk/trace/internal/x: generate x package from x component template #7385 (#7411)
Fix #7385 ### Summary This PR adds code generation for the `sdk/trace/internal/x` package using the shared x component template. It mirrors the implementation in `sdk/log/internal/x` (#7389) for the trace SDK. ### Changes - Added `gen.go` to run `go:generate` for `x.go` and `x_test.go`. - Generated `x/x.go` and `x/x_test.go` using the shared template. - Added `feature.go` with the `Observability` experimental feature flag for the trace SDK, following the pattern used in the log SDK. ### Verification - `go generate ./...` successfully generates the files. - Unit tests in `x_test.go` pass. ### References - Log implementation for reference: #7389 - Trace issue: #7385 Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com> |
||
|
|
22cfbcec0c |
Add concurrent safe tests for metric aggregations (#7379)
Prerequisite for https://github.com/open-telemetry/opentelemetry-go/pull/7189. Add tests to try to catch race conditions for concurrent measurements. |
||
|
|
97a78c1525 |
Add measure benchmarks with exemplars recorded (#7406)
Part of https://github.com/open-telemetry/opentelemetry-go/issues/7388 This adds benchmarks for making measurements that also record an exemplar. This will help demonstrate any improvements to locking in the exemplar reservoir. Parallel benchmarks: ``` goos: linux goarch: amd64 pkg: go.opentelemetry.io/otel/sdk/metric cpu: Intel(R) Xeon(R) CPU @ 2.20GHz BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/0-24 57819 258.8 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/1-24 46058 255.0 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/10-24 70351 271.3 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/0-24 67525 220.7 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/1-24 67789 248.9 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/10-24 63385 246.9 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/0-24 67786 213.8 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/1-24 73093 226.9 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/10-24 55597 230.7 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/0-24 77805 216.2 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/1-24 71512 234.7 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/10-24 60094 258.8 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/0-24 66192 266.3 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/1-24 50511 242.5 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/10-24 42548 295.6 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/0-24 48874 229.3 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/1-24 50904 271.5 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/10-24 59074 253.8 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/0-24 55216 292.2 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/1-24 53492 375.3 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/10-24 40346 273.5 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/0-24 51520 310.9 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/1-24 43227 303.2 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/10-24 44754 295.4 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/0-24 44091 294.7 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/1-24 43164 300.3 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/10-24 46014 269.3 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/0-24 38978 281.3 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/1-24 41292 316.6 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/10-24 38986 303.3 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/0-24 33555 299.0 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/1-24 44396 322.2 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/10-24 38211 273.0 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/0-24 45652 296.9 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/1-24 38984 270.8 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/10-24 36280 313.2 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/0-24 34377 437.9 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/1-24 34992 344.9 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/10-24 33795 384.9 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/0-24 38080 353.7 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/1-24 36568 315.4 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/10-24 32418 309.7 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/0-24 33217 320.2 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/1-24 27937 407.7 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/10-24 30818 350.0 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/0-24 36286 346.3 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/1-24 35863 342.4 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/10-24 32378 327.8 ns/op 0 B/op 0 allocs/op ``` Single-threaded benchmarks: ``` goos: linux goarch: amd64 pkg: go.opentelemetry.io/otel/sdk/metric cpu: Intel(R) Xeon(R) CPU @ 2.20GHz BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/0 115218 109.8 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/1 106142 112.0 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Int64Counter/Attributes/10 101562 115.5 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/0 93019 112.1 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/1 107089 117.4 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Float64Counter/Attributes/10 106411 117.6 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/0 110683 113.6 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/1 84825 122.5 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Int64UpDownCounter/Attributes/10 98952 113.9 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/0 115419 105.2 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/1 97251 114.7 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Float64UpDownCounter/Attributes/10 106036 111.8 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/0 130296 92.98 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/1 120679 100.5 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Int64Histogram/Attributes/10 116985 102.1 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/0 125479 96.42 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/1 115527 103.7 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/Float64Histogram/Attributes/10 89858 117.8 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/0 76768 152.9 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/1 72832 161.2 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/ExponentialInt64Histogram/Attributes/10 73298 160.9 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/0 81826 154.2 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/1 73779 158.5 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsDisabled/ExponentialFloat64Histogram/Attributes/10 75606 161.4 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/0 61503 188.5 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/1 63260 185.4 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Int64Counter/Attributes/10 62704 189.5 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/0 63615 180.3 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/1 62072 190.2 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Float64Counter/Attributes/10 61260 192.1 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/0 61561 182.6 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/1 60334 192.7 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Int64UpDownCounter/Attributes/10 64114 192.2 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/0 63980 181.5 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/1 61138 189.6 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Float64UpDownCounter/Attributes/10 62150 196.6 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/0 51895 237.9 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/1 52554 230.2 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Int64Histogram/Attributes/10 53581 228.3 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/0 55407 221.5 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/1 50701 226.0 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/Float64Histogram/Attributes/10 50460 231.3 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/0 53390 221.5 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/1 51373 229.6 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/ExponentialInt64Histogram/Attributes/10 51154 228.5 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/0 52167 230.6 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/1 48598 247.6 ns/op 0 B/op 0 allocs/op BenchmarkSyncMeasure/NoView/ExemplarsEnabled/ExponentialFloat64Histogram/Attributes/10 51086 230.8 ns/op 0 B/op 0 allocs/op ``` |