Skip to content

Commit

Permalink
fix: Correct span names
Browse files Browse the repository at this point in the history
  • Loading branch information
matsuu authored and alnr committed Aug 30, 2024
1 parent 93edc9a commit 554238b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion jwk/manager_strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions persistence/sql/persister_jwk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion x/hasher.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 554238b

Please sign in to comment.