mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-14 03:54:21 +00:00
fix(scheduler): add span to trigger method (#6513)
This commit is contained in:
parent
f72560291e
commit
2d75576864
@ -13,6 +13,7 @@ import (
|
|||||||
"github.com/zitadel/zitadel/internal/api/call"
|
"github.com/zitadel/zitadel/internal/api/call"
|
||||||
"github.com/zitadel/zitadel/internal/eventstore"
|
"github.com/zitadel/zitadel/internal/eventstore"
|
||||||
"github.com/zitadel/zitadel/internal/repository/pseudo"
|
"github.com/zitadel/zitadel/internal/repository/pseudo"
|
||||||
|
"github.com/zitadel/zitadel/internal/telemetry/tracing"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -141,6 +142,9 @@ func (h *ProjectionHandler) Trigger(ctx context.Context, instances ...string) co
|
|||||||
// If a bulk action was executed, the call timestamp in context will be reset for subsequent queries.
|
// If a bulk action was executed, the call timestamp in context will be reset for subsequent queries.
|
||||||
// The returned context is never nil. It is either the original context or an updated context.
|
// The returned context is never nil. It is either the original context or an updated context.
|
||||||
func (h *ProjectionHandler) TriggerErr(ctx context.Context, instances ...string) (outCtx context.Context, err error) {
|
func (h *ProjectionHandler) TriggerErr(ctx context.Context, instances ...string) (outCtx context.Context, err error) {
|
||||||
|
ctx, span := tracing.NewSpan(ctx)
|
||||||
|
defer span.EndWithError(err)
|
||||||
|
|
||||||
instances = triggerInstances(ctx, instances)
|
instances = triggerInstances(ctx, instances)
|
||||||
defer func() {
|
defer func() {
|
||||||
outCtx = call.ResetTimestamp(ctx)
|
outCtx = call.ResetTimestamp(ctx)
|
||||||
|
Loading…
Reference in New Issue
Block a user