Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Commit

Permalink
Set status code attribute for ochttp.Server (#933)
Browse files Browse the repository at this point in the history
  • Loading branch information
julianvmodesto authored and Ramon Nogueira committed Sep 25, 2018
1 parent c50972b commit 2b3f775
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugin/ochttp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ func (t *trackingResponseWriter) end(tags *addedTags) {

span := trace.FromContext(t.ctx)
span.SetStatus(TraceStatus(t.statusCode, t.statusLine))
span.AddAttributes(trace.Int64Attribute(StatusCodeAttribute, int64(t.statusCode)))

m := []stats.Measurement{
ServerLatency.M(float64(time.Since(t.start)) / float64(time.Millisecond)),
Expand Down

0 comments on commit 2b3f775

Please sign in to comment.