generated from pagopa/template-java-spring-microservice
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tracing): propagate tracing information when enqueueing events
- Loading branch information
1 parent
0be0e9a
commit 29739bc
Showing
6 changed files
with
149 additions
and
94 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
26 changes: 26 additions & 0 deletions
26
src/main/kotlin/it/pagopa/ecommerce/transactions/scheduler/configurations/TracingConfig.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,26 @@ | ||
package it.pagopa.ecommerce.transactions.scheduler.configurations; | ||
|
||
import io.opentelemetry.api.GlobalOpenTelemetry; | ||
import io.opentelemetry.api.OpenTelemetry; | ||
import io.opentelemetry.api.trace.Tracer; | ||
import it.pagopa.ecommerce.commons.queues.TracingUtils; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class TracingConfig { | ||
@Bean | ||
public OpenTelemetry openTelemetry() { | ||
return GlobalOpenTelemetry.get(); | ||
} | ||
|
||
@Bean | ||
public Tracer tracer(OpenTelemetry openTelemetry) { | ||
return openTelemetry.getTracer("pagopa-ecommerce-transactions-scheduler-service"); | ||
} | ||
|
||
@Bean | ||
public TracingUtils tracingUtils(OpenTelemetry openTelemetry, Tracer tracer) { | ||
return new TracingUtils(openTelemetry, tracer); | ||
} | ||
} |
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
Oops, something went wrong.