Skip to content

Commit

Permalink
Add explicit dependency on opentelemetry-sdk. Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
rnc committed Nov 21, 2022
1 parent 28ee799 commit ffca4c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@
<artifactId>opentelemetry-sdk-extension-autoconfigure-spi</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-semconv</artifactId>
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/com/redhat/resilience/otel/OTelCLIHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,11 @@ public void stopOTel()
{
if ( otelEnabled() )
{
log.debug("Finishing OTEL instrumentation for {}", root);
root.end();
log.debug("Finishing OpenTelemetry instrumentation for {}", root);
if (root != null)
{
root.end();
}
spanProcessor.close();
spanProcessor = null;
}
Expand Down

0 comments on commit ffca4c7

Please sign in to comment.