census-instrumentation/opencensus-go

wrong metric for ServerResponseCountByStatusCode view

rjeczalik opened this issue · 1 comments

ServerResponseCountByStatusCode = &view.View{
Name: "opencensus.io/http/server/response_count_by_status_code",
Description: "Server response count by status code",
TagKeys: []tag.Key{StatusCode},
Measure: ServerLatency,
Aggregation: view.Count(),
}

The ServerLatency metric seems wrong, since there's no ServerResponseCount metric defined nor used. Given that I guess the view was meant to be ServerRequestCountByStatusCode.

Since server latency by status code feels like not that useful view, I was wondering whether ServerResponseCountByStatusCode should be replaced by ServerRequestCountByStatusCode:

	ServerRequestCountByStatusCode = &view.View{
		Name:        "opencensus.io/http/server/request_count_by_status_code",
		Description: "Server request count by status code",
		TagKeys:     []tag.Key{StatusCode},
		Measure:     ServerRequestCount,
		Aggregation: view.Count(),
	}

Looks like the same issue as #995...