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

Expand central config support #648

Merged
merged 1 commit into from
Oct 10, 2019
Merged

Expand central config support #648

merged 1 commit into from
Oct 10, 2019

Conversation

axw
Copy link
Member

@axw axw commented Oct 9, 2019

Add central config support for ELASTIC_APM_CAPTURE_BODY
and ELASTIC_APM_TRANSACTION_MAX_SPANS.

The initial code for central config contained some hacks
specifically around the initially supported config for
controlling sampling. The code has been refactored to
support additional config attributes. In doing so, we
now have a single "instrumentationConfig" object on the
Tracer, which gets swapped out atomically when a config
change occurs, either via the API or via central config.
This has the added benefit of being slightly faster, as
we're no longer using RWMutexes, and also neater as we
now have a single immutable config object (excluding
tracer-internal config).

Closes #647

@codecov-io
Copy link

codecov-io commented Oct 10, 2019

Codecov Report

Merging #648 into master will increase coverage by 0.07%.
The diff coverage is 89.03%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #648      +/-   ##
=========================================
+ Coverage   87.83%   87.9%   +0.07%     
=========================================
  Files         123     123              
  Lines        7601    7640      +39     
=========================================
+ Hits         6676    6716      +40     
  Misses        821     821              
+ Partials      104     103       -1
Impacted Files Coverage Δ
tracer.go 91.37% <100%> (+1.99%) ⬆️
error.go 95.73% <100%> (-0.05%) ⬇️
capturebody.go 95.38% <100%> (-0.14%) ⬇️
transaction.go 97.29% <100%> (-0.21%) ⬇️
span.go 94.51% <100%> (-0.1%) ⬇️
config.go 82% <80.45%> (ø)
transport/http.go 95.41% <0%> (+1.14%) ⬆️

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 693514a...e1ef314. Read the comment docs.

Add central config support for ELASTIC_APM_CAPTURE_BODY
and ELASTIC_APM_TRANSACTION_MAX_SPANS.

The initial code for central config contained some hacks
specifically around the initially supported config for
controlling sampling. The code has been refactored to
support additional config attributes. In doing so, we
now have a single "instrumentationConfig" object on the
Tracer, which gets swapped out atomically when a config
change occurs, either via the API or via central config.
This has the added benefit of being slightly faster, as
we're no longer using RWMutexes, and also neater as we
now have a single immutable config object (excluding
tracer-internal config).
@axw axw merged commit 5101f91 into elastic:master Oct 10, 2019
@axw axw deleted the acm-next branch October 10, 2019 06:58
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.

Add central config support for CAPTURE_BODY, TRANSACTION_MAX_SPANS
2 participants