envelope := events.Envelope{ Origin: proto.String("origin"), Timestamp: proto.Int64(1000000000), EventType: events.Envelope_ValueMetric.Enum(), ValueMetric: &events.ValueMetric{ Name: proto.String(fmt.Sprintf("metricName-%d", i)), Value: proto.Float64(float64(i)), Unit: proto.String("gauge"), }, Deployment: proto.String("deployment-name"), Job: proto.String("doppler"), } fakeFirehose.AddEvent(envelope) } go nozzle.Start() var contents []byte Eventually(fakeDatadogAPI.ReceivedContents).Should(Receive(&contents)) var payload datadogclient.Payload err := json.Unmarshal(contents, &payload) Expect(err).ToNot(HaveOccurred()) Expect(logOutput).ToNot(gbytes.Say("Error while reading from the firehose")) // +3 internal metrics that show totalMessagesReceived, totalMetricSent, and slowConsumerAlert Expect(payload.Series).To(HaveLen(13)) }, 2)