Commit 8cd1ac74 authored by Ethan Urie's avatar Ethan Urie

Add correlation interceptor to client

parent e983e727
...@@ -35,6 +35,7 @@ module Gitlab ...@@ -35,6 +35,7 @@ module Gitlab
end end
@stub = ::Spamcheck::SpamcheckService::Stub.new(@endpoint_url, creds, @stub = ::Spamcheck::SpamcheckService::Stub.new(@endpoint_url, creds,
interceptors: interceptors,
timeout: DEFAULT_TIMEOUT_SECS) timeout: DEFAULT_TIMEOUT_SECS)
end end
...@@ -100,6 +101,10 @@ module Gitlab ...@@ -100,6 +101,10 @@ module Gitlab
Google::Protobuf::Timestamp.new(seconds: ar_timestamp.to_time.to_i, Google::Protobuf::Timestamp.new(seconds: ar_timestamp.to_time.to_i,
nanos: ar_timestamp.to_time.nsec) nanos: ar_timestamp.to_time.nsec)
end end
def interceptors
[Labkit::Correlation::GRPC::ClientInterceptor.instance]
end
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment