github.com/asynkron/protoactor-go@v0.0.0-20240308120642-ef91a6abee75/actor/middleware/opentracing/middlewarepropagation.go (about)

     1  package opentracing
     2  
     3  import (
     4  	"github.com/asynkron/protoactor-go/actor"
     5  	"github.com/asynkron/protoactor-go/actor/middleware/propagator"
     6  )
     7  
     8  func TracingMiddleware() actor.SpawnMiddleware {
     9  	return propagator.New().
    10  		WithItselfForwarded().
    11  		WithSpawnMiddleware(SpawnMiddleware()).
    12  		WithSenderMiddleware(SenderMiddleware()).
    13  		WithReceiverMiddleware(ReceiverMiddleware()).
    14  		SpawnMiddleware
    15  }