Loading lib/labkit/logging/grpc/server_interceptor.rb +1 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ module Labkit ensure service_name, method_name = rpc_split(method) message = @default_tags.merge( 'grpc.start_time': start.utc.rfc3339, 'grpc.time_ms': ((Time.now - start) * 1000.0).truncate(3), 'grpc.code': CODE_STRINGS.fetch(code, code.to_s), 'grpc.method': method_name, Loading spec/labkit/logging/grpc/server_interceptor_spec.rb +1 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ describe Labkit::Logging::GRPC::ServerInterceptor do expect(result["correlation_id"]).to match(/[0-9a-f]{10}/) expect(result["time"]).to match(/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}Z$/) expect(result["grpc.start_time"]).to match(/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$/) time_ms = result["grpc.time_ms"] expect(time_ms).to be_a Float Loading Loading
lib/labkit/logging/grpc/server_interceptor.rb +1 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ module Labkit ensure service_name, method_name = rpc_split(method) message = @default_tags.merge( 'grpc.start_time': start.utc.rfc3339, 'grpc.time_ms': ((Time.now - start) * 1000.0).truncate(3), 'grpc.code': CODE_STRINGS.fetch(code, code.to_s), 'grpc.method': method_name, Loading
spec/labkit/logging/grpc/server_interceptor_spec.rb +1 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ describe Labkit::Logging::GRPC::ServerInterceptor do expect(result["correlation_id"]).to match(/[0-9a-f]{10}/) expect(result["time"]).to match(/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}Z$/) expect(result["grpc.start_time"]).to match(/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$/) time_ms = result["grpc.time_ms"] expect(time_ms).to be_a Float Loading