Start using otel in storage/unified/resource (#102616)

* Start using otel storage/unified/resource

* make update-workspace

* Go mod build owners

* Make workspace-update

* Update pkg/storage/unified/resource/access.go

Co-authored-by: maicon <maiconscosta@gmail.com>

* Add introduced pkg/apis to dependabot file

* Revert "Update pkg/storage/unified/resource/access.go"

This reverts commit f50e29d0394e48d5cd5bfbab154cb83da0b2f8b2.

* Revert "Update pkg/storage/unified/resource/access.go"

This reverts commit f50e29d0394e48d5cd5bfbab154cb83da0b2f8b2.

* Use traceid only

---------

Co-authored-by: maicon <maiconscosta@gmail.com>
This commit is contained in:
Leonor Oliveira
2025-03-31 09:58:01 -03:00
committed by GitHub
co-authored by maicon
parent f7af15eb33
commit c3b039f3a2
5 changed files with 16 additions and 12 deletions
@@ -12,7 +12,7 @@ import (
"github.com/grafana/authlib/types"
"github.com/grafana/grafana/pkg/apimachinery/identity"
"github.com/grafana/grafana/pkg/infra/tracing"
"go.opentelemetry.io/otel/trace"
)
const (
@@ -30,7 +30,7 @@ var logger = slog.Default().With("logger", "legacy.grpc.Authenticator")
// var _ interceptors.Authenticator = (*Authenticator)(nil)
type Authenticator struct {
Tracer tracing.Tracer
Tracer trace.Tracer
}
func (f *Authenticator) Authenticate(ctx context.Context) (context.Context, error) {
@@ -7,7 +7,7 @@ import (
claims "github.com/grafana/authlib/types"
"github.com/grafana/grafana/pkg/apimachinery/identity"
"github.com/grafana/grafana/pkg/infra/tracing"
"go.opentelemetry.io/otel/trace/noop"
)
func TestBasicEncodeDecode(t *testing.T) {
@@ -20,7 +20,7 @@ func TestBasicEncodeDecode(t *testing.T) {
OrgRole: identity.RoleAdmin,
}
auth := &Authenticator{Tracer: tracing.NewNoopTracerService()}
auth := &Authenticator{Tracer: noop.NewTracerProvider().Tracer("")}
md := encodeIdentityInMetadata(before)
after, err := auth.decodeMetadata(md)