-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34990 from geoand/OpenTelemetry-synthetic
Use Synthetic bean for producing OpenTelemetry
- Loading branch information
Showing
5 changed files
with
125 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
.../opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/OpenTelemetryDestroyer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package io.quarkus.opentelemetry; | ||
|
||
import java.util.Map; | ||
|
||
import jakarta.enterprise.context.spi.CreationalContext; | ||
|
||
import io.opentelemetry.api.OpenTelemetry; | ||
import io.opentelemetry.sdk.OpenTelemetrySdk; | ||
import io.quarkus.arc.BeanDestroyer; | ||
|
||
public class OpenTelemetryDestroyer implements BeanDestroyer<OpenTelemetry> { | ||
@Override | ||
public void destroy(OpenTelemetry openTelemetry, CreationalContext<OpenTelemetry> creationalContext, | ||
Map<String, Object> params) { | ||
if (openTelemetry instanceof OpenTelemetrySdk) { | ||
var openTelemetrySdk = ((OpenTelemetrySdk) openTelemetry); | ||
openTelemetrySdk.getSdkTracerProvider().forceFlush(); | ||
openTelemetrySdk.getSdkTracerProvider().shutdown(); | ||
} | ||
} | ||
} |
82 changes: 0 additions & 82 deletions
82
...lemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/OpenTelemetryProducer.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
...io/quarkus/opentelemetry/runtime/exporter/otlp/RemoveableLateBoundBatchSpanProcessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters