Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into indy-dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
felixbarny committed Jul 1, 2020
2 parents 4f56565 + e6737ac commit 55d987b
Show file tree
Hide file tree
Showing 33 changed files with 226 additions and 576 deletions.
15 changes: 0 additions & 15 deletions .github/PULL_REQUEST_TEMPLATE/bug_fix.md

This file was deleted.

11 changes: 0 additions & 11 deletions .github/PULL_REQUEST_TEMPLATE/docs.md

This file was deleted.

24 changes: 0 additions & 24 deletions .github/PULL_REQUEST_TEMPLATE/enhancement.md

This file was deleted.

28 changes: 0 additions & 28 deletions .github/PULL_REQUEST_TEMPLATE/new_plugin.md

This file was deleted.

34 changes: 34 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## What does this PR do?
<!--
Replace this comment with a description of what's being changed by this PR.
Please explain the WHAT: A clear and concise description of what (patterns used, algorithms implemented, design architecture, message processing, etc.)
Can be as simple as Fixes #123 if there's a corresponding issue.
-->

## Checklist
<!--
You only have to fill one category of checkboxes, depending on the type of the PR.
Please DO NOT remove any item, ~~striking through~~ those that do not apply.
Just ignore the checkboxes of categories that don't apply.
-->

- [ ] This is an enhancement of existing features, or a new feature in existing plugins
- [ ] I have updated [CHANGELOG.asciidoc](CHANGELOG.asciidoc)
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] Added an API method or config option? Document in which version this will be introduced
- [ ] I have made corresponding changes to the documentation
- [ ] This is a bugfix
- [ ] I have updated [CHANGELOG.asciidoc](CHANGELOG.asciidoc)
- [ ] I have added tests that would fail without this fix
- [ ] This is a new plugin
- [ ] I have updated [CHANGELOG.asciidoc](CHANGELOG.asciidoc)
- [ ] My code follows the [style guidelines of this project](https://github.com/elastic/apm-agent-java/blob/master/CONTRIBUTING.md#java-language-formatting-guidelines)
- [ ] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing [**unit** tests](https://github.com/elastic/apm-agent-java/blob/master/CONTRIBUTING.md#testing) pass locally with my changes
- [ ] I have updated [CHANGELOG.asciidoc](https://github.com/elastic/apm-agent-java/blob/master/CHANGELOG.asciidoc)
- [ ] I have updated [supported-technologies.asciidoc](https://github.com/elastic/apm-agent-java/blob/master/docs/supported-technologies.asciidoc)
- [ ] Added an API method or config option? Document in which version this will be introduced
- [ ] Added an instrumentation plugin? Describe how you made sure that old, non-supported versions are not instrumented by accident.
- [ ] This is something else
- [ ] I have updated [CHANGELOG.asciidoc](CHANGELOG.asciidoc)
5 changes: 5 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ endif::[]
[float]
===== Features
* Experimental support for runtime attachment now also for OSGi containers, JBoss, and WildFly
* New mitigation of OSGi bootdelegation errors (`NoClassDefFoundError`).
You can remove any `org.osgi.framework.bootdelegation` related configuration.
This release also removes the configuration option `boot_delegation_packages`.
* Overhaul of the `ExecutorService` instrumentation that avoids issues like ``ClassCastException``s - {pull}1206[#1206]
* Support for `ForJoinPool` and `ScheduledExecutorService` (see <<supported-async-frameworks>>)
* Support for `ExecutorService#invokeAny` and `ExecutorService#invokeAll`
Expand All @@ -42,6 +46,7 @@ endif::[]
* Fixes `NullPointerException` related to JAX-RS and Quartz instrumentation - {pull}1249[#1249]
* Expanding k8s pod ID discovery to some formerly non-supported environments
* When `recording` is set to `false`, the agent will not send captured errors anymore.
* Fixes NPE in Dubbo instrumentation that occurs when the application is acting both as a provider and as a consumer - {pull}1260[#1260]
[[release-notes-1.x]]
=== Java Agent version 1.x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
* This class is loaded by the system classloader,
* and adds the rest of the agent to the bootstrap class loader search.
* <p>
* This is required to instrument Java core classes like {@link Runnable} and to enable boot delegation in OSGi environments.
* See {@link OsgiBootDelegationEnabler}.
* This is required to instrument Java core classes like {@link Runnable}.
* </p>
* <p>
* Note that this relies on the fact that the system classloader is a parent-first classloader and first asks the bootstrap classloader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ public Iterable<? extends List<Class<?>>> onError(int index, List<Class<?>> batc
.or(nameStartsWith("org.glowroot."))
.or(nameStartsWith("com.compuware."))
.or(nameStartsWith("io.sqreen."))
.or(nameStartsWith("com.contrastsecurity."))
.or(nameContains("javassist"))
.or(nameContains(".asm."))
.or(anyMatch(coreConfiguration.getDefaultClassesExcludedFromInstrumentation()))
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -482,34 +482,6 @@ public class CoreConfiguration extends ConfigurationOptionProvider {
"the higher of both thresholds will determine which spans will be discarded.")
.buildWithDefault(TimeDuration.of("0ms"));

private final ConfigurationOption<String> appendPackagesToBootDelegationProperty = ConfigurationOption.stringOption()
.key("boot_delegation_packages")
.tags("added[1.7.0]")
.configurationCategory(CORE_CATEGORY)
.description("A comma-separated list of packages to be appended to the boot delegation system property. \n" +
"If set with an empty string, nothing will be appended to the boot delegation system property.\n" +
"Values to set in known environments:\n\n" +
"Nexus:\n\n" +
"----\n" +
"boot_delegation_packages=com.sun.*, javax.transaction, javax.transaction.*, javax.xml.crypto, javax.xml.crypto.*, sun.*," +
"co.elastic.apm.agent.*\n" +
"----\n\n" +
"Pentaho and RedHat JBoss Fuse:\n\n" +
"----\n" +
"boot_delegation_packages=org.apache.karaf.jaas.boot, org.apache.karaf.jaas.boot.principal, org.apache.karaf.management.boot, " +
"sun.*, com.sun.*, javax.transaction, javax.transaction.*, javax.xml.crypto, javax.xml.crypto.*, org.apache.xerces.jaxp.datatype, " +
"org.apache.xerces.stax, org.apache.xerces.parsers, org.apache.xerces.jaxp, org.apache.xerces.jaxp.validation, " +
"org.apache.xerces.dom, co.elastic.apm.agent.*\n" +
"----\n")
.buildWithDefault("co.elastic.apm.agent.*");

private final ConfigurationOption<Boolean> atlassianNewBootDelegation = ConfigurationOption.booleanOption()
.key("use_atlassian_new_boot_delegation")
.configurationCategory(CORE_CATEGORY)
.tags("internal")
.description("In new Atlassian OSGi there is a config to append to boot delegation packages instead of overriding the default.")
.buildWithDefault(false);

private final ConfigurationOption<Boolean> centralConfig = ConfigurationOption.booleanOption()
.key("central_config")
.tags("added[1.8.0]")
Expand Down Expand Up @@ -690,21 +662,6 @@ public TimeDuration getTraceMethodsDurationThreshold() {
return traceMethodsDurationThreshold.get();
}

public @Nullable String getPackagesToAppendToBootdelegationProperty() {
String value = appendPackagesToBootDelegationProperty.get();
if (value != null) {
value = value.trim();
if (value.isEmpty()) {
value = null;
}
}
return value;
}

public boolean useAtlassianNewBootDelegationConfig() {
return atlassianNewBootDelegation.get();
}

public Map<String, String> getGlobalLabels() {
return globalLabels.get();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
Expand Down Expand Up @@ -70,7 +70,7 @@ public static Sampler of(double samplingRate) {

@Override
public boolean isSampled(Id traceId) {
final long mostSignificantBits = traceId.getLeastSignificantBits();
return mostSignificantBits > lowerBound && mostSignificantBits < higherBound;
final long leastSignificantBits = traceId.getLeastSignificantBits();
return leastSignificantBits > lowerBound && leastSignificantBits < higherBound;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
co.elastic.apm.agent.configuration.StartupInfo
co.elastic.apm.agent.bci.OsgiBootDelegationEnabler
co.elastic.apm.agent.bci.MatcherTimerLifecycleListener
co.elastic.apm.agent.metrics.builtin.JvmMemoryMetrics
co.elastic.apm.agent.metrics.builtin.SystemMetrics
Expand Down
Loading

0 comments on commit 55d987b

Please sign in to comment.