Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ThomsonTan
Copy link
Contributor

@ThomsonTan ThomsonTan commented May 7, 2025

Fixes #3390

Changes

Please provide a brief description of the changes here.

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

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

@ThomsonTan ThomsonTan requested a review from a team as a code owner May 7, 2025 01:52
Copy link

netlify bot commented May 7, 2025

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

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

Copy link

codecov bot commented May 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.05%. Comparing base (1e33bb5) to head (6821f60).

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%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ThomsonTan ThomsonTan added the pr:do-not-merge This PR is not ready to be merged. label May 12, 2025
@ThomsonTan
Copy link
Contributor Author

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 ThomsonTan marked this pull request as draft May 12, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:do-not-merge This PR is not ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The default size of AttributesHashMap::hash_map_ could be too large
3 participants