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

prometheus data format #43

Merged
merged 19 commits into from
Sep 12, 2019
Merged

prometheus data format #43

merged 19 commits into from
Sep 12, 2019

Conversation

nzomkxia
Copy link
Collaborator

No description provided.

@codecov-io
Copy link

codecov-io commented Jun 12, 2019

Codecov Report

Merging #43 into master will decrease coverage by 0.05%.
The diff coverage is 63.07%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #43      +/-   ##
============================================
- Coverage     33.87%   33.81%   -0.06%     
+ Complexity     1290     1288       -2     
============================================
  Files           213      213              
  Lines         13685    13717      +32     
  Branches       1094     1101       +7     
============================================
+ Hits           4636     4639       +3     
- Misses         8745     8767      +22     
- Partials        304      311       +7
Impacted Files Coverage Δ Complexity Δ
...java/com/alibaba/metrics/server/MetricsOnDisk.java 8.33% <ø> (+0.64%) 2 <0> (ø) ⬇️
...trics/reporter/file/FileMetricManagerReporter.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...n/java/com/alibaba/metrics/MetricRegistryImpl.java 72.83% <0%> (-0.56%) 86 <0> (ø)
...rics/reporter/bin/StructMetricManagerReporter.java 65.07% <44.44%> (-4.16%) 14 <1> (ø)
...a/com/alibaba/metrics/jvm/BufferPoolMetricSet.java 86.36% <66.66%> (-8.64%) 5 <1> (ø)
...com/alibaba/metrics/os/linux/CpuUsageGaugeSet.java 79.66% <84.61%> (-0.71%) 28 <1> (+1)
...in/java/com/alibaba/metrics/BucketCounterImpl.java 86.79% <0%> (-3.78%) 19% <0%> (-1%)
...l/src/main/java/com/alibaba/metrics/Striped64.java 57.4% <0%> (-3.71%) 9% <0%> (-2%)
...ibaba/metrics/reporter/bin/ChannelFileBackend.java 78.57% <0%> (-2.86%) 12% <0%> (ø)

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 6167d2f...028ae24. Read the comment docs.

Map<Long, Long> bucket = entry.getValue();
for (Map.Entry<Long, Long> entry1 : bucket.entrySet()) {
samples.add(sampleBuilder.createSample(metricName, suffix, Arrays.asList("bucket"), Arrays.asList(entry1.getKey().toString()), entry1.getValue()));
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

There is one more bucket called +Infinity. see the test output for Prometheus Histogram.

# HELP test_prom_histogram test histogram
# TYPE test_prom_histogram histogram
test_prom_histogram_bucket{le="10.0",} 20.0
test_prom_histogram_bucket{le="100.0",} 172.0
test_prom_histogram_bucket{le="500.0",} 830.0
test_prom_histogram_bucket{le="1000.0",} 1615.0
test_prom_histogram_bucket{le="+Inf",} 1615.0

Note that in Prometheus the value is accumulated for each bucket, however in Alibaba metrics, the value is not. It may be necessary to adapt to prometheus logic.

@ralf0131 ralf0131 mentioned this pull request Jul 1, 2019
@ralf0131 ralf0131 merged commit 028ae24 into alibaba:master Sep 12, 2019
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