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

@@ -82,7 +82,9 @@ func (q *Queries) NotificationPolicyByOrg(ctx context.Context, shouldTriggerBulk
defer func() { span.EndWithError(err) }()
if shouldTriggerBulk {
_, traceSpan := tracing.NewNamedSpan(ctx, "TriggerNotificationPolicyProjection")
ctx, err = projection.NotificationPolicyProjection.Trigger(ctx, handler.WithAwaitRunning())
traceSpan.EndWithError(err)
if err != nil {
return nil, err
}
@@ -117,7 +119,9 @@ func (q *Queries) DefaultNotificationPolicy(ctx context.Context, shouldTriggerBu
defer func() { span.EndWithError(err) }()
if shouldTriggerBulk {
_, traceSpan := tracing.NewNamedSpan(ctx, "TriggerNotificationPolicyProjection")
ctx, err = projection.NotificationPolicyProjection.Trigger(ctx, handler.WithAwaitRunning())
traceSpan.EndWithError(err)
if err != nil {
return nil, err
}