Search in sources :

Example 1 with AdditionalLibraryIgnoredTypesConfigurer

use of io.opentelemetry.javaagent.tooling.ignore.AdditionalLibraryIgnoredTypesConfigurer in project opentelemetry-java-instrumentation by open-telemetry.

the class TestAgentListener method buildOtherConfiguredIgnores.

private static Trie<IgnoreAllow> buildOtherConfiguredIgnores() {
    Config config = Config.builder().build();
    IgnoredTypesBuilderImpl builder = new IgnoredTypesBuilderImpl();
    for (IgnoredTypesConfigurer configurer : SafeServiceLoader.loadOrdered(IgnoredTypesConfigurer.class)) {
        // skip built-in agent ignores
        if (configurer instanceof AdditionalLibraryIgnoredTypesConfigurer || configurer instanceof GlobalIgnoredTypesConfigurer) {
            continue;
        }
        configurer.configure(config, builder);
    }
    return builder.buildIgnoredTypesTrie();
}
Also used : IgnoredTypesConfigurer(io.opentelemetry.javaagent.extension.ignore.IgnoredTypesConfigurer) AdditionalLibraryIgnoredTypesConfigurer(io.opentelemetry.javaagent.tooling.ignore.AdditionalLibraryIgnoredTypesConfigurer) GlobalIgnoredTypesConfigurer(io.opentelemetry.javaagent.tooling.ignore.GlobalIgnoredTypesConfigurer) Config(io.opentelemetry.instrumentation.api.config.Config) IgnoredTypesBuilderImpl(io.opentelemetry.javaagent.tooling.ignore.IgnoredTypesBuilderImpl) GlobalIgnoredTypesConfigurer(io.opentelemetry.javaagent.tooling.ignore.GlobalIgnoredTypesConfigurer) AdditionalLibraryIgnoredTypesConfigurer(io.opentelemetry.javaagent.tooling.ignore.AdditionalLibraryIgnoredTypesConfigurer)

Example 2 with AdditionalLibraryIgnoredTypesConfigurer

use of io.opentelemetry.javaagent.tooling.ignore.AdditionalLibraryIgnoredTypesConfigurer in project opentelemetry-java-instrumentation by open-telemetry.

the class TestAgentListener method buildAdditionalLibraryIgnores.

private static Trie<IgnoreAllow> buildAdditionalLibraryIgnores() {
    IgnoredTypesBuilderImpl builder = new IgnoredTypesBuilderImpl();
    new AdditionalLibraryIgnoredTypesConfigurer().configure(builder);
    return builder.buildIgnoredTypesTrie();
}
Also used : IgnoredTypesBuilderImpl(io.opentelemetry.javaagent.tooling.ignore.IgnoredTypesBuilderImpl) AdditionalLibraryIgnoredTypesConfigurer(io.opentelemetry.javaagent.tooling.ignore.AdditionalLibraryIgnoredTypesConfigurer)

Aggregations

AdditionalLibraryIgnoredTypesConfigurer (io.opentelemetry.javaagent.tooling.ignore.AdditionalLibraryIgnoredTypesConfigurer)2 IgnoredTypesBuilderImpl (io.opentelemetry.javaagent.tooling.ignore.IgnoredTypesBuilderImpl)2 Config (io.opentelemetry.instrumentation.api.config.Config)1 IgnoredTypesConfigurer (io.opentelemetry.javaagent.extension.ignore.IgnoredTypesConfigurer)1 GlobalIgnoredTypesConfigurer (io.opentelemetry.javaagent.tooling.ignore.GlobalIgnoredTypesConfigurer)1