Add Protocol field to Transports telemetry (#138)

See #132. This PR adds a protocol field to the ClientTransport and ServerTransport messages, and modifies the proxy to report a value for this field (currently, it's only ever HTTP).

Currently, HTTP/1 and HTTP/2 are collapsed into one Protocol variant, see #132 (comment). I expect that we can treat H1 as a subset of H2 as far as metrics goes.

Note that after discussing it with @klingerf, I learned that the control plane telemetry API currently does not do anything with the ClientTransport and ServerTransport messages, so beyond regenerating the protobuf-generated code, no controller changes were actually necessary. As we actually add metrics to TCP transports, we'll want to make some additions to the telemetry API to ingest these metrics. If any metrics are shared between HTTP and raw TCP transports (say, bytes sent), we'll want to differentiate between them in Prometheus. All the metrics that the control plane currently ingests from telemetry reports are likely to be HTTP-specific (requests, responses, response latencies), or at least, do not apply to raw TCP.

Actually adding metrics to raw TCP transports will probably have to wait until there are raw TCP transports implemented in the proxy...

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
This commit is contained in:
Eliza Weisman 2018-01-11 16:00:38 -08:00 committed by GitHub
parent 1dc1c00a2a
commit 63d1a5d70d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 224 additions and 119 deletions

View File

@ -34,6 +34,27 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type Protocol int32
const (
Protocol_HTTP Protocol = 0
Protocol_TCP Protocol = 1
)
var Protocol_name = map[int32]string{
0: "HTTP",
1: "TCP",
}
var Protocol_value = map[string]int32{
"HTTP": 0,
"TCP": 1,
}
func (x Protocol) String() string {
return proto.EnumName(Protocol_name, int32(x))
}
func (Protocol) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type HttpMethod_Registered int32
const (
@ -936,6 +957,7 @@ func init() {
proto.RegisterType((*TapEvent_Http_RequestInit)(nil), "conduit.common.TapEvent.Http.RequestInit")
proto.RegisterType((*TapEvent_Http_ResponseInit)(nil), "conduit.common.TapEvent.Http.ResponseInit")
proto.RegisterType((*TapEvent_Http_ResponseEnd)(nil), "conduit.common.TapEvent.Http.ResponseEnd")
proto.RegisterEnum("conduit.common.Protocol", Protocol_name, Protocol_value)
proto.RegisterEnum("conduit.common.HttpMethod_Registered", HttpMethod_Registered_name, HttpMethod_Registered_value)
proto.RegisterEnum("conduit.common.Scheme_Registered", Scheme_Registered_name, Scheme_Registered_value)
}
@ -943,55 +965,56 @@ func init() {
func init() { proto.RegisterFile("common/common.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 789 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x54, 0xdb, 0x6e, 0xf2, 0x46,
0x10, 0xc6, 0xc6, 0x18, 0x18, 0x20, 0x72, 0xf7, 0x8f, 0x7e, 0xa5, 0xa8, 0x87, 0x3f, 0xa8, 0xa9,
0x92, 0x5c, 0x38, 0x15, 0xa9, 0x90, 0x7a, 0xc9, 0xc1, 0x0a, 0xa8, 0x2d, 0xd0, 0xc5, 0xbd, 0x8e,
0x0c, 0xde, 0x80, 0xa5, 0x60, 0xbb, 0xbb, 0xeb, 0x48, 0x79, 0x99, 0x4a, 0xed, 0x13, 0xf4, 0x7d,
0xfa, 0x10, 0xbd, 0xe8, 0x0b, 0x54, 0x7b, 0xc0, 0x98, 0x24, 0x4d, 0xaa, 0xf6, 0xa2, 0x57, 0x9e,
0x19, 0xcf, 0x7c, 0xfb, 0xcd, 0x37, 0xb3, 0x0b, 0xef, 0x56, 0xc9, 0x76, 0x9b, 0xc4, 0x57, 0xea,
0xe3, 0xa6, 0x34, 0xe1, 0x09, 0x3a, 0x5a, 0x25, 0x71, 0x98, 0x45, 0xdc, 0x55, 0xd1, 0xf6, 0x67,
0xeb, 0x24, 0x59, 0xdf, 0x93, 0x2b, 0xf9, 0x77, 0x99, 0xdd, 0x5d, 0x85, 0x19, 0x0d, 0x78, 0xb4,
0xcb, 0xef, 0xfc, 0x69, 0x00, 0x8c, 0x39, 0x4f, 0xbf, 0x27,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d, 0x3f, 0x87, 0x86, 0xd8, 0xd5, 0x5b, 0xc6, 0x03, 0x9e, 0x31, 0xd9, 0x78, 0x0b,
0x83, 0x08, 0x2d, 0x64, 0xa4, 0xfd, 0x8b, 0x29, 0x06, 0x92, 0x0f, 0xf6, 0xff, 0x67, 0x3c, 0x81,
0x77, 0x3b, 0xa0, 0xe2, 0x15, 0x28, 0xbf, 0x85, 0xf4, 0x91, 0x46, 0x2a, 0xa8, 0x7f, 0x06, 0x47,
0x39, 0xc8, 0xf2, 0x91, 0x13, 0x26, 0xa7, 0x68, 0xe1, 0xfc, 0x76, 0x0d, 0x44, 0x50, 0x68, 0xb4,
0xa6, 0xe9, 0x6a, 0xa7, 0x51, 0x45, 0x69, 0x24, 0x42, 0x4a, 0xa3, 0x41, 0x15, 0x2a, 0x44, 0xb4,
0x9d, 0x1b, 0x4b, 0x5b, 0x9e, 0x7f, 0xfd, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd2, 0xa0, 0x18,
0x48, 0x98, 0x07, 0x00, 0x00,
// 808 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x54, 0xdd, 0x6e, 0xe3, 0x54,
0x10, 0x8e, 0x1d, 0xc7, 0x49, 0x26, 0x4d, 0x65, 0xce, 0x56, 0xab, 0x12, 0xb1, 0xb0, 0x1b, 0xb1,
0x68, 0xdb, 0x0b, 0x17, 0x65, 0x51, 0x24, 0x2e, 0xf3, 0x63, 0x35, 0x11, 0x90, 0x98, 0x13, 0x73,
0x5d, 0x39, 0xf6, 0xd9, 0xc4, 0x52, 0x63, 0x9b, 0x73, 0x8e, 0x2b, 0xf5, 0x65, 0x90, 0xe0, 0x09,
0x78, 0x1f, 0x1e, 0x82, 0x0b, 0x5e, 0x00, 0x9d, 0x9f, 0x38, 0x4e, 0x77, 0x69, 0x11, 0x5c, 0xec,
0x55, 0x66, 0x26, 0x33, 0x9f, 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66, 0x34, 0xe1, 0xf7, 0xe7, 0x96, 0x5c, 0xd1, 0x43, 0xa0, 0xdc, 0xdd, 0xc6, 0x61,
0x77, 0x7b, 0xbf, 0x1b, 0x70, 0x52, 0x1d, 0xc3, 0x7f, 0x6e, 0xef, 0x1a, 0x10, 0x4b, 0xd2, 0x88,
0xdc, 0x1c, 0xed, 0x95, 0xa9, 0x9f, 0xa3, 0xba, 0xf3, 0xee, 0xfe, 0xce, 0xbb, 0x53, 0x7d, 0xe7,
0xb1, 0x23, 0x8b, 0xaa, 0xfa, 0x7e, 0x01, 0x1d, 0xb1, 0xab, 0x37, 0x8c, 0x87, 0xbc, 0x60, 0xb2,
0xf1, 0x2e, 0x06, 0x11, 0x5a, 0xc9, 0x48, 0xef, 0x57, 0x53, 0x0c, 0xa4, 0x1c, 0xec, 0xc7, 0x67,
0x3c, 0x87, 0x67, 0x7b, 0xa0, 0xea, 0x13, 0xa8, 0x3f, 0x85, 0xf4, 0x89, 0x46, 0xaa, 0xa8, 0xff,
0x1a, 0x4e, 0x4b, 0x90, 0xf5, 0x3d, 0x27, 0x4c, 0x4e, 0xd1, 0xc2, 0xe5, 0xeb, 0x1a, 0x8b, 0xa0,
0xd0, 0x68, 0x43, 0xf3, 0x68, 0xaf, 0x51, 0x43, 0x69, 0x24, 0x42, 0x4a, 0xa3, 0x71, 0x13, 0x1a,
0x44, 0xb4, 0x5d, 0x1a, 0x97, 0x2f, 0xa0, 0xe5, 0x0b, 0x06, 0x51, 0x76, 0x5b, 0x39, 0xee, 0x4d,
0xa8, 0x07, 0x13, 0xdf, 0x31, 0xd6, 0xb6, 0xa4, 0xf7, 0xf6, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff,
0x2d, 0x99, 0x17, 0xde, 0xb7, 0x07, 0x00, 0x00,
}

View File

@ -151,6 +151,7 @@ type ServerTransport struct {
SourceIp *conduit_common.IPAddress `protobuf:"bytes,1,opt,name=source_ip,json=sourceIp" json:"source_ip,omitempty"`
Connects uint32 `protobuf:"varint,2,opt,name=connects" json:"connects,omitempty"`
Disconnects []*TransportSummary `protobuf:"bytes,3,rep,name=disconnects" json:"disconnects,omitempty"`
Protocol conduit_common.Protocol `protobuf:"varint,4,opt,name=protocol,enum=conduit.common.Protocol" json:"protocol,omitempty"`
}
func (m *ServerTransport) Reset() { *m = ServerTransport{} }
@ -179,10 +180,18 @@ func (m *ServerTransport) GetDisconnects() []*TransportSummary {
return nil
}
func (m *ServerTransport) GetProtocol() conduit_common.Protocol {
if m != nil {
return m.Protocol
}
return conduit_common.Protocol_HTTP
}
type ClientTransport struct {
TargetAddr *conduit_common.TcpAddress `protobuf:"bytes,1,opt,name=target_addr,json=targetAddr" json:"target_addr,omitempty"`
Connects uint32 `protobuf:"varint,2,opt,name=connects" json:"connects,omitempty"`
Disconnects []*TransportSummary `protobuf:"bytes,3,rep,name=disconnects" json:"disconnects,omitempty"`
Protocol conduit_common.Protocol `protobuf:"varint,4,opt,name=protocol,enum=conduit.common.Protocol" json:"protocol,omitempty"`
}
func (m *ClientTransport) Reset() { *m = ClientTransport{} }
@ -211,6 +220,13 @@ func (m *ClientTransport) GetDisconnects() []*TransportSummary {
return nil
}
func (m *ClientTransport) GetProtocol() conduit_common.Protocol {
if m != nil {
return m.Protocol
}
return conduit_common.Protocol_HTTP
}
type TransportSummary struct {
DurationMs uint64 `protobuf:"varint,1,opt,name=duration_ms,json=durationMs" json:"duration_ms,omitempty"`
BytesSent uint64 `protobuf:"varint,2,opt,name=bytes_sent,json=bytesSent" json:"bytes_sent,omitempty"`
@ -692,60 +708,61 @@ var _Telemetry_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("proxy/telemetry/telemetry.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 867 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xdd, 0x6e, 0x23, 0x35,
0x14, 0xee, 0x34, 0x49, 0x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, 0xec, 0x37, 0x46,
0xbd, 0xc9, 0x68, 0xa5, 0xde, 0xd4, 0x32, 0xce, 0x3d, 0x81, 0x0e, 0xd4, 0x75, 0x83, 0x32, 0xb2,
0xec, 0x32, 0x45, 0xae, 0xeb, 0xb2, 0xcd, 0x35, 0xb2, 0x47, 0x96, 0x51, 0x93, 0x65, 0xd7, 0x0d,
0x8a, 0x3c, 0x82, 0x8e, 0x74, 0x59, 0xa8, 0x61, 0xcb, 0xaa, 0x7d, 0x78, 0x4b, 0xd2, 0x16, 0x38,
0x65, 0x22, 0x47, 0x5a, 0xd1, 0xc2, 0x10, 0x5a, 0xb6, 0x00, 0xa4, 0x07, 0xed, 0x93, 0xd3, 0xc3,
0xb3, 0x8b, 0xd3, 0xc7, 0x83, 0x0d, 0x72, 0x07, 0x3a, 0x67, 0x17, 0xe7, 0x6e, 0x17, 0x84, 0x3f,
0x43, 0xbb, 0x2c, 0x36, 0x21, 0xd0, 0xe4, 0x22, 0x41, 0xdb, 0x9c, 0x2e, 0xb5, 0x6b, 0xf2, 0x19,
0x10, 0xc5, 0x66, 0x98, 0x14, 0x97, 0x98, 0x44, 0x29, 0x57, 0x3a, 0xe6, 0x0c, 0x6d, 0x13, 0xba,
0x74, 0xa7, 0xf2, 0x9c, 0x94, 0x0e, 0x72, 0x00, 0xf7, 0x16, 0x70, 0x1e, 0x67, 0xa8, 0xf2, 0x98,
0xe1, 0xb0, 0x61, 0xf1, 0x0b, 0xa5, 0x53, 0xef, 0x09, 0x7f, 0x0b, 0xe0, 0xee, 0x52, 0x89, 0xc9,
0x43, 0xe8, 0x2a, 0x51, 0x48, 0x86, 0x51, 0x9a, 0x97, 0x93, 0xf2, 0x76, 0x95, 0x7a, 0x39, 0x63,
0x27, 0xcf, 0x1f, 0x25, 0x89, 0x34, 0x23, 0xd2, 0x71, 0xd8, 0x93, 0x9c, 0xec, 0x42, 0x87, 0x09,
0xce, 0x91, 0x69, 0x65, 0x23, 0xec, 0xd3, 0x6a, 0x4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x42, 0x1d, 0xa1, 0x94, 0x42, 0x3a, 0xec, 0xa6,
0xc7, 0x5a, 0xcf, 0x13, 0xe3, 0xb0, 0xd8, 0x37, 0xa1, 0x25, 0xf4, 0x0c, 0xa5, 0x1d, 0xc5, 0xce,
0xf1, 0x06, 0x75, 0xdb, 0xc3, 0x16, 0x34, 0x90, 0x27, 0x61, 0x0e, 0xfd, 0x6b, 0xa1, 0xfd, 0xdf,
0x67, 0xc2, 0xf0, 0x7f, 0x90, 0xe6, 0xdd, 0x77, 0xfe, 0x86, 0xad, 0x3b, 0x38, 0x93, 0x7d, 0x47,
0x06, 0xb0, 0xed, 0x3f, 0xde, 0xae, 0x65, 0x93, 0x19, 0x74, 0xcf, 0x7d, 0xa1, 0xc8, 0xf7, 0xb0,
0xe5, 0xdc, 0xe4, 0xfe, 0x3f, 0xfb, 0xf8, 0xef, 0x7e, 0xb4, 0x16, 0xe7, 0xce, 0x09, 0x37, 0x5e,
0x6c, 0xd9, 0xff, 0x2c, 0x5f, 0xfc, 0x15, 0x00, 0x00, 0xff, 0xff, 0xff, 0xc4, 0xbb, 0x61, 0x04,
0x09, 0x00, 0x00,
// 888 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x5f, 0x6f, 0x23, 0x35,
0x10, 0xef, 0x36, 0x49, 0x93, 0x4c, 0x2e, 0xbd, 0xd4, 0x87, 0x60, 0xa9, 0x40, 0x2d, 0x0b, 0x1c,
0x01, 0x41, 0x2a, 0x02, 0x77, 0x08, 0x78, 0xe1, 0xda, 0x3b, 0xa9, 0x15, 0x77, 0x6d, 0xe5, 0xb4,
0x4f, 0x3c, 0xac, 0xf6, 0xbc, 0xc3, 0x25, 0x52, 0xd6, 0x5e, 0x6c, 0x2f, 0x6a, 0x1e, 0xd0, 0x7d,
0x16, 0x24, 0xbe, 0x0f, 0x1f, 0x03, 0x5e, 0xf8, 0x0e, 0xc8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0x06, 0xf2, 0x34, 0xca, 0xa1,
0x7f, 0x2d, 0xb5, 0xff, 0xfa, 0x4c, 0x98, 0xf8, 0xef, 0xa5, 0xf9, 0xc6, 0x38, 0x7f, 0xc3, 0xea,
0x0e, 0xce, 0x64, 0xdf, 0x91, 0x01, 0x6c, 0xfb, 0x3f, 0x0a, 0xae, 0x65, 0xe3, 0x29, 0x74, 0x2f,
0xbc, 0x50, 0xe4, 0x3b, 0xd8, 0x72, 0x6e, 0x72, 0xff, 0xef, 0xfd, 0xd1, 0xd8, 0xfd, 0xe0, 0x56,
0x9c, 0x3b, 0x27, 0xda, 0x78, 0xbe, 0x65, 0x5f, 0xc8, 0xcf, 0xfe, 0x0c, 0x00, 0x00, 0xff, 0xff,
0x94, 0x14, 0x47, 0x5a, 0x70, 0x09, 0x00, 0x00,
}

View File

@ -899,7 +899,7 @@ func (c *apiClient) Stat(ctx context.Context, in *MetricRequest, opts ...grpc.Ca
out := new(MetricResponse)
err := grpc.Invoke(ctx, "/conduit.public.Api/Stat", in, out, c.cc, opts...)
if err != nil {
return nil, fmt.Errorf("Error invoking gRPC service: %v", err)
return nil, err
}
return out, nil
}

View File

@ -108,3 +108,8 @@ message TapEvent {
}
}
}
enum Protocol {
HTTP = 0;
TCP = 1;
}

View File

@ -38,12 +38,14 @@ message ServerTransport {
common.IPAddress source_ip = 1;
uint32 connects = 2;
repeated TransportSummary disconnects = 3;
common.Protocol protocol = 4;
}
message ClientTransport {
common.TcpAddress target_addr = 1;
uint32 connects = 2;
repeated TransportSummary disconnects = 3;
common.Protocol protocol = 4;
}
message TransportSummary {

View File

@ -134,13 +134,17 @@ where
{
pub fn bind_service(&self, addr: &SocketAddr) -> Service<B> {
trace!("bind_service {}", addr);
let client_ctx = ctx::transport::Client::new(&self.ctx, addr);
let client_ctx = ctx::transport::Client::new(
&self.ctx,
addr,
control::pb::proxy::common::Protocol::Http,
);
// Map a socket address to an HTTP/2.0 connection.
let connect = {
let c = Timeout::new(
transport::Connect::new(*addr, &self.executor),
self.connect_timeout,
self.connect_timeout,
&self.executor,
);

View File

@ -2,7 +2,7 @@
#![cfg_attr(feature = "cargo-clippy", allow(clippy))]
use std::error::Error;
use std::fmt;
use std::{fmt, hash};
use std::sync::Arc;
use http;
@ -396,6 +396,13 @@ impl<'a> From<&'a ::std::net::SocketAddr> for common::TcpAddress {
}
}
impl hash::Hash for common::Protocol {
// it's necessary to implement Hash for Protocol as it's a field on
// ctx::Transport, which derives Hash.
fn hash<H: hash::Hasher>(&self, state: &mut H) {
(*self as i32).hash(state)
}
}
fn pb_duration(d: &::std::time::Duration) -> ::prost_types::Duration {
let seconds = if d.as_secs() > ::std::i64::MAX as u64 {

View File

@ -1,6 +1,8 @@
use std::net::SocketAddr;
use std::sync::Arc;
use control::pb::common::Protocol;
use ctx;
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
@ -16,6 +18,7 @@ pub struct Server {
pub remote: SocketAddr,
pub local: SocketAddr,
pub orig_dst: Option<SocketAddr>,
pub protocol: Protocol,
}
/// Identifies a connection from the proxy to another process.
@ -23,6 +26,7 @@ pub struct Server {
pub struct Client {
pub proxy: Arc<ctx::Proxy>,
pub remote: SocketAddr,
pub protocol: Protocol,
}
impl Ctx {
@ -40,12 +44,14 @@ impl Server {
local: &SocketAddr,
remote: &SocketAddr,
orig_dst: &Option<SocketAddr>,
protocol: Protocol,
) -> Arc<Server> {
let s = Server {
proxy: Arc::clone(proxy),
local: *local,
remote: *remote,
orig_dst: *orig_dst,
protocol: protocol,
};
Arc::new(s)
@ -53,10 +59,15 @@ impl Server {
}
impl Client {
pub fn new(proxy: &Arc<ctx::Proxy>, remote: &SocketAddr) -> Arc<Client> {
pub fn new(
proxy: &Arc<ctx::Proxy>,
remote: &SocketAddr,
protocol: Protocol,
) -> Arc<Client> {
let c = Client {
proxy: Arc::clone(proxy),
remote: *remote,
protocol: protocol,
};
Arc::new(c)

View File

@ -117,6 +117,7 @@ mod tests {
use tower_router::Recognize;
use super::Inbound;
use control::pb::common::Protocol;
use bind::Bind;
use ctx;
@ -182,7 +183,13 @@ mod tests {
let mut req = http::Request::new(());
req.extensions_mut()
.insert(ctx::transport::Server::new(&ctx, &local, &remote, &Some(orig_dst)));
.insert(ctx::transport::Server::new(
&ctx,
&local,
&remote,
&Some(orig_dst),
Protocol::Http,
));
let rec = if Inbound::<()>::same_addr(&orig_dst, &local) {
None
@ -204,7 +211,13 @@ mod tests {
let mut req = http::Request::new(());
req.extensions_mut()
.insert(ctx::transport::Server::new(&ctx, &local, &remote, &None));
.insert(ctx::transport::Server::new(
&ctx,
&local,
&remote,
&None,
Protocol::Http,
));
inbound.recognize(&req) == default
}
@ -230,7 +243,13 @@ mod tests {
let mut req = http::Request::new(());
req.extensions_mut()
.insert(ctx::transport::Server::new(&ctx, &local, &remote, &Some(local)));
.insert(ctx::transport::Server::new(
&ctx,
&local,
&remote,
&Some(local),
Protocol::Http,
));
inbound.recognize(&req) == default
}

View File

@ -317,8 +317,16 @@ where
let opened_at = Instant::now();
let orig_dst = connection.original_dst_addr();
let local_addr = connection.local_addr().unwrap_or(listen_addr);
// TODO: detect protocol.
let protocol = control::pb::common::Protocol::Http;
let srv_ctx =
ctx::transport::Server::new(&proxy_ctx, &local_addr, &remote_addr, &orig_dst);
ctx::transport::Server::new(
&proxy_ctx,
&local_addr,
&remote_addr,
&orig_dst,
protocol,
);
let io = sensors.accept(connection, opened_at, &srv_ctx);

View File

@ -6,7 +6,7 @@ use std::time::Duration;
use http;
use ordermap::OrderMap;
use control::pb::common::{HttpMethod, TcpAddress};
use control::pb::common::{HttpMethod, TcpAddress, Protocol};
use control::pb::proxy::telemetry::{
eos_ctx,
ClientTransport,
@ -81,6 +81,7 @@ enum End {
#[derive(Debug, Default)]
struct TransportStats {
protocol: Protocol,
connects: u32,
disconnects: Vec<TransportSummary>,
}
@ -199,11 +200,17 @@ impl Metrics {
let source = s.remote.ip();
self.sources
.entry(source)
.or_insert_with(TransportStats::default)
.or_insert_with(|| TransportStats {
protocol: s.protocol,
..TransportStats::default()
})
}
ctx::transport::Ctx::Client(ref c) => self.destinations
.entry(c.remote)
.or_insert_with(TransportStats::default),
.or_insert_with(|| TransportStats {
protocol: c.protocol,
..TransportStats::default()
})
}
}
@ -216,6 +223,7 @@ impl Metrics {
source_ip: Some(ip.into()),
connects: stats.connects,
disconnects: stats.disconnects,
protocol: stats.protocol as i32,
})
}
@ -227,6 +235,7 @@ impl Metrics {
}),
connects: stats.connects,
disconnects: stats.disconnects,
protocol: stats.protocol as i32,
});
}