census-instrumentation / opencensus-go

A stats collection and distributed tracing framework
http://opencensus.io
Apache License 2.0
2.05k stars 326 forks source link

wrong metric for ServerResponseCountByStatusCode view #1163

Open rjeczalik opened 5 years ago

rjeczalik commented 5 years ago

https://github.com/census-instrumentation/opencensus-go/blob/6ddd4bcc9c808594ec82377ce4323c3f7913be6d/plugin/ochttp/stats.go#L263-L269

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(),
    }
bvwells commented 5 years ago

Looks like the same issue as #995...