Skip to content
This repository has been archived by the owner on Oct 29, 2021. It is now read-only.

Commit

Permalink
exmaple/cmd: upgrade to new traceapp.New API
Browse files Browse the repository at this point in the history
  • Loading branch information
emidoots committed Apr 29, 2016
1 parent 331a864 commit 2a3415d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
10 changes: 9 additions & 1 deletion examples/cmd/webapp-influxdb/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"log"
"net/http"
"net/url"
"time"

"sourcegraph.com/sourcegraph/appdash"
Expand Down Expand Up @@ -57,7 +58,14 @@ func main() {
log.Fatal(err)
}
}()
tapp := traceapp.New(nil)
url, err := url.Parse("http://localhost:8700")
if err != nil {
log.Fatal(err)
}
tapp, err := traceapp.New(nil, url)
if err != nil {
log.Fatal(err)
}
tapp.Store = store
tapp.Queryer = store
tapp.Aggregator = store
Expand Down
10 changes: 9 additions & 1 deletion examples/cmd/webapp-opentracing/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"fmt"
"log"
"net/http"
"net/url"
"os"
"strings"
"time"
Expand Down Expand Up @@ -42,7 +43,14 @@ func main() {
// on HTTP port 8700 will bring us to the web UI, displaying information
// about this specific web-server (another alternative would be to connect
// to a centralized Appdash collection server).
tapp := traceapp.New(nil)
url, err := url.Parse("http://localhost:8700")
if err != nil {
log.Fatal(err)
}
tapp, err := traceapp.New(nil, url)
if err != nil {
log.Fatal(err)
}
tapp.Store = store
tapp.Queryer = memStore
log.Println("Appdash web UI running on HTTP :8700")
Expand Down
10 changes: 9 additions & 1 deletion examples/cmd/webapp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"fmt"
"log"
"net/http"
"net/url"
"time"

"sourcegraph.com/sourcegraph/appdash"
Expand Down Expand Up @@ -49,7 +50,14 @@ func main() {
// on HTTP port 8700 will bring us to the web UI, displaying information
// about this specific web-server (another alternative would be to connect
// to a centralized Appdash collection server).
tapp := traceapp.New(nil)
url, err := url.Parse("http://localhost:8700")
if err != nil {
log.Fatal(err)
}
tapp, err := traceapp.New(nil, url)
if err != nil {
log.Fatal(err)
}
tapp.Store = store
tapp.Queryer = memStore
log.Println("Appdash web UI running on HTTP :8700")
Expand Down

0 comments on commit 2a3415d

Please sign in to comment.