opentelemetry-cpp icon indicating copy to clipboard operation
opentelemetry-cpp copied to clipboard

[SDK] Set small initial value for AttributesHashMap::hash_map_

Open ThomsonTan opened this issue 7 months ago β€’ 3 comments

Fixes #3390

Changes

Please provide a brief description of the changes here.

For significant contributions please make sure you have completed the following items:

  • [x] CHANGELOG.md updated for non-trivial changes
  • [ ] Unit tests have been added
  • [ ] Changes in public API reviewed

ThomsonTan avatar May 07 '25 01:05 ThomsonTan

Deploy Preview for opentelemetry-cpp-api-docs canceled.

Name Link
Latest commit 6821f607677dfa80d48b2d287ddc7c44cc17280f
Latest deploy log https://app.netlify.com/sites/opentelemetry-cpp-api-docs/deploys/6822178231156d0008fea321

netlify[bot] avatar May 07 '25 01:05 netlify[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.05%. Comparing base (1e33bb5) to head (6821f60). Report is 46 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3391   +/-   ##
=======================================
  Coverage   90.05%   90.05%           
=======================================
  Files         212      212           
  Lines        6932     6932           
=======================================
  Hits         6242     6242           
  Misses        690      690           
Files with missing lines Coverage Ξ”
...entelemetry/sdk/metrics/state/attributes_hashmap.h 96.37% <100.00%> (ΓΈ)
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar May 07 '25 02:05 codecov[bot]

The initial large bucket count for attribute hash map could be mitigated by recording multiple dimensions to one instruments. I think it is still rare to have only one or two attribute sets on an instrument.

Let me move this to draft and do some more experiment on it.

ThomsonTan avatar May 12 '25 16:05 ThomsonTan

More benchmark needed for this tuning, close it for now.

ThomsonTan avatar Jun 16 '25 20:06 ThomsonTan