-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update gateway application and some other minor updates to others
Signed-off-by: Eric Deandrea <[email protected]>
- Loading branch information
Showing
5 changed files
with
48 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
quarkus.application.name=inventory | ||
|
||
# Dev Spaces configurations | ||
%dev.quarkus.dev-ui.cors.enabled=false | ||
|
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
30 changes: 30 additions & 0 deletions
30
orders/src/main/java/io/konveyor/demo/orders/config/OtelDataSourceConfig.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,30 @@ | ||
package io.konveyor.demo.orders.config; | ||
|
||
import javax.sql.DataSource; | ||
|
||
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; | ||
import org.springframework.boot.jdbc.DataSourceBuilder; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import io.opentelemetry.api.OpenTelemetry; | ||
import io.opentelemetry.instrumentation.jdbc.datasource.JdbcTelemetry; | ||
|
||
/** | ||
* This class is needed to allow tracing down to the JDBC level. | ||
* Taken from https://opentelemetry.io/docs/languages/java/automatic/spring-boot/#jdbc-instrumentation | ||
*/ | ||
@Configuration | ||
public class OtelDataSourceConfig { | ||
@Bean | ||
public DataSource dataSource(DataSourceProperties dataSourceProperties, OpenTelemetry openTelemetry) { | ||
var dataSource = DataSourceBuilder.create() | ||
.driverClassName(dataSourceProperties.determineDriverClassName()) | ||
.url(dataSourceProperties.determineUrl()) | ||
.username(dataSourceProperties.getUsername()) | ||
.password(dataSourceProperties.getPassword()) | ||
.build(); | ||
|
||
return JdbcTelemetry.create(openTelemetry).wrap(dataSource); | ||
} | ||
} |
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