Skip to content

AWSEMFExporter - Only calculate metric rate for cumulative counter. Avoid doing SingleDImensionRollup for metrics with only one dimension. #1280

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

Conversation

shaochengwang
Copy link
Contributor

Description:

  1. Make change on the metric rate calculation logic. Only calculate metric rate for cumulative counter.
  2. Do not do SingleDImensionRollup for metrics with only one dimension in order to avoid duplicate metrics.

Testing:

make all
make unit-tests-with-cover

Documentation:

  1. Remove rate calculation for Gauge and Histogram data because It is not meaningful to calculate the rate for those data types.
  2. Do not do SingleDImensionRollup for metrics with only one dimension because those metrics have only one dimension by default. Otherwise, it will generate duplicate metrics with single dimension.

@shaochengwang shaochengwang requested a review from a team October 16, 2020 02:07
@codecov
Copy link

codecov bot commented Oct 16, 2020

Codecov Report

Merging #1280 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1280      +/-   ##
==========================================
- Coverage   89.02%   89.02%   -0.01%     
==========================================
  Files         297      297              
  Lines       14976    14989      +13     
==========================================
+ Hits        13333    13344      +11     
- Misses       1245     1247       +2     
  Partials      398      398              
Flag Coverage Δ
#unit 89.02% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
exporter/awsemfexporter/metric_translator.go 92.53% <100.00%> (+0.42%) ⬆️
...eiver/awsxrayreceiver/internal/udppoller/poller.go 97.61% <0.00%> (-2.39%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9349e4c...0679754. Read the comment docs.

@shaochengwang shaochengwang changed the title Only calcualte rate for cumulative counter AWSEMFExporter - Only calculate metric rate for cumulative counter. Avoid doing SingleDImensionRollup for metrics with only one dimension. Oct 16, 2020
Copy link
Contributor

@anuraaga anuraaga left a comment

Choose a reason for hiding this comment

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

Can we add unit tests?

@mxiamxia
Copy link
Member

LGTM! thanks.

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.

4 participants