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

Fix noop handling for Transactions and Spans #75

Merged
merged 1 commit into from
Apr 30, 2018

Conversation

felixbarny
Copy link
Member

@felixbarny felixbarny commented Apr 30, 2018

  • Adds Transaction.noop flag
  • noop Transactions don't get reported
  • noop Transactions are not a singleton, as this leads or threading issues
  • startSpan returns null if current transaction is null or noop
  • public api never returns null span but returns noop span

fixes #71

Signed-off-by: Felix Barnsteiner felix.barnsteiner@elastic.co

- Adds Transaction.noop flag
- noop Transactions don't get reported
- noop Transactions are not a singleton, as this leads or threading issues
- startSpan returns null if current transaction is null or noop
- public api never returns null span but returns noop span

fixes elastic#71

Signed-off-by: Felix Barnsteiner <felix.barnsteiner@elastic.co>
@felixbarny felixbarny merged commit 7079828 into elastic:master Apr 30, 2018
@felixbarny felixbarny deleted the fix-noops branch April 30, 2018 19:01
@codecov-io
Copy link

Codecov Report

Merging #75 into master will increase coverage by 0.31%.
The diff coverage is 88.46%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #75      +/-   ##
============================================
+ Coverage     75.77%   76.08%   +0.31%     
+ Complexity      723      721       -2     
============================================
  Files            78       78              
  Lines          2621     2622       +1     
  Branches        233      237       +4     
============================================
+ Hits           1986     1995       +9     
+ Misses          497      495       -2     
+ Partials        138      132       -6
Impacted Files Coverage Δ Complexity Δ
...ava/co/elastic/apm/opentracing/ApmSpanBuilder.java 79.36% <ø> (ø) 20 <0> (ø) ⬇️
...i/src/main/java/co/elastic/apm/api/ElasticApm.java 43.58% <0%> (-1.15%) 6 <0> (ø)
...ain/java/co/elastic/apm/impl/ElasticApmTracer.java 81.42% <100%> (+1.85%) 40 <4> (-1) ⬇️
...java/co/elastic/apm/jdbc/ApmJdbcEventListener.java 62.22% <100%> (+1.8%) 10 <2> (-2) ⬇️
...main/java/co/elastic/apm/opentracing/ApmScope.java 100% <100%> (ø) 6 <0> (+1) ⬆️
...a/co/elastic/apm/impl/transaction/Transaction.java 73.46% <100%> (+0.94%) 28 <2> (+1) ⬆️
...va/co/elastic/apm/opentracing/ApmScopeManager.java 100% <100%> (ø) 8 <0> (+1) ⬆️
.../main/java/co/elastic/apm/opentracing/ApmSpan.java 51.58% <50%> (+2.35%) 34 <0> (-2) ⬇️
... and 1 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 b453093...1b072c2. Read the comment docs.

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.

True no-op Transactions and Spans
3 participants