chore: correct tracing of trigger function (#6825)

* chore: correct tracing of trigger function

* refactor: remove import
This commit is contained in:
Silvan
2023-10-26 17:07:56 +02:00
committed by GitHub
parent 34e9748cba
commit 0187487f26
24 changed files with 62 additions and 7 deletions

View File

@@ -91,8 +91,10 @@ func (q *Queries) SearchProjectRoles(ctx context.Context, shouldTriggerBulk bool
defer func() { span.EndWithError(err) }()
if shouldTriggerBulk {
_, traceSpan := tracing.NewNamedSpan(ctx, "TriggerProjectRoleProjection")
ctx, err = projection.ProjectRoleProjection.Trigger(ctx, handler.WithAwaitRunning())
logging.OnError(err).Debug("trigger failed")
traceSpan.EndWithError(err)
}
eq := sq.Eq{ProjectRoleColumnInstanceID.identifier(): authz.GetInstance(ctx).InstanceID()}