fix(query): add tracing for each method (#4777)

* fix(query): add tracing for each method
This commit is contained in:
Silvan
2022-12-01 09:18:53 +01:00
committed by GitHub
parent 069b3570f5
commit 28760ab4b3
47 changed files with 519 additions and 138 deletions

View File

@@ -9,11 +9,10 @@ import (
sq "github.com/Masterminds/squirrel"
"github.com/zitadel/zitadel/internal/api/authz"
"github.com/zitadel/zitadel/internal/crypto"
"github.com/zitadel/zitadel/internal/query/projection"
"github.com/zitadel/zitadel/internal/errors"
"github.com/zitadel/zitadel/internal/query/projection"
"github.com/zitadel/zitadel/internal/telemetry/tracing"
)
var (
@@ -91,7 +90,10 @@ type SMTPConfig struct {
Password *crypto.CryptoValue
}
func (q *Queries) SMTPConfigByAggregateID(ctx context.Context, aggregateID string) (*SMTPConfig, error) {
func (q *Queries) SMTPConfigByAggregateID(ctx context.Context, aggregateID string) (_ *SMTPConfig, err error) {
ctx, span := tracing.NewSpan(ctx)
defer func() { span.EndWithError(err) }()
stmt, scan := prepareSMTPConfigQuery()
query, args, err := stmt.Where(sq.Eq{
SMTPConfigColumnAggregateID.identifier(): aggregateID,