Slide 26
Slide 26 text
Metrics
4%,Λར༻ͯ͠ϝτϦΫεΛܭ͍ͯ͠Δ
https://ten-snapon.com/archives/2983
if req.Method == http.MethodPost && strings.Contains(req.RequestURI, “cartin")){
if err == nil && res.StatusCode >= 200 && res.StatusCode < 300 {
r.successCounter.Add(context.Background(), metric.WithAttributes(semconv.HostName(requestURL.Host)))
} else {
r.failCounter.Add(context.Background(), 1, metric.WithAttributes(semconv.HostName(requestURL.Host)))
}
}