Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc from 0.45.0 to 0.46.0 #804

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion backend/httpclient/tracing_middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@ import (
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/sdk/trace/tracetest"
"go.opentelemetry.io/otel/trace"
"go.opentelemetry.io/otel/trace/embedded"

"github.com/grafana/grafana-plugin-sdk-go/backend/httpclient"
"github.com/grafana/grafana-plugin-sdk-go/internal/tracerprovider"
)

type mockTracerProvider struct{}
type mockTracerProvider struct {
embedded.TracerProvider
}

var _ trace.TracerProvider = mockTracerProvider{}

Expand All @@ -25,6 +28,8 @@ func (p mockTracerProvider) Tracer(string, ...trace.TracerOption) trace.Tracer {
}

type mockTracer struct {
embedded.Tracer

spans []*mockSpan
}

Expand All @@ -41,6 +46,8 @@ func (t *mockTracer) Start(ctx context.Context, name string, opts ...trace.SpanS

// mockSpan is an implementation of Span that preforms no operations.
type mockSpan struct {
embedded.Span

name string
ended bool

Expand Down
4 changes: 2 additions & 2 deletions backend/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ func defaultGRPCMiddlewares(opts ServeOpts) []grpc.ServerOption {
grpcMiddlewares := []grpc.ServerOption{
grpc.MaxRecvMsgSize(opts.GRPCSettings.MaxReceiveMsgSize),
grpc.StreamInterceptor(grpc_middleware.ChainStreamServer(
otelgrpc.StreamServerInterceptor(),
otelgrpc.StreamServerInterceptor(), //nolint:staticcheck
Copy link
Contributor

@andresmgot andresmgot Nov 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taking a look 👀

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andresmgot I pushed a fix to this PR's branch, please take a look: 1ed8e7b

I have also done the same for the draft PR in core: grafana/grafana@19843d8

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, thanks!

grpc_prometheus.StreamServerInterceptor,
)),
grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(
otelgrpc.UnaryServerInterceptor(),
otelgrpc.UnaryServerInterceptor(), //nolint:staticcheck
grpc_prometheus.UnaryServerInterceptor,
)),
}
Expand Down
3 changes: 3 additions & 0 deletions backend/tracing/contextual_tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (

"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
"go.opentelemetry.io/otel/trace/embedded"

"github.com/grafana/grafana-plugin-sdk-go/internal/tenant"
)
Expand All @@ -16,6 +17,8 @@ const (
// contextualTracer is a wrapper around a trace.Tracer that adds contextual attributes to spans.
// This is the default tracer used by the SDK.
type contextualTracer struct {
embedded.Tracer

tracer trace.Tracer
}

Expand Down
34 changes: 17 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21
require (
github.com/cheekybits/genny v1.0.0
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.5.9
github.com/google/go-cmp v0.6.0
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/hashicorp/go-hclog v1.5.0
Expand All @@ -20,8 +20,8 @@ require (
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/common v0.42.0
github.com/stretchr/testify v1.8.4
golang.org/x/sys v0.13.0
google.golang.org/grpc v1.58.3
golang.org/x/sys v0.14.0
google.golang.org/grpc v1.59.0
google.golang.org/protobuf v1.31.0
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Expand All @@ -32,20 +32,20 @@ require (
github.com/elazarl/goproxy v0.0.0-20230731152917-f99041a5c027
github.com/getkin/kin-openapi v0.120.0
github.com/go-jose/go-jose/v3 v3.0.0
github.com/google/uuid v1.3.0
github.com/google/uuid v1.3.1
github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8
github.com/urfave/cli v1.22.14
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.45.0
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.0
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.46.0
go.opentelemetry.io/contrib/propagators/jaeger v1.20.0
go.opentelemetry.io/contrib/samplers/jaegerremote v0.14.0
go.opentelemetry.io/otel v1.19.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0
go.opentelemetry.io/otel/sdk v1.19.0
go.opentelemetry.io/otel/trace v1.19.0
go.opentelemetry.io/otel v1.20.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0
go.opentelemetry.io/otel/sdk v1.20.0
go.opentelemetry.io/otel/trace v1.20.0
golang.org/x/net v0.17.0
golang.org/x/oauth2 v0.10.0
golang.org/x/oauth2 v0.11.0
golang.org/x/text v0.13.0
)

Expand All @@ -58,7 +58,7 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/elazarl/goproxy/ext v0.0.0-20220115173737-adb46da277ac // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
Expand Down Expand Up @@ -90,15 +90,15 @@ require (
github.com/unknwon/com v1.0.1 // indirect
github.com/unknwon/log v0.0.0-20150304194804-e617c87089d3 // indirect
github.com/zeebo/xxh3 v1.0.2 // indirect
go.opentelemetry.io/otel/metric v1.19.0 // indirect
go.opentelemetry.io/otel/metric v1.20.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/tools v0.6.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230731193218-e0aa005b6bdf // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230731193218-e0aa005b6bdf // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230731193218-e0aa005b6bdf // indirect
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect
)
Loading