consumer/sync.go
func (c *Consumer) ContainerEnvelopes(appGuid, authToken string) ([]*events.Envelope, error) {
	envelopes, err := c.readTC(appGuid, authToken, "containermetrics")
	if err != nil {
		return nil, err
	}
	for _, env := range envelopes {
		if env.GetEventType() == events.Envelope_LogMessage {
			return nil, errors.New(fmt.Sprintf("Upstream error: %s", env.GetLogMessage().GetMessage()))
		}
	}
	return envelopes, nil
}
func (c *Consumer) ContainerEnvelopes(appGuid, authToken string) ([]*events.Envelope, error) {
	envelopes, err := c.readTC(appGuid, authToken, "containermetrics")
	if err != nil {
		return nil, err
	}
	for _, env := range envelopes {
		if env.GetEventType() == events.Envelope_LogMessage {
			return nil, errors.New(fmt.Sprintf("Upstream error: %s", env.GetLogMessage().GetMessage()))
		}
	}
	return envelopes, nil
}
// ContainerEnvelopes connects to trafficcontroller via its 'containermetrics'
// http(s) endpoint and returns the most recent dropsonde envelopes for an app.