Skip to content

[PLUGIN-1727] Remove opencensus-impl dependency from GCS connector #1342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,10 @@
<artifactId>grpc-api</artifactId>
<groupId>io.grpc</groupId>
</exclusion>
<exclusion>
<groupId>io.opencensus</groupId>
<artifactId>opencensus-impl</artifactId>
</exclusion>
<exclusion>
<artifactId>grpc-census</artifactId>
<groupId>io.grpc</groupId>
Expand Down Expand Up @@ -962,6 +966,39 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<id>enforce-banned-dependencies</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedDependencies>
<excludes>
<exclude>io.opencensus:opencensus-impl</exclude>
</excludes>
<message>
Exclude Open Census implementations to disable Open Census stats and tracing.
They are not used by the plugins. For tracing, Open Census spawns a new thread
and loads a single global instance of a TracingComponent. CDAP uses a separate
class loader for each plugin. This leads to spawning a new thread for each plugin
with the Open Census dependency. As this thread keeps a reference to the class
loader, it prevents the class loader from being garbage collected leading
to leaks. If no implementation of TracingComponent is found at runtime,
Open Census uses a NoopTraceComponent.
</message>
</bannedDependencies>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down