Skip to content

Commit

Permalink
Merge pull request #136 from insolar/NOISSUE-profiler
Browse files Browse the repository at this point in the history
NOISSUE: add profiler
  • Loading branch information
Tsovak authored Jul 31, 2020
2 parents 867894a + 4157662 commit fc1fdbf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/insolar/spec-insolar-block-explorer-api/v1/server"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
"github.com/stackimpact/stackimpact-go"

"github.com/insolar/block-explorer/api"
"github.com/insolar/block-explorer/configuration"
Expand All @@ -37,6 +38,11 @@ func main() {
ctx, logger := belogger.InitLogger(ctx, cfg.Log, "block_explorer_api")
logger.Info("Config and logger were initialized")

_ = stackimpact.Start(stackimpact.Options{
AgentKey: "5256279e53f4aa857af6ee782a4c53e72034b0da",
AppName: "api",
})

router := api.NewRouter()
err := router.Start(ctx)
if err != nil {
Expand Down
6 changes: 6 additions & 0 deletions cmd/block-explorer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/insolar/insconfig"
"github.com/insolar/insolar/ledger/heavy/exporter"
"github.com/pkg/errors"
"github.com/stackimpact/stackimpact-go"

"github.com/insolar/block-explorer/etl/dbconn"
"github.com/insolar/block-explorer/etl/storage"
Expand All @@ -49,6 +50,11 @@ func main() {
ctx, logger := belogger.InitLogger(context.Background(), cfg.Log, "block_explorer")
logger.Info("Config and logger were initialized")

_ = stackimpact.Start(stackimpact.Options{
AgentKey: "5256279e53f4aa857af6ee782a4c53e72034b0da",
AppName: "gbe",
})

router := api.NewRouter()
_ = router.Start(ctx)
defer func() {
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ require (
github.com/rs/zerolog v1.15.0
github.com/skudasov/loadgen v0.0.22
github.com/spf13/cast v1.3.1 // indirect
github.com/stackimpact/stackimpact-go v2.3.10+incompatible // indirect
github.com/stretchr/testify v1.5.1
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8 // indirect
github.com/urfave/cli/v2 v2.2.0 // indirect
Expand Down

0 comments on commit fc1fdbf

Please sign in to comment.