io.opentelemetry.javaagent.tooling.muzzle.HelperResourceBuilderImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opentelemetry-muzzle Show documentation
Show all versions of opentelemetry-muzzle Show documentation
Instrumentation of Java libraries using OpenTelemetry.
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.javaagent.tooling.muzzle;
import io.opentelemetry.javaagent.extension.instrumentation.HelperResourceBuilder;
import java.util.ArrayList;
import java.util.List;
public class HelperResourceBuilderImpl implements HelperResourceBuilder {
private final List resources = new ArrayList<>();
@Override
public void register(String applicationResourcePath, String agentResourcePath) {
resources.add(
HelperResource.create(
applicationResourcePath, agentResourcePath, /* allClassLoaders= */ false));
}
@Override
public void registerForAllClassLoaders(String applicationResourcePath, String agentResourcePath) {
resources.add(
HelperResource.create(
applicationResourcePath, agentResourcePath, /* allClassLoaders= */ true));
}
public List getResources() {
return resources;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy