Skip to content
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

Add configuration options for Aggregation creation #1513

Merged

Conversation

esigo
Copy link
Member

@esigo esigo commented Jul 23, 2022

Fixes #1444 (issue)

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

@esigo esigo added the metrics label Jul 23, 2022
@codecov
Copy link

codecov bot commented Jul 24, 2022

Codecov Report

Merging #1513 (dcbad53) into main (d452e8e) will increase coverage by 0.03%.
The diff coverage is 62.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1513      +/-   ##
==========================================
+ Coverage   84.63%   84.65%   +0.03%     
==========================================
  Files         155      156       +1     
  Lines        4781     4794      +13     
==========================================
+ Hits         4046     4058      +12     
- Misses        735      736       +1     
Impacted Files Coverage Δ
...etry/sdk/metrics/aggregation/default_aggregation.h 32.73% <0.00%> (-1.23%) ⬇️
...ry/sdk/metrics/aggregation/histogram_aggregation.h 86.67% <ø> (ø)
sdk/include/opentelemetry/sdk/metrics/meter.h 0.00% <0.00%> (ø)
sdk/include/opentelemetry/sdk/metrics/view/view.h 63.64% <0.00%> (-14.14%) ⬇️
sdk/src/metrics/meter.cc 6.32% <0.00%> (ø)
sdk/src/metrics/state/temporal_metric_storage.cc 93.23% <85.72%> (+0.24%) ⬆️
...metry/sdk/metrics/aggregation/aggregation_config.h 100.00% <100.00%> (ø)
...telemetry/sdk/metrics/state/async_metric_storage.h 83.34% <100.00%> (ø)
...ntelemetry/sdk/metrics/state/sync_metric_storage.h 64.71% <100.00%> (ø)
...k/src/metrics/aggregation/histogram_aggregation.cc 85.00% <100.00%> (+1.22%) ⬆️
... and 1 more

@esigo esigo changed the title [WIP] Add configuration options for Aggregation creation Add configuration options for Aggregation creation Jul 24, 2022
@esigo esigo marked this pull request as ready for review July 24, 2022 10:36
@esigo esigo requested a review from a team July 24, 2022 10:36
@esigo esigo added the spec-compliance Not compliant to OpenTelemetry specs label Jul 24, 2022
@lalitb
Copy link
Member

lalitb commented Jul 24, 2022

Thanks for the PR. Changes are nicely done. One suggestion - Should we expose the config api in the SDK and not the API. As of now, the instrumentation library shouldn't be able to specify the metrics configuration, it should be done only by SDK (through View API?). There have been some discussions earlier to expose the config through API - Configuring histograms in the API (hints?), Add the metrics API Hint - but was not added to specs.

@esigo
Copy link
Member Author

esigo commented Jul 25, 2022

Thanks for the PR. Changes are nicely done. One suggestion - Should we expose the config api in the SDK and not the API. As of now, the instrumentation library shouldn't be able to specify the metrics configuration, it should be done only by SDK (through View API?). There have been some discussions earlier to expose the config through API - Configuring histograms in the API (hints?), Add the metrics API Hint - but was not added to specs.

@lalitb thanks, removed from api.

Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the PR.

sdk/include/opentelemetry/sdk/metrics/view/view.h Outdated Show resolved Hide resolved
@esigo esigo enabled auto-merge (squash) August 1, 2022 19:30
@esigo esigo disabled auto-merge August 1, 2022 19:40
@esigo esigo enabled auto-merge (squash) August 1, 2022 20:02
@esigo esigo merged commit 3af512e into open-telemetry:main Aug 1, 2022
yxue pushed a commit to yxue/opentelemetry-cpp that referenced this pull request Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
metrics spec-compliance Not compliant to OpenTelemetry specs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Metrics SDK] Add configuration options for Aggregation creation
2 participants