Skip to content

Commit

Permalink
Merge branch 'master' into pekko_1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsimpson authored Oct 2, 2024
2 parents 6ce7303 + a478d3b commit a8b9931
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,18 @@ object InstrumentNewExecutorServiceOnPekko {
@SuperCall callable: Callable[ExecutorService]
): ExecutorService = {
val executor = callable.call()
if (factory.dispatcherPrerequisites == null)
println(s"Failed to find dispatcherPrerequisites on ${factory.getClass}:: $factory")
val actorSystemName = Option(factory.dispatcherPrerequisites).map(_.settings.name).getOrElse("--unknown actor--")
val actorSystemName = if (factory.dispatcherPrerequisites != null) {
factory.dispatcherPrerequisites.settings.name
} else {
"unknown"
}
val dispatcherName = factory.dispatcherName
val scheduledActionName = actorSystemName + "/" + dispatcherName
val systemTags = TagSet.of("pekko.system", actorSystemName)

if (Kamon.filter(PekkoInstrumentation.TrackDispatcherFilterName).accept(dispatcherName)) {
val defaultEcOption = Option(factory.dispatcherPrerequisites).flatMap(_.defaultExecutionContext)
val defaultEcOption = Option(factory.dispatcherPrerequisites)
.flatMap(_.defaultExecutionContext)

if (dispatcherName == Dispatchers.DefaultDispatcherId && defaultEcOption.isDefined) {
ExecutorInstrumentation.instrumentExecutionContext(
Expand Down

0 comments on commit a8b9931

Please sign in to comment.