mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-05 06:32:06 +00:00
fix(query): add tracing for each method (#4777)
* fix(query): add tracing for each method
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/zitadel/zitadel/internal/api/authz"
|
||||
"github.com/zitadel/zitadel/internal/errors"
|
||||
"github.com/zitadel/zitadel/internal/query/projection"
|
||||
"github.com/zitadel/zitadel/internal/telemetry/tracing"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -55,6 +56,9 @@ func (q *CurrentSequencesSearchQueries) toQuery(query sq.SelectBuilder) sq.Selec
|
||||
}
|
||||
|
||||
func (q *Queries) SearchCurrentSequences(ctx context.Context, queries *CurrentSequencesSearchQueries) (failedEvents *CurrentSequences, err error) {
|
||||
ctx, span := tracing.NewSpan(ctx)
|
||||
defer func() { span.EndWithError(err) }()
|
||||
|
||||
query, scan := prepareCurrentSequencesQuery()
|
||||
stmt, args, err := queries.toQuery(query).ToSql()
|
||||
if err != nil {
|
||||
@@ -68,7 +72,10 @@ func (q *Queries) SearchCurrentSequences(ctx context.Context, queries *CurrentSe
|
||||
return scan(rows)
|
||||
}
|
||||
|
||||
func (q *Queries) latestSequence(ctx context.Context, projections ...table) (*LatestSequence, error) {
|
||||
func (q *Queries) latestSequence(ctx context.Context, projections ...table) (_ *LatestSequence, err error) {
|
||||
ctx, span := tracing.NewSpan(ctx)
|
||||
defer func() { span.EndWithError(err) }()
|
||||
|
||||
query, scan := prepareLatestSequence()
|
||||
or := make(sq.Or, len(projections))
|
||||
for i, projection := range projections {
|
||||
|
||||
Reference in New Issue
Block a user