func MakeProtoMetric(m MetricAndContext) *protos.ContextualizedMetric {
	p := &protos.ContextualizedMetric{
		Family:  m.Family,
		Context: &protos.Context{MetricName: m.Context.MetricName},
	}
	switch additionalCtx := m.Context.AdditionalContext.(type) {
	case *CloudMetricContext:
		p.Context.OriginContext = &protos.Context_CloudMetric{
			CloudMetric: &protos.CloudContext{CloudHost: additionalCtx.CloudHost},
		}
	case *GatewayMetricContext:
		p.Context.OriginContext = &protos.Context_GatewayMetric{
			GatewayMetric: &protos.GatewayContext{NetworkId: additionalCtx.NetworkID, GatewayId: additionalCtx.GatewayID},
		}
	case *PushedMetricContext:
		p.Context.OriginContext = &protos.Context_PushedMetric{
			PushedMetric: &protos.PushedContext{NetworkId: additionalCtx.NetworkID},
		}
	}
	return p
}
// MakeProtoMetric converts native contextualized metric to protobuf.
MakeProtoMetric converts native contextualized metric to protobuf.
// MakeProtoMetric converts native contextualized metric to protobuf .
func MakeProtoMetric(m MetricAndContext) *protos.ContextualizedMetric {
	p := &protos.ContextualizedMetric{
		Family:  m.Family,
		Context: &protos.Context{MetricName: m.Context.MetricName},
	}
	switch additionalCtx := m.Context.AdditionalContext.(type) {
	case *CloudMetricContext:
		p.Context.OriginContext = &protos.Context_CloudMetric{
			CloudMetric: &protos.CloudContext{CloudHost: additionalCtx.CloudHost},
		}
	case *GatewayMetricContext:
		p.Context.OriginContext = &protos.Context_GatewayMetric{
			GatewayMetric: &protos.GatewayContext{NetworkId: additionalCtx.NetworkID, GatewayId: additionalCtx.GatewayID},
		}
	case *PushedMetricContext:
		p.Context.OriginContext = &protos.Context_PushedMetric{
			PushedMetric: &protos.PushedContext{NetworkId: additionalCtx.NetworkID},
		}
	}
	return p
}
func MakeProtoMetric ( m MetricAndContext ) * protos . ContextualizedMetric { p := & protos . ContextualizedMetric { Family : m . Family , Context : & protos . Context { MetricName : m . Context . MetricName } , } switch additionalCtx := m . Context . AdditionalContext . ( type ) { case * CloudMetricContext : p . Context . OriginContext = & protos . Context_CloudMetric { CloudMetric : & protos . CloudContext { CloudHost : additionalCtx . CloudHost } , } case * GatewayMetricContext : p . Context . OriginContext = & protos . Context_GatewayMetric { GatewayMetric : & protos . GatewayContext { NetworkId : additionalCtx . NetworkID , GatewayId : additionalCtx . GatewayID } , } case * PushedMetricContext : p . Context . OriginContext = & protos . Context_PushedMetric { PushedMetric : & protos . PushedContext { NetworkId : additionalCtx . NetworkID } , } } return p }
MakeProtoMetric converts native contextualized metric to protobuf.
MakeProtoMetric converts native contextualized metric to protobuf .