Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Strokov <pstrokov@gitlab.com>2020-09-08 13:07:22 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2020-09-08 13:07:22 +0300
commitd87f0757c880a28b20338fd9533495688eeece95 (patch)
tree35f26f53712adee29f8c92c36a57e00c0b249bcc /internal/praefect
parent785bebf7fb05c6c4457c75c011a01b1bede3f3a9 (diff)
Pass correlation_id over to gitaly-ssh
When gitaly-ssh is called it doesn't receive correlation_id. That is why it is hard to understand what to what chain of calls this call is related. correlation_id passed as env var 'CORRELATION_ID' to gitaly-ssh process. So it would be picked by it and used in outgoing requests. In order to cover other missing parts where correlation_id should be passed the client.DialContext method includes interceptors for it by default. If correlation_id is present in the context.Context used to invoke the method it will be passed to the remote. Part of: https://gitlab.com/gitlab-org/gitaly/-/issues/3047
Diffstat (limited to 'internal/praefect')
-rw-r--r--internal/praefect/nodes/manager.go13
1 files changed, 2 insertions, 11 deletions
diff --git a/internal/praefect/nodes/manager.go b/internal/praefect/nodes/manager.go
index 6b3ab19fb..20c50201c 100644
--- a/internal/praefect/nodes/manager.go
+++ b/internal/praefect/nodes/manager.go
@@ -9,7 +9,6 @@ import (
"sync"
"time"
- grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware"
"github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus/ctxlogrus"
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
"github.com/sirupsen/logrus"
@@ -24,8 +23,6 @@ import (
"gitlab.com/gitlab-org/gitaly/internal/praefect/nodes/tracker"
"gitlab.com/gitlab-org/gitaly/internal/praefect/protoregistry"
prommetrics "gitlab.com/gitlab-org/gitaly/internal/prometheus/metrics"
- correlation "gitlab.com/gitlab-org/labkit/correlation/grpc"
- grpctracing "gitlab.com/gitlab-org/labkit/tracing/grpc"
"google.golang.org/grpc"
healthpb "google.golang.org/grpc/health/grpc_health_v1"
)
@@ -137,8 +134,6 @@ func NewManager(
for _, node := range virtualStorage.Nodes {
streamInterceptors := []grpc.StreamClientInterceptor{
grpc_prometheus.StreamClientInterceptor,
- grpctracing.StreamClientTracingInterceptor(),
- correlation.StreamClientCorrelationInterceptor(),
}
if c.Failover.Enabled && errorTracker != nil {
@@ -150,12 +145,8 @@ func NewManager(
[]grpc.DialOption{
grpc.WithDefaultCallOptions(grpc.ForceCodec(proxy.NewCodec())),
grpc.WithPerRPCCredentials(gitalyauth.RPCCredentialsV2(node.Token)),
- grpc.WithStreamInterceptor(grpc_middleware.ChainStreamClient(streamInterceptors...)),
- grpc.WithUnaryInterceptor(grpc_middleware.ChainUnaryClient(
- grpc_prometheus.UnaryClientInterceptor,
- grpctracing.UnaryClientTracingInterceptor(),
- correlation.UnaryClientCorrelationInterceptor(),
- )),
+ grpc.WithChainStreamInterceptor(streamInterceptors...),
+ grpc.WithChainUnaryInterceptor(grpc_prometheus.UnaryClientInterceptor),
}, dialOpts...),
)
if err != nil {