File tree Expand file tree Collapse file tree 5 files changed +124
-114
lines changed
examples/custom-instrumentation Expand file tree Collapse file tree 5 files changed +124
-114
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ import (
6262
6363func TestSlowResponse (t *testing .T ) {
6464 app := httpbin.New ()
65- testServer := httptest.NewServer (app. Handler () )
65+ testServer := httptest.NewServer (app)
6666 defer testServer.Close ()
6767
6868 client := http.Client {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import (
1212
1313func TestSlowResponse (t * testing.T ) {
1414 app := httpbin .New ()
15- testServer := httptest .NewServer (app . Handler () )
15+ testServer := httptest .NewServer (app )
1616 defer testServer .Close ()
1717
1818 client := http.Client {
Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ import (
1313func main () {
1414 statsdClient , _ := statsd .New ("" )
1515
16- h := httpbin .New (
16+ app := httpbin .New (
1717 httpbin .WithObserver (datadogObserver (statsdClient )),
1818 )
1919
2020 listenAddr := "0.0.0.0:8080"
21- http .ListenAndServe (listenAddr , h . Handler () )
21+ http .ListenAndServe (listenAddr , app )
2222}
2323
2424func datadogObserver (client statsd.ClientInterface ) httpbin.Observer {
You can’t perform that action at this time.
0 commit comments