Skip to content

Commit

Permalink
Remove opencensus-impl dependency from gcs connector
Browse files Browse the repository at this point in the history
  • Loading branch information
arjan-bal committed Dec 2, 2023
1 parent 4a086e7 commit e51d7e5
Showing 1 changed file with 37 additions and 0 deletions.
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

0 comments on commit e51d7e5

Please sign in to comment.