Skip to content

Adding class exclusion from instrumentation config#1187

Merged
eyalkoren merged 4 commits intoelastic:masterfrom
eyalkoren:adding-class-exclusion-property
May 19, 2020
Merged

Adding class exclusion from instrumentation config#1187
eyalkoren merged 4 commits intoelastic:masterfrom
eyalkoren:adding-class-exclusion-property

Conversation

@eyalkoren
Copy link
Contributor

Adding (and exposing) the ability to exclude classes from instrumentation without having to override the default excluded classes.
For example - https://discuss.elastic.co/t/how-to-ignore-certain-spans/232625

@eyalkoren eyalkoren requested a review from SylvainJuge May 17, 2020 15:54
@eyalkoren eyalkoren self-assigned this May 17, 2020
@ghost
Copy link

ghost commented May 17, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

Test stats 🧪

Test Results
Failed 0
Passed 1322
Skipped 12
Total 1334

@codecov-io
Copy link

codecov-io commented May 17, 2020

Codecov Report

Merging #1187 into master will decrease coverage by 4.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1187      +/-   ##
============================================
- Coverage     63.25%   59.20%   -4.05%     
- Complexity     2943     2983      +40     
============================================
  Files           292      338      +46     
  Lines         14489    15918    +1429     
  Branches       2006     2223     +217     
============================================
+ Hits           9165     9425     +260     
- Misses         4696     5845    +1149     
- Partials        628      648      +20     
Impacted Files Coverage Δ Complexity Δ
...java/co/elastic/apm/agent/bci/ElasticApmAgent.java 73.85% <100.00%> (+0.09%) 43.00 <0.00> (ø)
...tic/apm/agent/configuration/CoreConfiguration.java 97.28% <100.00%> (+0.07%) 36.00 <1.00> (+1.00)
...nt/configuration/converter/ListValueConverter.java 43.47% <0.00%> (-39.86%) 4.00% <0.00%> (ø%)
...ration/source/PropertyFileConfigurationSource.java 30.26% <0.00%> (-35.46%) 10.00% <0.00%> (ø%)
...tion/source/SystemPropertyConfigurationSource.java 23.07% <0.00%> (-26.93%) 3.00% <0.00%> (ø%)
...c/main/java/co/elastic/apm/agent/util/IOUtils.java 40.19% <0.00%> (-23.87%) 10.00% <0.00%> (ø%)
...ic/apm/opentracing/ExternalProcessSpanContext.java 100.00% <0.00%> (ø) 6.00% <0.00%> (?%)
...h/src/main/java/co/elastic/apm/attach/JvmInfo.java 50.00% <0.00%> (ø) 2.00% <0.00%> (?%)
...ntracing/impl/ElasticApmTracerInstrumentation.java 0.00% <0.00%> (ø) 0.00% <0.00%> (?%)
.../apm/agent/kafka/KafkaProducerInstrumentation.java 0.00% <0.00%> (ø) 0.00% <0.00%> (?%)
... and 45 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 46b8626...16d769d. Read the comment docs.

@eyalkoren eyalkoren changed the title Adding class exclusing from instrumentation config Adding class exclusion from instrumentation config May 18, 2020

private final ConfigurationOption<List<WildcardMatcher>> defaultClassesExcludedFromInstrumentation = ConfigurationOption
.builder(new ListValueConverter<>(new WildcardMatcherValueConverter()), List.class)
.key("default_classes_excluded_from_instrumentation")
Copy link
Member

Choose a reason for hiding this comment

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

Maybe classes_excluded_from_instrumentation_default so that the prefix is the same? Feel free to ignore though

@codecov-commenter
Copy link

Codecov Report

Merging #1187 into master will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1187      +/-   ##
============================================
+ Coverage     59.14%   59.21%   +0.06%     
  Complexity       83       83              
============================================
  Files           338      338              
  Lines         15910    15919       +9     
  Branches       2222     2223       +1     
============================================
+ Hits           9410     9426      +16     
+ Misses         5852     5846       -6     
+ Partials        648      647       -1     
Impacted Files Coverage Δ Complexity Δ
...java/co/elastic/apm/agent/bci/ElasticApmAgent.java 73.85% <100.00%> (+0.09%) 0.00 <0.00> (ø)
...tic/apm/agent/configuration/CoreConfiguration.java 97.28% <100.00%> (+0.07%) 0.00 <0.00> (ø)
...ic/apm/agent/profiler/collections/LongHashSet.java 17.46% <0.00%> (-0.80%) 0.00% <0.00%> (ø%)
...tic/apm/agent/report/AbstractIntakeApiHandler.java 77.08% <0.00%> (+5.20%) 0.00% <0.00%> (ø%)
.../bci/bytebuddy/SoftlyReferencingTypePoolCache.java 93.75% <0.00%> (+12.50%) 0.00% <0.00%> (ø%)

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 2f74b21...59d396b. Read the comment docs.

@eyalkoren eyalkoren merged commit f7ab87d into elastic:master May 19, 2020
@eyalkoren eyalkoren deleted the adding-class-exclusion-property branch May 19, 2020 10:52
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.

4 participants