Skip to content

Disable metrics when active=false#653

Merged
felixbarny merged 2 commits intoelastic:masterfrom
felixbarny:disable-metrics-when-deactive
Jun 11, 2019
Merged

Disable metrics when active=false#653
felixbarny merged 2 commits intoelastic:masterfrom
felixbarny:disable-metrics-when-deactive

Conversation

@felixbarny
Copy link
Member

No description provided.

Copy link
Contributor

@eyalkoren eyalkoren left a comment

Choose a reason for hiding this comment

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

Great. Two comments:

  1. When active=false is used on startup, users may expect no communication is attempted with the server, so check also before doing the health check.
  2. Add a test to this disablement
@codecov-io
Copy link

codecov-io commented Jun 4, 2019

Codecov Report

Merging #653 into master will decrease coverage by 2.52%.
The diff coverage is 53.69%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #653      +/-   ##
============================================
- Coverage     64.77%   62.24%   -2.53%     
  Complexity       68       68              
============================================
  Files           195      199       +4     
  Lines          8088     7782     -306     
  Branches       1025      959      -66     
============================================
- Hits           5239     4844     -395     
- Misses         2547     2640      +93     
+ Partials        302      298       -4
Impacted Files Coverage Δ Complexity Δ
...m/agent/jms/JmsMessageListenerInstrumentation.java 0% <0%> (ø) 0 <0> (?)
...astic/apm/agent/jdbc/StatementInstrumentation.java 50% <0%> (-1.73%) 0 <0> (ø)
.../elastic/apm/agent/jms/BaseJmsInstrumentation.java 0% <0%> (ø) 0 <0> (?)
...m/agent/jms/JmsMessageProducerInstrumentation.java 0% <0%> (ø) 0 <0> (?)
.../elastic/apm/agent/jdbc/helper/JdbcHelperImpl.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...lastic/apm/agent/jms/JmsInstrumentationHelper.java 0% <0%> (ø) 0 <0> (?)
...ic/apm/agent/jms/JmsInstrumentationHelperImpl.java 0% <0%> (ø) 0 <0> (?)
...m/agent/jms/JmsMessageConsumerInstrumentation.java 0% <0%> (ø) 0 <0> (?)
...lastic/apm/agent/logging/LoggingConfiguration.java 92.3% <100%> (+0.12%) 0 <0> (ø) ⬇️
...m/agent/jdbc/PreparedStatementInstrumentation.java 47.61% <50%> (-3.9%) 0 <0> (ø)
... and 30 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 70cde50...1052c75. Read the comment docs.

@felixbarny
Copy link
Member Author

I'm not really sure how to properly test that tbh. Not sure if the effort is worth it, especially as it's not a really critical component.

@felixbarny felixbarny merged commit 731636b into elastic:master Jun 11, 2019
@felixbarny felixbarny deleted the disable-metrics-when-deactive branch June 11, 2019 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants