Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,18 @@ object InstrumentNewExecutorServiceOnPekko {
@SuperCall callable: Callable[ExecutorService]
): ExecutorService = {
val executor = callable.call()
val actorSystemName = factory.dispatcherPrerequisites.settings.name
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 = factory.dispatcherPrerequisites.defaultExecutionContext
val defaultEcOption = Option(factory.dispatcherPrerequisites)
.flatMap(_.defaultExecutionContext)

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