mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-04 02:32:35 +00:00
chore: correct tracing of trigger function (#6825)
* chore: correct tracing of trigger function * refactor: remove import
This commit is contained in:
@@ -240,8 +240,10 @@ func (q *Queries) UserGrant(ctx context.Context, shouldTriggerBulk bool, withOwn
|
||||
defer func() { span.EndWithError(err) }()
|
||||
|
||||
if shouldTriggerBulk {
|
||||
_, traceSpan := tracing.NewNamedSpan(ctx, "TriggerUserGrantProjection")
|
||||
ctx, err = projection.UserGrantProjection.Trigger(ctx, handler.WithAwaitRunning())
|
||||
logging.OnError(err).Debug("trigger failed")
|
||||
traceSpan.EndWithError(err)
|
||||
}
|
||||
|
||||
query, scan := prepareUserGrantQuery(ctx, q.client)
|
||||
@@ -269,8 +271,10 @@ func (q *Queries) UserGrants(ctx context.Context, queries *UserGrantsQueries, sh
|
||||
defer func() { span.EndWithError(err) }()
|
||||
|
||||
if shouldTriggerBulk {
|
||||
_, traceSpan := tracing.NewNamedSpan(ctx, "TriggerUserGrantProjection")
|
||||
ctx, err = projection.UserGrantProjection.Trigger(ctx, handler.WithAwaitRunning())
|
||||
logging.OnError(err).Debug("unable to trigger")
|
||||
traceSpan.EndWithError(err)
|
||||
}
|
||||
|
||||
query, scan := prepareUserGrantsQuery(ctx, q.client)
|
||||
|
||||
Reference in New Issue
Block a user