Skip to content

Commit

Permalink
reorder akka code too
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning committed Sep 19, 2024
1 parent 9ee4df3 commit 1d7626e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,12 @@ object InstrumentNewExecutorServiceOnAkka24 {

def around(@This factory: HasDispatcherPrerequisites with HasDispatcherName, @SuperCall callable: Callable[ExecutorService]): ExecutorService = {
val executor = callable.call()
val actorSystemName = factory.dispatcherPrerequisites.settings.name
val dispatcherName = factory.dispatcherName
val scheduledActionName = actorSystemName + "/" + dispatcherName
val systemTags = TagSet.of("akka.system", actorSystemName)


if(Kamon.filter(AkkaInstrumentation.TrackDispatcherFilterName).accept(dispatcherName)) {
val actorSystemName = factory.dispatcherPrerequisites.settings.name
val scheduledActionName = actorSystemName + "/" + dispatcherName
val systemTags = TagSet.of("akka.system", actorSystemName)
val defaultEcOption = factory.dispatcherPrerequisites.defaultExecutionContext

if(dispatcherName == Dispatchers.DefaultDispatcherId && defaultEcOption.isDefined) {
Expand All @@ -142,12 +141,12 @@ object InstrumentNewExecutorServiceOnAkka25 {

def around(@This factory: HasDispatcherPrerequisites with HasDispatcherName, @SuperCall callable: Callable[ExecutorService]): ExecutorService = {
val executor = callable.call()
val actorSystemName = factory.dispatcherPrerequisites.settings.name
val dispatcherName = factory.dispatcherName
val scheduledActionName = actorSystemName + "/" + dispatcherName
val systemTags = TagSet.of("akka.system", actorSystemName)

if(Kamon.filter(AkkaInstrumentation.TrackDispatcherFilterName).accept(dispatcherName)) {
val actorSystemName = factory.dispatcherPrerequisites.settings.name
val scheduledActionName = actorSystemName + "/" + dispatcherName
val systemTags = TagSet.of("akka.system", actorSystemName)
val defaultEcOption = factory.dispatcherPrerequisites.defaultExecutionContext

if(dispatcherName == Dispatchers.DefaultDispatcherId && defaultEcOption.isDefined) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ object InstrumentNewExecutorServiceOnAkka26 {

@static def around(@This factory: HasDispatcherPrerequisites with HasDispatcherName, @SuperCall callable: Callable[ExecutorService]): ExecutorService = {
val executor = callable.call()
val actorSystemName = factory.dispatcherPrerequisites.settings.name
val dispatcherName = factory.dispatcherName
val scheduledActionName = actorSystemName + "/" + dispatcherName
val systemTags = TagSet.of("akka.system", actorSystemName)

if(Kamon.filter(AkkaInstrumentation.TrackDispatcherFilterName).accept(dispatcherName)) {
val actorSystemName = factory.dispatcherPrerequisites.settings.name
val scheduledActionName = actorSystemName + "/" + dispatcherName
val systemTags = TagSet.of("akka.system", actorSystemName)
val defaultEcOption = factory.dispatcherPrerequisites.defaultExecutionContext

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

0 comments on commit 1d7626e

Please sign in to comment.