Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Hide trace scheduler from spring sleuth #2158

Merged
merged 1 commit into from
Jan 31, 2020
Merged

Hide trace scheduler from spring sleuth #2158

merged 1 commit into from
Jan 31, 2020

Conversation

JBodkin
Copy link
Contributor

@JBodkin JBodkin commented Jan 31, 2020

Fixes #2148, #2016.

@codecov
Copy link

codecov bot commented Jan 31, 2020

Codecov Report

Merging #2158 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2158      +/-   ##
============================================
+ Coverage     72.77%   72.79%   +0.02%     
- Complexity     1931     1933       +2     
============================================
  Files           245      245              
  Lines          7077     7083       +6     
  Branches        733      733              
============================================
+ Hits           5150     5156       +6     
  Misses         1587     1587              
  Partials        340      340
Flag Coverage Δ Complexity Δ
#integration ? ?
#unittests 72.79% <100%> (+0.02%) 1933 <4> (+2) ⬆️
Impacted Files Coverage Δ Complexity Δ
...igure/trace/StackdriverTraceAutoConfiguration.java 72.3% <100%> (+2.81%) 12 <4> (+2) ⬆️

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 540be0b...6814897. Read the comment docs.

Copy link
Contributor

@elefeint elefeint left a comment

Choose a reason for hiding this comment

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

I ran the trace integration tests; everything seems to be in order.

Thank you!

@Bean
@ConditionalOnMissingBean(name = "traceExecutorProvider")
public ExecutorProvider traceExecutorProvider(@Qualifier("traceSenderThreadPool") ThreadPoolTaskScheduler scheduler) {
public ExecutorProvider traceExecutorProvider(GcpTraceProperties traceProperties, @Qualifier("traceSenderThreadPool") Optional<ThreadPoolTaskScheduler> userProvidedScheduler) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Optional works here? I thought we have to use ObjectProvider.
cc/ @artembilan

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's OK to stick with Optional for simple use-cases.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Disabling auto-configuration of instrumenting executor beans reduces visibility
4 participants