metric := processor.ProcessHttpStartStopHttpErrorCount(httpStartStopEvent) Expect(metric.Stat).To(Equal("http.errors.api_10_244_0_34_xip_io")) Expect(metric.Value).To(Equal(int64(0))) }) It("increments the requests counter by one", func() { metric := processor.ProcessHttpStartStopHttpRequestCount(httpStartStopEvent) Expect(metric.Stat).To(Equal("http.requests.api_10_244_0_34_xip_io")) Expect(metric.Value).To(Equal(int64(1))) }) }) Context("with a HTTP 404 status code", func() { It("formats the Stat string to include the hostname and the status code", func() { statusCode := int32(404) httpStartStopEvent.StatusCode = &statusCode metric := processor.ProcessHttpStartStopStatusCodeCount(httpStartStopEvent) Expect(metric.Stat).To(Equal("http.statuscodes.api_10_244_0_34_xip_io.404")) }) It("increments the error counter by one", func() { statusCode := int32(404) httpStartStopEvent.StatusCode = &statusCode metric := processor.ProcessHttpStartStopHttpErrorCount(httpStartStopEvent) Expect(metric.Stat).To(Equal("http.errors.api_10_244_0_34_xip_io")) Expect(metric.Value).To(Equal(int64(1))) }) It("increments the requests counter by one", func() { statusCode := int32(404)