Skip to content

Implement central config polling #591

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

Merged
merged 1 commit into from
Jul 25, 2019
Merged

Implement central config polling #591

merged 1 commit into from
Jul 25, 2019

Conversation

axw
Copy link
Member

@axw axw commented Jul 19, 2019

We introduce a new package, apmconfig, which
defines a Watcher interface that can be used
for watching for central config changes.

When creating a new Tracer, it will use its
Transport for watching config if it implements
apmconfig.Watcher. The default HTTP transport
implements that interface.

The default behaviour of watching config can
be disabled by setting the new environment
variable ELASTIC_APM_CENTRAL_CONFIG to "false".

For now only the sampler can be updated via
central config. While there is central sampling
config defined, any locally defined Sampler will
be disregarded, whether it be specified via
environment variable or via SetSampler.

Closes #512

@axw
Copy link
Member Author

axw commented Jul 19, 2019

This branch has a reference to docs that are not yet current, so we can't merge this yet.
Moved the docs to a separate PR, #598.

@codecov-io
Copy link

Codecov Report

Merging #591 into master will increase coverage by 0.05%.
The diff coverage is 84.97%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #591      +/-   ##
=========================================
+ Coverage   84.64%   84.7%   +0.05%     
=========================================
  Files         121     122       +1     
  Lines        7218    7419     +201     
=========================================
+ Hits         6110    6284     +174     
- Misses        791     806      +15     
- Partials      317     329      +12
Impacted Files Coverage Δ
apmtest/configwatcher.go 100% <100%> (ø)
tracer.go 86.7% <70.96%> (-2.44%) ⬇️
env.go 78.57% <88.88%> (+0.79%) ⬆️
transport/http.go 91.22% <94.57%> (+1.28%) ⬆️
logger.go 66.66% <0%> (+16.66%) ⬆️
apmtest/testlogger.go 66.66% <0%> (+66.66%) ⬆️

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 1256237...afbde5f. Read the comment docs.

We introduce a new package, apmconfig, which
defines a Watcher interface that can be used
for watching for central config changes.

When creating a new Tracer, it will use its
Transport for watching config if it implements
apmconfig.Watcher. The default HTTP transport
implements that interface.

The default behaviour of watching config can
be disabled by setting the new environment
variable ELASTIC_APM_CENTRAL_CONFIG to "false".

For now only the sampler can be updated via
central config. While there is central sampling
config defined, any locally defined Sampler will
be disregarded, whether it be specified via
environment variable or via SetSampler.
@axw axw force-pushed the remote-config branch from afbde5f to a9b4c6b Compare July 25, 2019 08:30
@axw axw merged commit 050842d into elastic:master Jul 25, 2019
@axw axw deleted the remote-config branch July 25, 2019 09:59
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.

Remote config
2 participants