Skip to content

Conversation

tongoss
Copy link
Contributor

@tongoss tongoss commented Oct 11, 2025

resolve: #7011

Benchmarks

➜ benchstat /tmp/bench_disabled.txt /tmp/bench_enabled.txt
goos: darwin
goarch: arm64
pkg: go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp
cpu: Apple M1 Max
                                         │ /tmp/bench_disabled.txt │       /tmp/bench_enabled.txt       │
                                         │         sec/op          │   sec/op     vs base               │
ExporterExportMetrics/NoObservability-10               105.0µ ± 0%   106.5µ ± 0%  +1.37% (p=0.000 n=30)
ExporterExportMetrics/Observability-10                               108.3µ ± 0%
geomean                                                105.0µ        107.4µ       +1.37%

                                         │ /tmp/bench_disabled.txt │       /tmp/bench_enabled.txt        │
                                         │          B/op           │     B/op      vs base               │
ExporterExportMetrics/NoObservability-10              27.68Ki ± 0%   27.69Ki ± 0%  +0.05% (p=0.000 n=30)
ExporterExportMetrics/Observability-10                               27.70Ki ± 0%
geomean                                               27.68Ki        27.69Ki       +0.05%

                                         │ /tmp/bench_disabled.txt │       /tmp/bench_enabled.txt        │
                                         │        allocs/op        │ allocs/op   vs base                 │
ExporterExportMetrics/NoObservability-10                444.0 ± 0%   444.0 ± 0%       ~ (p=1.000 n=30) ¹
ExporterExportMetrics/Observability-10                               444.0 ± 0%
geomean                                                 444.0        444.0       +0.00%
¹ all samples are equal

Copy link

codecov bot commented Oct 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.3%. Comparing base (86e673c) to head (0c7a31e).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #7493     +/-   ##
=======================================
+ Coverage   86.2%   86.3%   +0.1%     
=======================================
  Files        295     299      +4     
  Lines      25864   26120    +256     
=======================================
+ Hits       22307   22566    +259     
+ Misses      3184    3180      -4     
- Partials     373     374      +1     
Files with missing lines Coverage Δ
exporters/otlp/otlpmetric/otlpmetrichttp/client.go 80.4% <100.0%> (+0.8%) ⬆️
...pmetric/otlpmetrichttp/internal/counter/counter.go 100.0% <100.0%> (ø)
.../otlpmetrichttp/internal/observ/instrumentation.go 100.0% <100.0%> (ø)
...tlp/otlpmetric/otlpmetrichttp/internal/x/observ.go 100.0% <100.0%> (ø)
...ers/otlp/otlpmetric/otlpmetrichttp/internal/x/x.go 100.0% <100.0%> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tongoss tongoss force-pushed the feature/otlpmetrichttp-isnt branch from 51bf317 to 334b631 Compare October 11, 2025 21:32
@tongoss tongoss force-pushed the feature/otlpmetrichttp-isnt branch from 334b631 to 47a0cf0 Compare October 11, 2025 21:42
@tongoss tongoss marked this pull request as ready for review October 11, 2025 21:56
Copy link
Member

@flc1125 flc1125 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overall quality is very high. There are some minor issues.

@flc1125
Copy link
Member

flc1125 commented Oct 12, 2025

Additionally, for the benchmarking part, can we provide before and after comparison data?

@tongoss
Copy link
Contributor Author

tongoss commented Oct 12, 2025

Additionally, for the benchmarking part, can we provide before and after comparison data?

For sure, please find benchmark results as below:

➜ benchstat /tmp/bench_disabled.txt /tmp/bench_enabled.txt
goos: darwin
goarch: arm64
pkg: go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp
cpu: Apple M1 Max
                                         │ /tmp/bench_disabled.txt │       /tmp/bench_enabled.txt       │
                                         │         sec/op          │   sec/op     vs base               │
ExporterExportMetrics/NoObservability-10               105.0µ ± 0%   106.5µ ± 0%  +1.37% (p=0.000 n=30)
ExporterExportMetrics/Observability-10                               108.3µ ± 0%
geomean                                                105.0µ        107.4µ       +1.37%

                                         │ /tmp/bench_disabled.txt │       /tmp/bench_enabled.txt        │
                                         │          B/op           │     B/op      vs base               │
ExporterExportMetrics/NoObservability-10              27.68Ki ± 0%   27.69Ki ± 0%  +0.05% (p=0.000 n=30)
ExporterExportMetrics/Observability-10                               27.70Ki ± 0%
geomean                                               27.68Ki        27.69Ki       +0.05%

                                         │ /tmp/bench_disabled.txt │       /tmp/bench_enabled.txt        │
                                         │        allocs/op        │ allocs/op   vs base                 │
ExporterExportMetrics/NoObservability-10                444.0 ± 0%   444.0 ± 0%       ~ (p=1.000 n=30) ¹
ExporterExportMetrics/Observability-10                               444.0 ± 0%
geomean                                                 444.0        444.0       +0.00%
¹ all samples are equal

@flc1125
Copy link
Member

flc1125 commented Oct 15, 2025

Please resolve the conflict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Metrics SDK observability - otlpmetrichttp exporter metrics

2 participants