-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a bean for telemetry wrapping to avoid making DataSources mutable
We had a hard time making it immutable so let's not break this contract. We had a lot of race conditions before doing so.
- Loading branch information
1 parent
e81ba26
commit 956f31a
Showing
7 changed files
with
31 additions
and
65 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
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
9 changes: 0 additions & 9 deletions
9
...src/main/java/io/quarkus/agroal/deployment/OpenTelemetryJDBCInstrumentationBuildItem.java
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
...s/agroal/runtime/src/main/java/io/quarkus/agroal/runtime/AgroalOpenTelemetryRecorder.java
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
...ns/agroal/runtime/src/main/java/io/quarkus/agroal/runtime/AgroalOpenTelemetryWrapper.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,13 @@ | ||
package io.quarkus.agroal.runtime; | ||
|
||
import java.util.function.Function; | ||
|
||
import io.agroal.api.AgroalDataSource; | ||
|
||
public class AgroalOpenTelemetryWrapper implements Function<AgroalDataSource, AgroalDataSource> { | ||
|
||
@Override | ||
public AgroalDataSource apply(AgroalDataSource originalDataSource) { | ||
return new OpenTelemetryAgroalDataSource(originalDataSource); | ||
} | ||
} |
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
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