diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b111536..90bb9b7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: env: FORCE_COLOR: 1 steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + - uses: actions/checkout@v4 with: submodules: false fetch-depth: 0 diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 3c137bd..77ff3c6 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -14,7 +14,7 @@ jobs: env: FORCE_COLOR: 1 steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + - uses: actions/checkout@v4 with: submodules: false fetch-depth: 0 diff --git a/actor.go b/actor.go index 4e823e3..94d6ca7 100644 --- a/actor.go +++ b/actor.go @@ -98,7 +98,7 @@ func (entity *actor) PreStart(ctx context.Context) error { } // Receive processes any message dropped into the actor mailbox. -func (entity *actor) Receive(ctx actors.ReceiveContext) { +func (entity *actor) Receive(ctx *actors.ReceiveContext) { _, span := telemetry.SpanContext(ctx.Context(), "Receive") defer span.End() @@ -157,7 +157,7 @@ func (entity *actor) recoverFromSnapshot(ctx context.Context) error { } // sendErrorReply sends an error as a reply message -func (entity *actor) sendErrorReply(ctx actors.ReceiveContext, err error) { +func (entity *actor) sendErrorReply(ctx *actors.ReceiveContext, err error) { reply := &egopb.CommandReply{ Reply: &egopb.CommandReply_ErrorReply{ ErrorReply: &egopb.ErrorReply{ @@ -170,7 +170,7 @@ func (entity *actor) sendErrorReply(ctx actors.ReceiveContext, err error) { } // getStateAndReply returns the current state of the entity -func (entity *actor) getStateAndReply(ctx actors.ReceiveContext) { +func (entity *actor) getStateAndReply(ctx *actors.ReceiveContext) { latestEvent, err := entity.eventsStore.GetLatestEvent(ctx.Context(), entity.ID()) if err != nil { entity.sendErrorReply(ctx, err) @@ -193,7 +193,7 @@ func (entity *actor) getStateAndReply(ctx actors.ReceiveContext) { } // processCommandAndReply processes the incoming command -func (entity *actor) processCommandAndReply(ctx actors.ReceiveContext, command Command) { +func (entity *actor) processCommandAndReply(ctx *actors.ReceiveContext, command Command) { goCtx := ctx.Context() events, err := entity.HandleCommand(goCtx, command, entity.currentState) if err != nil { diff --git a/engine.go b/engine.go index 10f2aaf..7c3d985 100644 --- a/engine.go +++ b/engine.go @@ -43,7 +43,6 @@ import ( "github.com/tochemey/ego/v3/egopb" "github.com/tochemey/ego/v3/eventstore" "github.com/tochemey/ego/v3/eventstream" - egotel "github.com/tochemey/ego/v3/internal/telemetry" "github.com/tochemey/ego/v3/offsetstore" "github.com/tochemey/ego/v3/projection" ) @@ -85,7 +84,7 @@ func NewEngine(name string, eventsStore eventstore.EventsStore, opts ...Option) name: name, eventsStore: eventsStore, enableCluster: atomic.NewBool(false), - logger: log.DefaultLogger, + logger: log.New(log.InfoLevel, os.Stderr), telemetry: telemetry.New(), eventStream: eventstream.New(), locker: &sync.Mutex{}, @@ -153,9 +152,6 @@ func (x *Engine) Start(ctx context.Context) error { // AddProjection add a projection to the running eGo engine and start it func (x *Engine) AddProjection(ctx context.Context, name string, handler projection.Handler, offsetStore offsetstore.OffsetStore, opts ...projection.Option) error { - spanCtx, span := egotel.SpanContext(ctx, "AddProjection") - defer span.End() - x.locker.Lock() started := x.started.Load() x.locker.Unlock() @@ -166,7 +162,7 @@ func (x *Engine) AddProjection(ctx context.Context, name string, handler project actor := projection.New(name, handler, x.eventsStore, offsetStore, opts...) var ( - pid actors.PID + pid *actors.PID err error ) @@ -174,12 +170,12 @@ func (x *Engine) AddProjection(ctx context.Context, name string, handler project actorSystem := x.actorSystem x.locker.Unlock() - if pid, err = actorSystem.Spawn(spanCtx, name, actor); err != nil { + if pid, err = actorSystem.Spawn(ctx, name, actor); err != nil { x.logger.Error(fmt.Errorf("failed to register the projection=(%s): %w", name, err)) return err } - if err := actors.Tell(spanCtx, pid, projection.Start); err != nil { + if err := actors.Tell(ctx, pid, projection.Start); err != nil { x.logger.Error(fmt.Errorf("failed to start the projection=(%s): %w", name, err)) return err } @@ -195,10 +191,7 @@ func (x *Engine) Stop(ctx context.Context) error { } // Subscribe creates an events subscriber -func (x *Engine) Subscribe(ctx context.Context) (eventstream.Subscriber, error) { - _, span := egotel.SpanContext(ctx, "Subscribe") - defer span.End() - +func (x *Engine) Subscribe() (eventstream.Subscriber, error) { x.locker.Lock() started := x.started.Load() x.locker.Unlock() @@ -251,9 +244,6 @@ func (x *Engine) Entity(ctx context.Context, behavior EntityBehavior) error { // 2. nil when there is no resulting state or no event persisted // 3. an error in case of error func (x *Engine) SendCommand(ctx context.Context, entityID string, cmd Command, timeout time.Duration) (resultingState State, revision uint64, err error) { - ctx, span := egotel.SpanContext(ctx, "SendCommand") - defer span.End() - x.locker.Lock() started := x.started.Load() x.locker.Unlock() diff --git a/engine_test.go b/engine_test.go index b2c6f95..446f69d 100644 --- a/engine_test.go +++ b/engine_test.go @@ -96,7 +96,7 @@ func TestEgo(t *testing.T) { require.NoError(t, err) // subscribe to events - subscriber, err := engine.Subscribe(ctx) + subscriber, err := engine.Subscribe() require.NoError(t, err) require.NotNil(t, subscriber) diff --git a/eventstore/memory/memory.go b/eventstore/memory/memory.go index 6cc23bc..872554d 100644 --- a/eventstore/memory/memory.go +++ b/eventstore/memory/memory.go @@ -41,7 +41,6 @@ import ( "github.com/tochemey/ego/v3/egopb" "github.com/tochemey/ego/v3/eventstore" - "github.com/tochemey/ego/v3/internal/telemetry" ) // EventsStore keep in memory every journal @@ -68,11 +67,7 @@ func NewEventsStore() *EventsStore { } // Connect connects to the journal store -func (s *EventsStore) Connect(ctx context.Context) error { - // add a span context - _, span := telemetry.SpanContext(ctx, "eventsStore.Connect") - defer span.End() - +func (s *EventsStore) Connect(context.Context) error { // check whether this instance of the journal is connected or not if s.connected.Load() { return nil @@ -94,11 +89,7 @@ func (s *EventsStore) Connect(ctx context.Context) error { } // Disconnect disconnect the journal store -func (s *EventsStore) Disconnect(ctx context.Context) error { - // add a span context - _, span := telemetry.SpanContext(ctx, "eventsStore.Disconnect") - defer span.End() - +func (s *EventsStore) Disconnect(context.Context) error { // check whether this instance of the journal is connected or not if !s.connected.Load() { return nil @@ -125,13 +116,9 @@ func (s *EventsStore) Disconnect(ctx context.Context) error { // Ping verifies a connection to the database is still alive, establishing a connection if necessary. func (s *EventsStore) Ping(ctx context.Context) error { - // add a span context - spanCtx, span := telemetry.SpanContext(ctx, "eventsStore.Ping") - defer span.End() - // check whether we are connected or not if !s.connected.Load() { - return s.Connect(spanCtx) + return s.Connect(ctx) } return nil @@ -139,11 +126,7 @@ func (s *EventsStore) Ping(ctx context.Context) error { // PersistenceIDs returns the distinct list of all the persistence ids in the journal store // FIXME: enhance the implementation. As it stands it will be a bit slow when there are a lot of records -func (s *EventsStore) PersistenceIDs(ctx context.Context, pageSize uint64, pageToken string) (persistenceIDs []string, nextPageToken string, err error) { - // add a span context - _, span := telemetry.SpanContext(ctx, "eventsStore.PersistenceIDs") - defer span.End() - +func (s *EventsStore) PersistenceIDs(_ context.Context, pageSize uint64, pageToken string) (persistenceIDs []string, nextPageToken string, err error) { // check whether this instance of the journal is connected or not if !s.connected.Load() { return nil, "", errors.New("journal store is not connected") @@ -214,11 +197,7 @@ func (s *EventsStore) PersistenceIDs(ctx context.Context, pageSize uint64, pageT } // WriteEvents persist events in batches for a given persistenceID -func (s *EventsStore) WriteEvents(ctx context.Context, events []*egopb.Event) error { - // add a span context - _, span := telemetry.SpanContext(ctx, "eventsStore.WriteEvents") - defer span.End() - +func (s *EventsStore) WriteEvents(_ context.Context, events []*egopb.Event) error { // check whether this instance of the journal is connected or not if !s.connected.Load() { return errors.New("journal store is not connected") @@ -266,11 +245,7 @@ func (s *EventsStore) WriteEvents(ctx context.Context, events []*egopb.Event) er // DeleteEvents deletes events from the store upt to a given sequence number (inclusive) // FIXME: enhance the implementation. As it stands it may be a bit slow when there are a lot of records -func (s *EventsStore) DeleteEvents(ctx context.Context, persistenceID string, toSequenceNumber uint64) error { - // add a span context - _, span := telemetry.SpanContext(ctx, "eventsStore.DeleteEvents") - defer span.End() - +func (s *EventsStore) DeleteEvents(_ context.Context, persistenceID string, toSequenceNumber uint64) error { // check whether this instance of the journal is connected or not if !s.connected.Load() { return errors.New("journal store is not connected") @@ -319,11 +294,7 @@ func (s *EventsStore) DeleteEvents(ctx context.Context, persistenceID string, to } // ReplayEvents fetches events for a given persistence ID from a given sequence number(inclusive) to a given sequence number(inclusive) -func (s *EventsStore) ReplayEvents(ctx context.Context, persistenceID string, fromSequenceNumber, toSequenceNumber uint64, max uint64) ([]*egopb.Event, error) { - // add a span context - _, span := telemetry.SpanContext(ctx, "eventsStore.ReplayEvents") - defer span.End() - +func (s *EventsStore) ReplayEvents(_ context.Context, persistenceID string, fromSequenceNumber, toSequenceNumber uint64, max uint64) ([]*egopb.Event, error) { // check whether this instance of the journal is connected or not if !s.connected.Load() { return nil, errors.New("journal store is not connected") @@ -392,11 +363,7 @@ func (s *EventsStore) ReplayEvents(ctx context.Context, persistenceID string, fr } // GetLatestEvent fetches the latest event -func (s *EventsStore) GetLatestEvent(ctx context.Context, persistenceID string) (*egopb.Event, error) { - // add a span context - _, span := telemetry.SpanContext(ctx, "eventsStore.GetLatestEvent") - defer span.End() - +func (s *EventsStore) GetLatestEvent(_ context.Context, persistenceID string) (*egopb.Event, error) { // check whether this instance of the journal is connected or not if !s.connected.Load() { return nil, errors.New("journal store is not connected") @@ -447,11 +414,7 @@ func (s *EventsStore) GetLatestEvent(ctx context.Context, persistenceID string) } // GetShardEvents returns the next (max) events after the offset in the journal for a given shard -func (s *EventsStore) GetShardEvents(ctx context.Context, shardNumber uint64, offset int64, max uint64) ([]*egopb.Event, int64, error) { - // add a span context - _, span := telemetry.SpanContext(ctx, "eventsStore.GetShardEvents") - defer span.End() - +func (s *EventsStore) GetShardEvents(_ context.Context, shardNumber uint64, offset int64, max uint64) ([]*egopb.Event, int64, error) { // check whether this instance of the journal is connected or not if !s.connected.Load() { return nil, 0, errors.New("journal store is not connected") @@ -533,11 +496,7 @@ func (s *EventsStore) GetShardEvents(ctx context.Context, shardNumber uint64, of } // ShardNumbers returns the distinct list of all the shards in the journal store -func (s *EventsStore) ShardNumbers(ctx context.Context) ([]uint64, error) { - // add a span context - _, span := telemetry.SpanContext(ctx, "eventsStore.NumShards") - defer span.End() - +func (s *EventsStore) ShardNumbers(context.Context) ([]uint64, error) { // check whether this instance of the journal is connected or not if !s.connected.Load() { return nil, errors.New("journal store is not connected") diff --git a/eventstore/postgres/postgres.go b/eventstore/postgres/postgres.go index 979d66e..6fa934f 100644 --- a/eventstore/postgres/postgres.go +++ b/eventstore/postgres/postgres.go @@ -38,7 +38,6 @@ import ( "github.com/tochemey/ego/v3/egopb" "github.com/tochemey/ego/v3/eventstore" - "github.com/tochemey/ego/v3/internal/telemetry" ) var ( @@ -90,9 +89,6 @@ func NewEventsStore(config *postgres.Config) *EventsStore { // Connect connects to the underlying postgres database func (s *EventsStore) Connect(ctx context.Context) error { - // add a span context - ctx, span := telemetry.SpanContext(ctx, "eventsStore.Connect") - defer span.End() // check whether this instance of the journal is connected or not if s.connected.Load() { return nil @@ -111,10 +107,6 @@ func (s *EventsStore) Connect(ctx context.Context) error { // Disconnect disconnects from the underlying postgres database func (s *EventsStore) Disconnect(ctx context.Context) error { - // add a span context - ctx, span := telemetry.SpanContext(ctx, "eventsStore.Disconnect") - defer span.End() - // check whether this instance of the journal is connected or not if !s.connected.Load() { return nil @@ -132,10 +124,6 @@ func (s *EventsStore) Disconnect(ctx context.Context) error { // Ping verifies a connection to the database is still alive, establishing a connection if necessary. func (s *EventsStore) Ping(ctx context.Context) error { - // add a span context - ctx, span := telemetry.SpanContext(ctx, "eventsStore.Ping") - defer span.End() - // check whether we are connected or not if !s.connected.Load() { return s.Connect(ctx) @@ -146,10 +134,6 @@ func (s *EventsStore) Ping(ctx context.Context) error { // PersistenceIDs returns the distinct list of all the persistence ids in the journal store func (s *EventsStore) PersistenceIDs(ctx context.Context, pageSize uint64, pageToken string) (persistenceIDs []string, nextPageToken string, err error) { - // add a span context - ctx, span := telemetry.SpanContext(ctx, "eventsStore.PersistenceIDs") - defer span.End() - // check whether this instance of the journal is connected or not if !s.connected.Load() { return nil, "", errors.New("journal store is not connected") @@ -201,10 +185,6 @@ func (s *EventsStore) PersistenceIDs(ctx context.Context, pageSize uint64, pageT // WriteEvents writes a bunch of events into the underlying postgres database func (s *EventsStore) WriteEvents(ctx context.Context, events []*egopb.Event) error { - // add a span context - ctx, span := telemetry.SpanContext(ctx, "eventsStore.WriteEvents") - defer span.End() - // check whether this instance of the journal is connected or not if !s.connected.Load() { return errors.New("journal store is not connected") @@ -288,10 +268,6 @@ func (s *EventsStore) WriteEvents(ctx context.Context, events []*egopb.Event) er // DeleteEvents deletes events from the postgres up to a given sequence number (inclusive) func (s *EventsStore) DeleteEvents(ctx context.Context, persistenceID string, toSequenceNumber uint64) error { - // add a span context - ctx, span := telemetry.SpanContext(ctx, "eventsStore.DeleteEvents") - defer span.End() - // check whether this instance of the journal is connected or not if !s.connected.Load() { return errors.New("journal store is not connected") @@ -319,10 +295,6 @@ func (s *EventsStore) DeleteEvents(ctx context.Context, persistenceID string, to // ReplayEvents fetches events for a given persistence ID from a given sequence number(inclusive) to a given sequence number(inclusive) func (s *EventsStore) ReplayEvents(ctx context.Context, persistenceID string, fromSequenceNumber, toSequenceNumber uint64, max uint64) ([]*egopb.Event, error) { - // add a span context - ctx, span := telemetry.SpanContext(ctx, "eventsStore.ReplayEvents") - defer span.End() - // check whether this instance of the journal is connected or not if !s.connected.Load() { return nil, errors.New("journal store is not connected") @@ -357,10 +329,6 @@ func (s *EventsStore) ReplayEvents(ctx context.Context, persistenceID string, fr // GetLatestEvent fetches the latest event func (s *EventsStore) GetLatestEvent(ctx context.Context, persistenceID string) (*egopb.Event, error) { - // add a span context - ctx, span := telemetry.SpanContext(ctx, "eventsStore.GetLatestEvent") - defer span.End() - // check whether this instance of the journal is connected or not if !s.connected.Load() { return nil, errors.New("journal store is not connected") @@ -398,10 +366,6 @@ func (s *EventsStore) GetLatestEvent(ctx context.Context, persistenceID string) // GetShardEvents returns the next (max) events after the offset in the journal for a given shard func (s *EventsStore) GetShardEvents(ctx context.Context, shardNumber uint64, offset int64, max uint64) ([]*egopb.Event, int64, error) { - // add a span context - ctx, span := telemetry.SpanContext(ctx, "eventsStore.GetShardEvents") - defer span.End() - // check whether this instance of the journal is connected or not if !s.connected.Load() { return nil, 0, errors.New("journal store is not connected") @@ -448,10 +412,6 @@ func (s *EventsStore) GetShardEvents(ctx context.Context, shardNumber uint64, of // ShardNumbers returns the distinct list of all the shards in the journal store func (s *EventsStore) ShardNumbers(ctx context.Context) ([]uint64, error) { - // add a span context - ctx, span := telemetry.SpanContext(ctx, "eventsStore.NumShards") - defer span.End() - // check whether this instance of the journal is connected or not if !s.connected.Load() { return nil, errors.New("journal store is not connected") diff --git a/go.mod b/go.mod index 24113c7..dffcf72 100644 --- a/go.mod +++ b/go.mod @@ -9,14 +9,14 @@ require ( github.com/google/uuid v1.6.0 github.com/hashicorp/go-memdb v1.3.4 github.com/stretchr/testify v1.9.0 - github.com/tochemey/goakt/v2 v2.4.0 + github.com/tochemey/goakt/v2 v2.6.0 github.com/tochemey/gopack v0.0.0-20240704194040-eaa380774969 github.com/travisjeffery/go-dynaport v1.0.0 - go.opentelemetry.io/otel v1.28.0 - go.opentelemetry.io/otel/trace v1.28.0 + go.opentelemetry.io/otel v1.29.0 + go.opentelemetry.io/otel/trace v1.29.0 go.uber.org/atomic v1.11.0 go.uber.org/goleak v1.3.0 - golang.org/x/sync v0.7.0 + golang.org/x/sync v0.8.0 google.golang.org/protobuf v1.34.2 ) @@ -29,17 +29,18 @@ require ( github.com/RoaringBitmap/roaring v1.9.4 // indirect github.com/XSAM/otelsql v0.32.0 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/bits-and-blooms/bitset v1.13.0 // indirect + github.com/bits-and-blooms/bitset v1.14.1 // indirect github.com/buraksezer/consistent v0.10.0 // indirect github.com/buraksezer/olric v0.5.6-0.20240510193155-81e12546eb39 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/containerd/continuity v0.4.3 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/emicklei/go-restful/v3 v3.12.1 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/georgysavva/scany/v2 v2.1.3 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -48,8 +49,9 @@ require ( github.com/go-openapi/swag v0.23.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/google/btree v1.1.2 // indirect + github.com/google/btree v1.1.3 // indirect github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect @@ -76,7 +78,7 @@ require ( github.com/opencontainers/runc v1.1.13 // indirect github.com/ory/dockertest v3.3.5+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/redis/go-redis/v9 v9.6.1 // indirect github.com/reugn/go-quartz v0.12.0 // indirect github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect @@ -87,27 +89,28 @@ require ( github.com/tidwall/redcon v1.6.2 // indirect github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + github.com/x448/float16 v0.8.4 // indirect github.com/zeebo/xxh3 v1.0.2 // indirect - go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/metric v1.29.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/mod v0.19.0 // indirect - golang.org/x/net v0.27.0 // indirect - golang.org/x/oauth2 v0.21.0 // indirect - golang.org/x/sys v0.22.0 // indirect - golang.org/x/term v0.22.0 // indirect - golang.org/x/text v0.16.0 // indirect - golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.23.0 // indirect + golang.org/x/mod v0.20.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/sys v0.24.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.17.0 // indirect + golang.org/x/time v0.6.0 // indirect + golang.org/x/tools v0.24.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.30.3 // indirect - k8s.io/apimachinery v0.30.3 // indirect - k8s.io/client-go v0.30.3 // indirect + k8s.io/api v0.31.0 // indirect + k8s.io/apimachinery v0.31.0 // indirect + k8s.io/client-go v0.31.0 // indirect k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20240726031636-6f6746feab9c // indirect - k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect + k8s.io/kube-openapi v0.0.0-20240822171749-76de80e0abd9 // indirect + k8s.io/utils v0.0.0-20240821151609-f90d01438635 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.4.0 // indirect diff --git a/go.sum b/go.sum index dba72d9..a59d45d 100644 --- a/go.sum +++ b/go.sum @@ -33,8 +33,8 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= -github.com/bits-and-blooms/bitset v1.13.0 h1:bAQ9OPNFYbGHV6Nez0tmNI0RiEu7/hxlYJRUA0wFAVE= -github.com/bits-and-blooms/bitset v1.13.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bits-and-blooms/bitset v1.14.1 h1:XpUV2tfjwlRqU+Od93VhPmWB+VQX44PV8PeduaTNqpM= +github.com/bits-and-blooms/bitset v1.14.1/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs= github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c= github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA= @@ -56,8 +56,9 @@ github.com/cockroachdb/cockroach-go/v2 v2.2.0/go.mod h1:u3MiKYGupPPjkn3ozknpMUpx github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set/v2 v2.6.0 h1:XfcQbWM1LlMB8BsJ8N9vW5ehnnPVIw0je80NsVHagjM= github.com/deckarep/golang-set/v2 v2.6.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= @@ -68,11 +69,11 @@ github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4 github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lShz4oaXpDTX2bLe7ls= -github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/flowchartsman/retry v1.2.0 h1:qDhlw6RNufXz6RGr+IiYimFpMMkt77SUSHY5tgFaUCU= github.com/flowchartsman/retry v1.2.0/go.mod h1:+sfx8OgCCiAr3t5jh2Gk+T0fRTI+k52edaYxURQxY64= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/georgysavva/scany/v2 v2.1.3 h1:Zd4zm/ej79Den7tBSU2kaTDPAH64suq4qlQdhiBeGds= github.com/georgysavva/scany/v2 v2.1.3/go.mod h1:fqp9yHZzM/PFVa3/rYEC57VmDx+KDch0LoqrJzkvtos= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= @@ -91,7 +92,6 @@ github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDsl github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= @@ -109,8 +109,8 @@ github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= -github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -121,8 +121,8 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -233,16 +233,16 @@ github.com/nats-io/jwt/v2 v2.5.8 h1:uvdSzwWiEGWGXf+0Q+70qv6AQdvcvxrv9hPM0RiPamE= github.com/nats-io/jwt/v2 v2.5.8/go.mod h1:ZdWS1nZa6WMZfFwwgpEaqBV8EPGVgOTDHN/wTbz0Y5A= github.com/nats-io/nats-server/v2 v2.10.18 h1:tRdZmBuWKVAFYtayqlBB2BuCHNGAQPvoQIXOKwU3WSM= github.com/nats-io/nats-server/v2 v2.10.18/go.mod h1:97Qyg7YydD8blKlR8yBsUlPlWyZKjA7Bp5cl3MUE9K8= -github.com/nats-io/nats.go v1.36.0 h1:suEUPuWzTSse/XhESwqLxXGuj8vGRuPRoG7MoRN/qyU= -github.com/nats-io/nats.go v1.36.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8= +github.com/nats-io/nats.go v1.37.0 h1:07rauXbVnnJvv1gfIyghFEo6lUcYRY0WXc3x7x0vUxE= +github.com/nats-io/nats.go v1.37.0/go.mod h1:Ubdu4Nh9exXdSz0RVWRFBbRfrbSxOYd26oF0wkWclB8= github.com/nats-io/nkeys v0.4.7 h1:RwNJbbIdYCoClSDNY7QVKZlyb/wfT6ugvFCiKy6vDvI= github.com/nats-io/nkeys v0.4.7/go.mod h1:kqXRgRDPlGy7nGaEDMuYzmiJCIAAWDK0IMBtDmGD0nc= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= -github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= -github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= -github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= +github.com/onsi/ginkgo/v2 v2.20.0 h1:PE84V2mHqoT1sglvHc8ZdQtPcwmvvt29WLEEO3xmdZw= +github.com/onsi/ginkgo/v2 v2.20.0/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= +github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= +github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= @@ -258,8 +258,9 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= @@ -314,8 +315,8 @@ github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/redcon v1.6.2 h1:5qfvrrybgtO85jnhSravmkZyC0D+7WstbfCs3MmPhow= github.com/tidwall/redcon v1.6.2/go.mod h1:p5Wbsgeyi2VSTBWOcA5vRXrOb9arFTcU2+ZzFjqV75Y= -github.com/tochemey/goakt/v2 v2.4.0 h1:M4IPA1AfzY84Cp8BP0LK7ewyF220Mn0IGBDx8IZJgy4= -github.com/tochemey/goakt/v2 v2.4.0/go.mod h1:/X4R3g/mQ15o4+GHP1EJJBmHtzdr0SEBpMYpBHCOtLo= +github.com/tochemey/goakt/v2 v2.6.0 h1:j2CvLuSO6/ldobcWOqvp0c5Y1jon6ZkqOWju3qY95pU= +github.com/tochemey/goakt/v2 v2.6.0/go.mod h1:S6j9nLeAXgi99QtKYBIvC6DV93VCmV9JapRdIhVbFL0= github.com/tochemey/gopack v0.0.0-20240704194040-eaa380774969 h1:SDUoPcLRz28UitaOlMjOTC2T6XYBqx3qWDLDyA0jX3k= github.com/tochemey/gopack v0.0.0-20240704194040-eaa380774969/go.mod h1:3Qt0XoTLDsLzcaMXs7tYXd+iKOehoWqykWMQNBAwTdA= github.com/travisjeffery/go-dynaport v1.0.0 h1:m/qqf5AHgB96CMMSworIPyo1i7NZueRsnwdzdCJ8Ajw= @@ -325,6 +326,8 @@ github.com/vmihailenco/msgpack/v5 v5.4.1 h1:cQriyiUvjTwOHg8QZaPihLWeRAAVoCpE00IU github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= @@ -332,16 +335,16 @@ github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= -go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= -go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= -go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= -go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= -go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= -go.opentelemetry.io/otel/sdk/metric v1.28.0 h1:OkuaKgKrgAbYrrY0t92c+cC+2F6hsFNnCQArXCKlg08= -go.opentelemetry.io/otel/sdk/metric v1.28.0/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= -go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= -go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= +go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= +go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= +go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= +go.opentelemetry.io/otel/sdk v1.29.0 h1:vkqKjk7gwhS8VaWb0POZKmIEDimRCMsopNYnriHyryo= +go.opentelemetry.io/otel/sdk v1.29.0/go.mod h1:pM8Dx5WKnvxLCb+8lG1PRNIDxu9g9b9g59Qr7hfAAok= +go.opentelemetry.io/otel/sdk/metric v1.29.0 h1:K2CfmJohnRgvZ9UAj2/FhIf/okdWcNdBwe1m8xFXiSY= +go.opentelemetry.io/otel/sdk/metric v1.29.0/go.mod h1:6zZLdCl2fkauYoZIOn/soQIDSWFmNSRcICarHfuhNJQ= +go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= +go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -357,13 +360,15 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= -golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= -golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= +golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -373,10 +378,10 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= -golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= -golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= +golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -384,8 +389,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -404,27 +409,27 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= +golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= -golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= -golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -436,6 +441,8 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -451,18 +458,18 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -k8s.io/api v0.30.3 h1:ImHwK9DCsPA9uoU3rVh4QHAHHK5dTSv1nxJUapx8hoQ= -k8s.io/api v0.30.3/go.mod h1:GPc8jlzoe5JG3pb0KJCSLX5oAFIW3/qNJITlDj8BH04= -k8s.io/apimachinery v0.30.3 h1:q1laaWCmrszyQuSQCfNB8cFgCuDAoPszKY4ucAjDwHc= -k8s.io/apimachinery v0.30.3/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= -k8s.io/client-go v0.30.3 h1:bHrJu3xQZNXIi8/MoxYtZBBWQQXwy16zqJwloXXfD3k= -k8s.io/client-go v0.30.3/go.mod h1:8d4pf8vYu665/kUbsxWAQ/JDBNWqfFeZnvFiVdmx89U= +k8s.io/api v0.31.0 h1:b9LiSjR2ym/SzTOlfMHm1tr7/21aD7fSkqgD/CVJBCo= +k8s.io/api v0.31.0/go.mod h1:0YiFF+JfFxMM6+1hQei8FY8M7s1Mth+z/q7eF1aJkTE= +k8s.io/apimachinery v0.31.0 h1:m9jOiSr3FoSSL5WO9bjm1n6B9KROYYgNZOb4tyZ1lBc= +k8s.io/apimachinery v0.31.0/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.0 h1:QqEJzNjbN2Yv1H79SsS+SWnXkBgVu4Pj3CJQgbx0gI8= +k8s.io/client-go v0.31.0/go.mod h1:Y9wvC76g4fLjmU0BA+rV+h2cncoadjvjjkkIGoTLcGU= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20240726031636-6f6746feab9c h1:CHL3IcTrTI3csK36iwYJy36uQRic+IpSoRMNH+0I8SE= -k8s.io/kube-openapi v0.0.0-20240726031636-6f6746feab9c/go.mod h1:0CVn9SVo8PeW5/JgsBZZIFmmTk5noOM8WXf2e1tCihE= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= -k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kube-openapi v0.0.0-20240822171749-76de80e0abd9 h1:y+4z/s0h3R97P/o/098DSjlpyNpHzGirNPlTL+GHdqY= +k8s.io/kube-openapi v0.0.0-20240822171749-76de80e0abd9/go.mod h1:s4yb9FXajAVNRnxSB5Ckpr/oq2LP4mKSMWeZDVppd30= +k8s.io/utils v0.0.0-20240821151609-f90d01438635 h1:2wThSvJoW/Ncn9TmQEYXRnevZXi2duqHWf5OX9S3zjI= +k8s.io/utils v0.0.0-20240821151609-f90d01438635/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= diff --git a/offsetstore/memory/memory.go b/offsetstore/memory/memory.go index 6f136bc..e29c0ab 100644 --- a/offsetstore/memory/memory.go +++ b/offsetstore/memory/memory.go @@ -35,7 +35,6 @@ import ( "go.uber.org/atomic" "github.com/tochemey/ego/v3/egopb" - "github.com/tochemey/ego/v3/internal/telemetry" "github.com/tochemey/ego/v3/offsetstore" ) @@ -62,11 +61,7 @@ func NewOffsetStore() *OffsetStore { } // Connect connects to the offset store -func (x *OffsetStore) Connect(ctx context.Context) error { - // add a span context - _, span := telemetry.SpanContext(ctx, "OffsetStore.Connect") - defer span.End() - +func (x *OffsetStore) Connect(context.Context) error { // check whether this instance of the journal is connected or not if x.connected.Load() { return nil @@ -88,11 +83,7 @@ func (x *OffsetStore) Connect(ctx context.Context) error { } // Disconnect disconnects the offset store -func (x *OffsetStore) Disconnect(ctx context.Context) error { - // add a span context - _, span := telemetry.SpanContext(ctx, "OffsetStore.Disconnect") - defer span.End() - +func (x *OffsetStore) Disconnect(context.Context) error { // check whether this instance of the journal is connected or not if !x.connected.Load() { return nil @@ -118,24 +109,16 @@ func (x *OffsetStore) Disconnect(ctx context.Context) error { // Ping verifies a connection to the database is still alive, establishing a connection if necessary. func (x *OffsetStore) Ping(ctx context.Context) error { - // add a span context - spanCtx, span := telemetry.SpanContext(ctx, "OffsetStore.Ping") - defer span.End() - // check whether we are connected or not if !x.connected.Load() { - return x.Connect(spanCtx) + return x.Connect(ctx) } return nil } // WriteOffset writes an offset to the offset store -func (x *OffsetStore) WriteOffset(ctx context.Context, offset *egopb.Offset) error { - // add a span context - _, span := telemetry.SpanContext(ctx, "OffsetStore.WriteOffset") - defer span.End() - +func (x *OffsetStore) WriteOffset(_ context.Context, offset *egopb.Offset) error { // check whether this instance of the journal is connected or not if !x.connected.Load() { return errors.New("offset store is not connected") @@ -167,11 +150,7 @@ func (x *OffsetStore) WriteOffset(ctx context.Context, offset *egopb.Offset) err } // GetCurrentOffset return the offset of a projection -func (x *OffsetStore) GetCurrentOffset(ctx context.Context, projectionID *egopb.ProjectionId) (current *egopb.Offset, err error) { - // add a span context - _, span := telemetry.SpanContext(ctx, "OffsetStore.GetCurrentOffset") - defer span.End() - +func (x *OffsetStore) GetCurrentOffset(_ context.Context, projectionID *egopb.ProjectionId) (current *egopb.Offset, err error) { // check whether this instance of the journal is connected or not if !x.connected.Load() { return nil, errors.New("offset store is not connected") @@ -215,11 +194,7 @@ func (x *OffsetStore) GetCurrentOffset(ctx context.Context, projectionID *egopb. } // ResetOffset resets the offset of given projection to a given value across all shards -func (x *OffsetStore) ResetOffset(ctx context.Context, projectionName string, value int64) error { - // add a span context - _, span := telemetry.SpanContext(ctx, "offsetStore.ResetOffset") - defer span.End() - +func (x *OffsetStore) ResetOffset(_ context.Context, projectionName string, value int64) error { // check whether this instance of the offset store is connected or not if !x.connected.Load() { return errors.New("offset store is not connected") diff --git a/offsetstore/postgres/postgres.go b/offsetstore/postgres/postgres.go index 9aca2ac..208c31d 100644 --- a/offsetstore/postgres/postgres.go +++ b/offsetstore/postgres/postgres.go @@ -38,7 +38,6 @@ import ( "github.com/tochemey/gopack/postgres" "github.com/tochemey/ego/v3/egopb" - "github.com/tochemey/ego/v3/internal/telemetry" "github.com/tochemey/ego/v3/offsetstore" ) @@ -98,9 +97,6 @@ func NewOffsetStore(config *postgres.Config) *OffsetStore { // Connect connects to the underlying postgres database func (x *OffsetStore) Connect(ctx context.Context) error { - // add a span context - ctx, span := telemetry.SpanContext(ctx, "offsetStore.Connect") - defer span.End() // check whether this instance of the journal is connected or not if x.connected.Load() { return nil @@ -119,10 +115,6 @@ func (x *OffsetStore) Connect(ctx context.Context) error { // Disconnect disconnects from the underlying postgres database func (x *OffsetStore) Disconnect(ctx context.Context) error { - // add a span context - ctx, span := telemetry.SpanContext(ctx, "offsetStore.Disconnect") - defer span.End() - // check whether this instance of the journal is connected or not if !x.connected.Load() { return nil @@ -140,10 +132,6 @@ func (x *OffsetStore) Disconnect(ctx context.Context) error { // WriteOffset writes an offset into the offset store func (x *OffsetStore) WriteOffset(ctx context.Context, offset *egopb.Offset) error { - // add a span context - ctx, span := telemetry.SpanContext(ctx, "offsetStore.WriteOffset") - defer span.End() - // check whether this instance of the offset store is connected or not if !x.connected.Load() { return errors.New("offset store is not connected") @@ -229,10 +217,6 @@ func (x *OffsetStore) WriteOffset(ctx context.Context, offset *egopb.Offset) err // GetCurrentOffset returns the current offset of a given projection id func (x *OffsetStore) GetCurrentOffset(ctx context.Context, projectionID *egopb.ProjectionId) (currentOffset *egopb.Offset, err error) { - // add a span context - ctx, span := telemetry.SpanContext(ctx, "offsetStore.GetCurrentOffset") - defer span.End() - // check whether this instance of the offset store is connected or not if !x.connected.Load() { return nil, errors.New("offset store is not connected") @@ -267,10 +251,6 @@ func (x *OffsetStore) GetCurrentOffset(ctx context.Context, projectionID *egopb. // ResetOffset resets the offset of given projection to a given value across all shards func (x *OffsetStore) ResetOffset(ctx context.Context, projectionName string, value int64) error { - // add a span context - ctx, span := telemetry.SpanContext(ctx, "offsetStore.ResetOffset") - defer span.End() - // check whether this instance of the offset store is connected or not if !x.connected.Load() { return errors.New("offset store is not connected") @@ -322,10 +302,6 @@ func (x *OffsetStore) ResetOffset(ctx context.Context, projectionName string, va // Ping verifies a connection to the database is still alive, establishing a connection if necessary. func (x *OffsetStore) Ping(ctx context.Context) error { - // add a span context - ctx, span := telemetry.SpanContext(ctx, "offsetStore.Ping") - defer span.End() - // check whether we are connected or not if !x.connected.Load() { return x.Connect(ctx) diff --git a/projection/actor.go b/projection/actor.go index a9ae9ce..71d8d24 100644 --- a/projection/actor.go +++ b/projection/actor.go @@ -65,7 +65,7 @@ func (x *Projection) PreStart(ctx context.Context) error { } // Receive handle the message sent to the projection actor -func (x *Projection) Receive(ctx actors.ReceiveContext) { +func (x *Projection) Receive(ctx *actors.ReceiveContext) { switch ctx.Message().(type) { case *goaktpb.PostStart: x.runner.Run(ctx.Context()) @@ -75,6 +75,6 @@ func (x *Projection) Receive(ctx actors.ReceiveContext) { } // PostStop prepares the actor to gracefully shutdown -func (x *Projection) PostStop(ctx context.Context) error { - return x.runner.Stop(ctx) +func (x *Projection) PostStop(context.Context) error { + return x.runner.Stop() } diff --git a/projection/runner.go b/projection/runner.go index 2fda2cd..ab24f91 100644 --- a/projection/runner.go +++ b/projection/runner.go @@ -39,7 +39,6 @@ import ( "github.com/tochemey/ego/v3/egopb" "github.com/tochemey/ego/v3/eventstore" - "github.com/tochemey/ego/v3/internal/telemetry" "github.com/tochemey/ego/v3/offsetstore" ) @@ -104,9 +103,6 @@ func newRunner(name string, // Start starts the projection runner func (x *runner) Start(ctx context.Context) error { - spanCtx, span := telemetry.SpanContext(ctx, "PreStart") - defer span.End() - if x.started.Load() { return nil } @@ -115,7 +111,7 @@ func (x *runner) Start(ctx context.Context) error { return errors.New("offsets store is not defined") } - if err := x.offsetsStore.Ping(spanCtx); err != nil { + if err := x.offsetsStore.Ping(ctx); err != nil { return fmt.Errorf("failed to connect to the offsets store: %ws", err) } @@ -123,7 +119,7 @@ func (x *runner) Start(ctx context.Context) error { return errors.New("events store is not defined") } - if err := x.eventsStore.Ping(spanCtx); err != nil { + if err := x.eventsStore.Ping(ctx); err != nil { return fmt.Errorf("failed to connect to the events store: %w", err) } @@ -138,7 +134,7 @@ func (x *runner) Start(ctx context.Context) error { // create a new instance of retrier that will try a maximum of five times, with // an initial delay of 100 ms and a maximum delay of 1 second retrier := retry.NewRetrier(maxRetries, initialDelay, maxDelay) - err := retrier.RunContext(spanCtx, func(ctx context.Context) error { + err := retrier.RunContext(ctx, func(ctx context.Context) error { g, ctx := errgroup.WithContext(ctx) g.Go(func() error { return x.eventsStore.Ping(ctx) @@ -153,7 +149,7 @@ func (x *runner) Start(ctx context.Context) error { return fmt.Errorf("failed to start the projection: %w", err) } - if err := x.preStart(spanCtx); err != nil { + if err := x.preStart(ctx); err != nil { return err } @@ -163,10 +159,7 @@ func (x *runner) Start(ctx context.Context) error { } // Stop stops the projection runner -func (x *runner) Stop(ctx context.Context) error { - _, span := telemetry.SpanContext(ctx, "PostStop") - defer span.End() - +func (x *runner) Stop() error { if !x.started.Load() { return nil } @@ -239,7 +232,7 @@ func (x *runner) processingLoop(ctx context.Context) { // wait for all the processing to be done if err := g.Wait(); err != nil { x.logger.Error(err) - if err := x.Stop(ctx); err != nil { + if err := x.Stop(); err != nil { x.logger.Error(err) return } @@ -254,9 +247,6 @@ func (x *runner) processingLoop(ctx context.Context) { // doProcess processes all events of a given persistent entity and hand them over to the handler func (x *runner) doProcess(ctx context.Context, shard uint64) error { - spanCtx, span := telemetry.SpanContext(ctx, "HandleShard") - defer span.End() - if !x.started.Load() { return nil } @@ -266,7 +256,7 @@ func (x *runner) doProcess(ctx context.Context, shard uint64) error { ShardNumber: shard, } - offset, err := x.offsetsStore.GetCurrentOffset(spanCtx, projectionID) + offset, err := x.offsetsStore.GetCurrentOffset(ctx, projectionID) if err != nil { return err } @@ -276,7 +266,7 @@ func (x *runner) doProcess(ctx context.Context, shard uint64) error { currOffset = x.startingOffset.UnixMilli() } - events, nextOffset, err := x.eventsStore.GetShardEvents(spanCtx, shard, currOffset, uint64(x.maxBufferSize)) + events, nextOffset, err := x.eventsStore.GetShardEvents(ctx, shard, currOffset, uint64(x.maxBufferSize)) if err != nil { return err } @@ -301,7 +291,7 @@ func (x *runner) doProcess(ctx context.Context, shard uint64) error { switch x.recovery.RecoveryPolicy() { case Fail: // send the data to the handler. In case of error we log the error and fail the projection - if err := x.handler.Handle(spanCtx, persistenceID, event, state, seqNr); err != nil { + if err := x.handler.Handle(ctx, persistenceID, event, state, seqNr); err != nil { x.logger.Error(fmt.Errorf("failed to process event for persistence id=%s, revision=%d: %w", persistenceID, seqNr, err)) return err } @@ -314,7 +304,7 @@ func (x *runner) doProcess(ctx context.Context, shard uint64) error { backoff := retry.NewRetrier(int(retries), 100*time.Millisecond, delay) // pass the data to the projection handler if err := backoff.Run(func() error { - if err := x.handler.Handle(spanCtx, persistenceID, event, state, seqNr); err != nil { + if err := x.handler.Handle(ctx, persistenceID, event, state, seqNr); err != nil { x.logger.Error(fmt.Errorf("failed to process event for persistence id=%s, revision=%d: %w", persistenceID, seqNr, err)) return err } @@ -332,7 +322,7 @@ func (x *runner) doProcess(ctx context.Context, shard uint64) error { backoff := retry.NewRetrier(int(retries), 100*time.Millisecond, delay) // pass the data to the projection handler if err := backoff.Run(func() error { - return x.handler.Handle(spanCtx, persistenceID, event, state, seqNr) + return x.handler.Handle(ctx, persistenceID, event, state, seqNr) }); err != nil { // here we just log the error, but we skip the event and commit the offset x.logger.Error(fmt.Errorf("failed to process event for persistence id=%s, revision=%d: %w", persistenceID, seqNr, err)) @@ -340,7 +330,7 @@ func (x *runner) doProcess(ctx context.Context, shard uint64) error { case Skip: // send the data to the handler. In case of error we just log the error and skip the event by committing the offset - if err := x.handler.Handle(spanCtx, persistenceID, event, state, seqNr); err != nil { + if err := x.handler.Handle(ctx, persistenceID, event, state, seqNr); err != nil { x.logger.Error(fmt.Errorf("failed to process event for persistence id=%s, revision=%d: %w", persistenceID, seqNr, err)) } } @@ -354,7 +344,7 @@ func (x *runner) doProcess(ctx context.Context, shard uint64) error { Timestamp: timestamppb.Now().AsTime().UnixMilli(), } - if err := x.offsetsStore.WriteOffset(spanCtx, offset); err != nil { + if err := x.offsetsStore.WriteOffset(ctx, offset); err != nil { return fmt.Errorf("failed to persist offset for persistence id=%s: %w", persistenceID, err) } } @@ -364,11 +354,8 @@ func (x *runner) doProcess(ctx context.Context, shard uint64) error { // preStart is used to perform some tasks before the projection starts func (x *runner) preStart(ctx context.Context) error { - spanCtx, span := telemetry.SpanContext(ctx, "PreStart") - defer span.End() - if !x.resetOffsetTo.IsZero() { - if err := x.offsetsStore.ResetOffset(spanCtx, x.name, x.resetOffsetTo.UnixMilli()); err != nil { + if err := x.offsetsStore.ResetOffset(ctx, x.name, x.resetOffsetTo.UnixMilli()); err != nil { x.logger.Error(fmt.Errorf("failed to reset projection=%s: %w", x.name, err)) return err } diff --git a/projection/runner_test.go b/projection/runner_test.go index 3b80dde..fc2d048 100644 --- a/projection/runner_test.go +++ b/projection/runner_test.go @@ -123,7 +123,7 @@ func TestProjection(t *testing.T) { // free resources assert.NoError(t, journalStore.Disconnect(ctx)) assert.NoError(t, offsetStore.Disconnect(ctx)) - assert.NoError(t, runner.Stop(ctx)) + assert.NoError(t, runner.Stop()) }) t.Run("with failed handler with fail strategy", func(t *testing.T) { defer goleak.VerifyNone(t) @@ -185,7 +185,7 @@ func TestProjection(t *testing.T) { // free resources assert.NoError(t, journalStore.Disconnect(ctx)) assert.NoError(t, offsetStore.Disconnect(ctx)) - assert.NoError(t, runner.Stop(ctx)) + assert.NoError(t, runner.Stop()) }) t.Run("with failed handler and retry_fail strategy", func(t *testing.T) { defer goleak.VerifyNone(t) @@ -253,7 +253,7 @@ func TestProjection(t *testing.T) { // free resources assert.NoError(t, journalStore.Disconnect(ctx)) assert.NoError(t, offsetStore.Disconnect(ctx)) - assert.NoError(t, runner.Stop(ctx)) + assert.NoError(t, runner.Stop()) }) t.Run("with failed handler and skip strategy", func(t *testing.T) { defer goleak.VerifyNone(t) @@ -329,7 +329,7 @@ func TestProjection(t *testing.T) { // free resource assert.NoError(t, journalStore.Disconnect(ctx)) assert.NoError(t, offsetStore.Disconnect(ctx)) - assert.NoError(t, runner.Stop(ctx)) + assert.NoError(t, runner.Stop()) }) t.Run("with failed handler and skip retry strategy", func(t *testing.T) { defer goleak.VerifyNone(t) @@ -405,7 +405,7 @@ func TestProjection(t *testing.T) { // free resource assert.NoError(t, journalStore.Disconnect(ctx)) assert.NoError(t, offsetStore.Disconnect(ctx)) - assert.NoError(t, runner.Stop(ctx)) + assert.NoError(t, runner.Stop()) }) }