Skip to content

Commit

Permalink
Merge pull request #59 from basvanbeek/master
Browse files Browse the repository at this point in the history
improved performance on bool to string in httptrace
  • Loading branch information
basvanbeek committed May 6, 2018
2 parents 4fff667 + 275130a commit 533f908
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions middleware/http/spantrace.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package http

import (
"crypto/tls"
"fmt"
"net/http/httptrace"
"strconv"
"strings"
"time"

Expand All @@ -22,8 +22,8 @@ func (s *spanTrace) getConn(hostPort string) {

func (s *spanTrace) gotConn(info httptrace.GotConnInfo) {
s.Annotate(time.Now(), "Connected")
s.Tag("httptrace.got_connection.reused", fmt.Sprintf("%t", info.Reused))
s.Tag("httptrace.got_connection.was_idle", fmt.Sprintf("%t", info.WasIdle))
s.Tag("httptrace.got_connection.reused", strconv.FormatBool(info.Reused))
s.Tag("httptrace.got_connection.was_idle", strconv.FormatBool(info.WasIdle))
if info.WasIdle {
s.Tag("httptrace.got_connection.idle_time", info.IdleTime.String())
}
Expand Down

0 comments on commit 533f908

Please sign in to comment.