From 7616ce8392644a31302b11cc11c1c5eb3e978618 Mon Sep 17 00:00:00 2001 From: MATSUU Takuto Date: Fri, 30 Aug 2024 09:26:58 +0900 Subject: [PATCH] fix: Correct span names --- jwk/manager_strategy.go | 2 +- persistence/sql/persister_jwk.go | 4 ++-- x/hasher.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jwk/manager_strategy.go b/jwk/manager_strategy.go index 48ac668b4b8..c4da634f468 100644 --- a/jwk/manager_strategy.go +++ b/jwk/manager_strategy.go @@ -124,7 +124,7 @@ func (m ManagerStrategy) GetKeySet(ctx context.Context, set string) (*jose.JSONW } func (m ManagerStrategy) DeleteKey(ctx context.Context, set, kid string) error { - ctx, span := otel.GetTracerProvider().Tracer(tracingComponent).Start(ctx, "jwk.GenerateAndPersistKeySet") + ctx, span := otel.GetTracerProvider().Tracer(tracingComponent).Start(ctx, "jwk.DeleteKey") defer span.End() attrs := map[string]string{ "set": set, diff --git a/persistence/sql/persister_jwk.go b/persistence/sql/persister_jwk.go index 1baae7b2c8f..ee5a82a7487 100644 --- a/persistence/sql/persister_jwk.go +++ b/persistence/sql/persister_jwk.go @@ -21,7 +21,7 @@ import ( var _ jwk.Manager = &Persister{} func (p *Persister) GenerateAndPersistKeySet(ctx context.Context, set, kid, alg, use string) (*jose.JSONWebKeySet, error) { - ctx, span := p.r.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.GenerateAndPersistKey") + ctx, span := p.r.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.GenerateAndPersistKeySet") defer span.End() keys, err := jwk.GenerateJWK(ctx, jose.SignatureAlgorithm(alg), kid, use) @@ -60,7 +60,7 @@ func (p *Persister) AddKey(ctx context.Context, set string, key *jose.JSONWebKey } func (p *Persister) AddKeySet(ctx context.Context, set string, keys *jose.JSONWebKeySet) error { - ctx, span := p.r.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.AddKey") + ctx, span := p.r.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.AddKeySet") defer span.End() return p.Transaction(ctx, func(ctx context.Context, c *pop.Connection) error { diff --git a/x/hasher.go b/x/hasher.go index 1e7bd37a6b0..835fa146fec 100644 --- a/x/hasher.go +++ b/x/hasher.go @@ -66,7 +66,7 @@ func (b *Hasher) Hash(ctx context.Context, data []byte) ([]byte, error) { } func (b *Hasher) Compare(ctx context.Context, hash, data []byte) error { - _, span := otel.GetTracerProvider().Tracer(tracingComponent).Start(ctx, "x.hasher.Hash") + _, span := otel.GetTracerProvider().Tracer(tracingComponent).Start(ctx, "x.hasher.Compare") defer span.End() if err := hasherx.Compare(ctx, data, hash); err != nil {