-
Notifications
You must be signed in to change notification settings - Fork 867
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add an spi to get access to bootstrap proxy from muzzle module
- Loading branch information
Showing
4 changed files
with
46 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...rc/main/java/io/opentelemetry/javaagent/tooling/bootstrap/BootstrapProxyProviderImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.javaagent.tooling.bootstrap; | ||
|
||
import com.google.auto.service.AutoService; | ||
import io.opentelemetry.javaagent.tooling.Utils; | ||
import io.opentelemetry.javaagent.tooling.muzzle.BootstrapProxyProvider; | ||
|
||
@AutoService(BootstrapProxyProvider.class) | ||
public class BootstrapProxyProviderImpl implements BootstrapProxyProvider { | ||
|
||
@Override | ||
public ClassLoader getBootstrapProxy() { | ||
return Utils.getBootstrapProxy(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
muzzle/src/main/java/io/opentelemetry/javaagent/tooling/muzzle/BootstrapProxyProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.javaagent.tooling.muzzle; | ||
|
||
/** This SPI can be used to find a class loader which can be used to look up bootstrap resources. */ | ||
public interface BootstrapProxyProvider { | ||
|
||
/** Provide a class loader which can be used to look up bootstrap resources. */ | ||
ClassLoader getBootstrapProxy(); | ||
} |