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 #1123 metrics to Flux #1183

Merged
merged 27 commits into from
May 18, 2018
Merged

Add #1123 metrics to Flux #1183

merged 27 commits into from
May 18, 2018

Conversation

simonbasle
Copy link
Member

work in progress first MVP

@codecov-io
Copy link

codecov-io commented May 1, 2018

Codecov Report

Merging #1183 into master will increase coverage by 0.53%.
The diff coverage is 79.41%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1183      +/-   ##
============================================
+ Coverage     83.44%   83.98%   +0.53%     
- Complexity     3674     4496     +822     
============================================
  Files           342      349       +7     
  Lines         28206    29807    +1601     
  Branches       5285     5451     +166     
============================================
+ Hits          23537    25032    +1495     
- Misses         3077     3170      +93     
- Partials       1592     1605      +13
Impacted Files Coverage Δ Complexity Δ
.../main/java/reactor/core/publisher/MonoMetrics.java 0% <0%> (ø) 0 <0> (?)
...ore/src/main/java/reactor/core/publisher/Mono.java 94.16% <16.66%> (-0.77%) 481 <1> (+236)
...ore/src/main/java/reactor/core/publisher/Flux.java 98.95% <37.5%> (-0.65%) 963 <2> (+459)
...va/reactor/core/publisher/FluxMetricsFuseable.java 76.92% <76.92%> (ø) 2 <2> (?)
...va/reactor/core/publisher/MonoMetricsFuseable.java 76.92% <76.92%> (ø) 2 <2> (?)
.../main/java/reactor/core/publisher/FluxMetrics.java 91.39% <91.39%> (ø) 7 <7> (?)
...c/main/java/reactor/core/scheduler/Schedulers.java 83.76% <0%> (-1.96%) 87% <0%> (+32%)
...java/reactor/core/publisher/FluxBufferTimeout.java 72.02% <0%> (-0.7%) 3% <0%> (ø)
...eactor/core/publisher/ParallelMergeSequential.java 79.79% <0%> (-0.52%) 7% <0%> (ø)
... and 21 more

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 edfdd9e...57a11fd. Read the comment docs.

@simonbasle simonbasle force-pushed the 1123-metrics branch 2 times, most recently from cd7ecc7 to c0f332a Compare May 2, 2018 21:35
@smaldini smaldini added the type/enhancement A general enhancement label May 5, 2018
@smaldini smaldini added this to the 3.2.0.RELEASE milestone May 5, 2018
@smaldini
Copy link
Contributor

smaldini commented May 7, 2018

Given how frequent or transverse this could be, we should add microfusion support as well.

@smaldini
Copy link
Contributor

smaldini commented May 7, 2018

Should metrics for Schedulers be in a separate PR ?

@simonbasle
Copy link
Member Author

simonbasle commented May 9, 2018

Should metrics for Schedulers be in a separate PR ?

Yes I think it would make sense to consider this a MVP and fine tune meters and/or add instrumentation of schedulers in another PR

Given how frequent or transverse this could be, we should add microfusion support as well.

I'm on it 👍

simonbasle added 20 commits May 9, 2018 15:14
In particular, the counters for error/complete/cancel are removed in
favor of a tag on the subscribeToTermination timer, allowing for a
drill-down-and-count approach.

Tags (in the reactor sense) and sequence name are discovered at assembly
time and injected as micrometer tags.
A Gauge with the same name and tags cannot wrap multiple AtomicLongs.
A counter is more appropriate, but it cannot be decreased. It makes far
less sense for a "generic" application-level point of view, so it is
only activated when the Flux has been named.
broken: due to Gradle/IntelliJ integration, IntelliJ thinks micrometer
is on all tests classpath as soon as it discovers metricsTest is a
test sourceSet. On the other hand, if it doesn't recognize it as a
test sourceSet, the code is marked as production which is also
undesirable...
simonbasle added 3 commits May 9, 2018 16:40
The aim is to delay any explicit use of Micrometer types until
subscription, so that the operator can still be instantiated even though
Micrometer isn't on the classpath.
@simonbasle
Copy link
Member Author

simonbasle commented May 17, 2018

TODO:

  • make the Metrics class package-private (we don't expect most people to interact with meters programmatically, so they won't really need the constants)

@simonbasle simonbasle requested a review from smaldini May 17, 2018 17:33
@simonbasle simonbasle merged commit 425bf5c into master May 18, 2018
@simonbasle simonbasle deleted the 1123-metrics branch May 18, 2018 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants