Skip to content

Commit

Permalink
REVERT THIS. test changing all jaeger to null
Browse files Browse the repository at this point in the history
  • Loading branch information
CryptoMaxPlanck committed Sep 5, 2023
1 parent 99acad0 commit 2320a1c
Show file tree
Hide file tree
Showing 21 changed files with 82 additions and 62 deletions.
2 changes: 1 addition & 1 deletion agents/agents/guard/db/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (t *DBSuite) SetupSuite() {
localmetrics.SetupTestJaeger(t.GetSuiteContext(), t.T())

var err error
t.metrics, err = metrics.NewByType(t.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger)
t.metrics, err = metrics.NewByType(t.GetSuiteContext(), metadata.BuildInfo(), metrics.Null)
Nil(t.T(), err)
}

Expand Down
2 changes: 1 addition & 1 deletion agents/testutil/simulated_backends_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (a *SimulatedBackendsTestSuite) SetupSuite() {

if useMetrics {
localmetrics.SetupTestJaeger(a.GetSuiteContext(), a.T())
metricsHandler = metrics.Jaeger
metricsHandler = metrics.Null
}

var err error
Expand Down
15 changes: 8 additions & 7 deletions ethergo/submitter/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ import (
"context"
"database/sql"
"fmt"
"math/big"
"os"
"sync"
"testing"
"time"

"github.com/Flaque/filet"
"github.com/brianvoe/gofakeit/v6"
"github.com/ethereum/go-ethereum/accounts/keystore"
Expand Down Expand Up @@ -31,11 +37,6 @@ import (
"gorm.io/driver/sqlite"
"gorm.io/gorm"
"gorm.io/gorm/schema"
"math/big"
"os"
"sync"
"testing"
"time"

"github.com/stretchr/testify/suite"
"github.com/synapsecns/sanguine/core/testsuite"
Expand Down Expand Up @@ -92,7 +93,7 @@ func (s *SubmitterSuite) SetupSuite() {
defer wg.Done()
var err error
localmetrics.SetupTestJaeger(s.GetSuiteContext(), s.T())
s.metrics, err = metrics.NewByType(s.GetSuiteContext(), buildInfo, metrics.Jaeger)
s.metrics, err = metrics.NewByType(s.GetSuiteContext(), buildInfo, metrics.Null)
s.Require().NoError(err)
}()

Expand Down Expand Up @@ -182,7 +183,7 @@ func (t *TXSubmitterDBSuite) SetupSuite() {
t.TestSuite.SetupSuite()
localmetrics.SetupTestJaeger(t.GetSuiteContext(), t.T())
var err error
t.metrics, err = metrics.NewByType(t.GetSuiteContext(), buildInfo, metrics.Jaeger)
t.metrics, err = metrics.NewByType(t.GetSuiteContext(), buildInfo, metrics.Null)
t.Require().NoError(err)
}

Expand Down
2 changes: 1 addition & 1 deletion services/cctp-relayer/api/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (s *RelayerAPISuite) SetupTest() {

// create the test metrics handler
var err error
s.metricsHandler, err = metrics.NewByType(s.GetTestContext(), metadata.BuildInfo(), metrics.Jaeger)
s.metricsHandler, err = metrics.NewByType(s.GetTestContext(), metadata.BuildInfo(), metrics.Null)
s.Require().NoError(err)

// create the test store
Expand Down
9 changes: 5 additions & 4 deletions services/cctp-relayer/db/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ package db_test
import (
dbSQL "database/sql"
"fmt"
"os"
"sync"
"testing"

"github.com/Flaque/filet"
. "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
Expand All @@ -15,9 +19,6 @@ import (
"github.com/synapsecns/sanguine/services/cctp-relayer/db/sql/mysql"
"github.com/synapsecns/sanguine/services/cctp-relayer/metadata"
"gorm.io/gorm/schema"
"os"
"sync"
"testing"
)

type DBSuite struct {
Expand All @@ -40,7 +41,7 @@ func (d *DBSuite) SetupSuite() {
localmetrics.SetupTestJaeger(d.GetSuiteContext(), d.T())

var err error
d.metrics, err = metrics.NewByType(d.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger)
d.metrics, err = metrics.NewByType(d.GetSuiteContext(), metadata.BuildInfo(), metrics.Null)
Nil(d.T(), err)
}

Expand Down
7 changes: 4 additions & 3 deletions services/cctp-relayer/relayer/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ package relayer_test

import (
"fmt"
"github.com/synapsecns/sanguine/services/cctp-relayer/db/sql/base"
"github.com/synapsecns/sanguine/services/cctp-relayer/db/sql/sqlite"
"math/big"
"net/url"
"strconv"
"testing"

"github.com/synapsecns/sanguine/services/cctp-relayer/db/sql/base"
"github.com/synapsecns/sanguine/services/cctp-relayer/db/sql/sqlite"

"github.com/Flaque/filet"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/params"
Expand Down Expand Up @@ -164,7 +165,7 @@ func (s *CCTPRelayerSuite) SetupTest() {

// create the test metrics handler
var err error
s.metricsHandler, err = metrics.NewByType(s.GetTestContext(), metadata.BuildInfo(), metrics.Jaeger)
s.metricsHandler, err = metrics.NewByType(s.GetTestContext(), metadata.BuildInfo(), metrics.Null)
s.Require().NoError(err)

// create the test store
Expand Down
2 changes: 1 addition & 1 deletion services/explorer/api/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func (g *APISuite) SetupSuite() {
localmetrics.SetupTestJaeger(g.GetSuiteContext(), g.T())

var err error
g.scribeMetrics, err = metrics.NewByType(g.GetSuiteContext(), scribeMetadata.BuildInfo(), metrics.Jaeger)
g.scribeMetrics, err = metrics.NewByType(g.GetSuiteContext(), scribeMetadata.BuildInfo(), metrics.Null)
g.Require().Nil(err)
// TODO: there may be an issue w/ syncer for local test nevs, investigate, but this probably comes from heavy load ending every span of every field synchronously
g.explorerMetrics, err = metrics.NewByType(g.GetSuiteContext(), metadata.BuildInfo(), metrics.Null)
Expand Down
6 changes: 4 additions & 2 deletions services/explorer/backfill/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package backfill_test

import (
"fmt"

"github.com/brianvoe/gofakeit/v6"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
Expand All @@ -21,9 +22,10 @@ import (
scribedb "github.com/synapsecns/sanguine/services/scribe/db"
"github.com/synapsecns/sanguine/services/scribe/metadata"

"go.uber.org/atomic"
"math/big"
"testing"

"go.uber.org/atomic"
)

type BackfillSuite struct {
Expand Down Expand Up @@ -55,7 +57,7 @@ func (b *BackfillSuite) SetupSuite() {
localmetrics.SetupTestJaeger(b.GetSuiteContext(), b.T())

var err error
b.metrics, err = metrics.NewByType(b.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger)
b.metrics, err = metrics.NewByType(b.GetSuiteContext(), metadata.BuildInfo(), metrics.Null)
b.Require().Nil(err)
}

Expand Down
8 changes: 5 additions & 3 deletions services/explorer/consumer/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package consumer_test

import (
"fmt"

"github.com/brianvoe/gofakeit/v6"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
Expand All @@ -15,13 +16,14 @@ import (
"github.com/synapsecns/sanguine/services/explorer/contracts/bridgeconfig"
"github.com/synapsecns/sanguine/services/explorer/db"

"math/big"
"testing"

"github.com/synapsecns/sanguine/services/explorer/testutil"
"github.com/synapsecns/sanguine/services/explorer/testutil/testcontracts"
scribedb "github.com/synapsecns/sanguine/services/scribe/db"
"github.com/synapsecns/sanguine/services/scribe/metadata"
"go.uber.org/atomic"
"math/big"
"testing"
)

// ConsumerSuite is the config test suite.
Expand Down Expand Up @@ -99,7 +101,7 @@ func (c *ConsumerSuite) SetupSuite() {
c.TestSuite.SetupSuite()

var err error
c.scribeMetrics, err = metrics.NewByType(c.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger)
c.scribeMetrics, err = metrics.NewByType(c.GetSuiteContext(), metadata.BuildInfo(), metrics.Null)
c.Require().Nil(err)
}

Expand Down
5 changes: 3 additions & 2 deletions services/explorer/db/suite_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package db_test

import (
"testing"

"github.com/stretchr/testify/suite"
"github.com/synapsecns/sanguine/core/metrics"
"github.com/synapsecns/sanguine/core/metrics/localmetrics"
Expand All @@ -12,7 +14,6 @@ import (
scribedb "github.com/synapsecns/sanguine/services/scribe/db"
"github.com/synapsecns/sanguine/services/scribe/metadata"
"go.uber.org/atomic"
"testing"
)

type DBSuite struct {
Expand Down Expand Up @@ -41,7 +42,7 @@ func (t *DBSuite) SetupTest() {
localmetrics.SetupTestJaeger(t.GetSuiteContext(), t.T())

var err error
t.scribeMetrics, err = metrics.NewByType(t.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger)
t.scribeMetrics, err = metrics.NewByType(t.GetSuiteContext(), metadata.BuildInfo(), metrics.Null)
t.Require().Nil(err)
t.db, t.eventDB, t.gqlClient, t.logIndex, t.cleanup, t.testBackend, t.deployManager = testutil.NewTestEnvDB(t.GetTestContext(), t.T(), t.scribeMetrics)
}
Expand Down
9 changes: 5 additions & 4 deletions services/explorer/node/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ package node_test

import (
"fmt"
"math/big"
"testing"

"github.com/ethereum/go-ethereum/common"
"github.com/synapsecns/sanguine/core/metrics"
"github.com/synapsecns/sanguine/core/metrics/localmetrics"
Expand All @@ -12,8 +15,6 @@ import (
"github.com/synapsecns/sanguine/services/explorer/testutil/testcontracts"
scribedb "github.com/synapsecns/sanguine/services/scribe/db"
scribeMetadata "github.com/synapsecns/sanguine/services/scribe/metadata"
"math/big"
"testing"

"github.com/ethereum/go-ethereum/core/types"
"github.com/stretchr/testify/suite"
Expand Down Expand Up @@ -88,9 +89,9 @@ func (c *NodeSuite) SetupSuite() {

localmetrics.SetupTestJaeger(c.GetSuiteContext(), c.T())
var err error
c.scribeMetrics, err = metrics.NewByType(c.GetSuiteContext(), scribeMetadata.BuildInfo(), metrics.Jaeger)
c.scribeMetrics, err = metrics.NewByType(c.GetSuiteContext(), scribeMetadata.BuildInfo(), metrics.Null)
c.Require().Nil(err)
c.explorerMetrics, err = metrics.NewByType(c.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger)
c.explorerMetrics, err = metrics.NewByType(c.GetSuiteContext(), metadata.BuildInfo(), metrics.Null)
c.Require().Nil(err)
}

Expand Down
11 changes: 6 additions & 5 deletions services/omnirpc/client/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ package client_test
import (
"context"
"fmt"
"math/big"
"net/url"
"sync"
"testing"

"github.com/stretchr/testify/suite"
"github.com/synapsecns/sanguine/core/metrics"
"github.com/synapsecns/sanguine/core/metrics/localmetrics"
Expand All @@ -13,10 +18,6 @@ import (
"github.com/synapsecns/sanguine/services/omnirpc/metadata"
"github.com/synapsecns/sanguine/services/omnirpc/testhelper"
"golang.org/x/sync/errgroup"
"math/big"
"net/url"
"sync"
"testing"
)

type TestClientSuite struct {
Expand Down Expand Up @@ -69,7 +70,7 @@ func (s *TestClientSuite) SetupJaeger() {
localmetrics.SetupTestJaeger(s.GetSuiteContext(), s.T())

var err error
s.metrics, err = metrics.NewByType(s.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger)
s.metrics, err = metrics.NewByType(s.GetSuiteContext(), metadata.BuildInfo(), metrics.Null)
s.Require().Nil(err)
}

Expand Down
5 changes: 3 additions & 2 deletions services/omnirpc/proxy/suite_test.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package proxy_test

import (
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
"github.com/synapsecns/sanguine/core/metrics"
"github.com/synapsecns/sanguine/core/metrics/localmetrics"
"github.com/synapsecns/sanguine/core/testsuite"
"github.com/synapsecns/sanguine/services/omnirpc/metadata"
"testing"
)

type ProxySuite struct {
Expand All @@ -29,7 +30,7 @@ func (p *ProxySuite) SetupSuite() {
localmetrics.SetupTestJaeger(p.GetSuiteContext(), p.T())

var err error
p.metrics, err = metrics.NewByType(p.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger)
p.metrics, err = metrics.NewByType(p.GetSuiteContext(), metadata.BuildInfo(), metrics.Null)
assert.Nil(p.T(), err)
}

Expand Down
7 changes: 4 additions & 3 deletions services/omnirpc/testhelper/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ package testhelper
import (
"context"
"fmt"
"net/http"
"testing"

"github.com/phayes/freeport"
"github.com/stretchr/testify/assert"
"github.com/synapsecns/sanguine/core/ginhelper"
Expand All @@ -14,8 +17,6 @@ import (
omniHTTP "github.com/synapsecns/sanguine/services/omnirpc/http"
"github.com/synapsecns/sanguine/services/omnirpc/metadata"
"github.com/synapsecns/sanguine/services/omnirpc/proxy"
"net/http"
"testing"
)

func makeConfig(backends []backends.SimulatedTestBackend, clientType omniHTTP.ClientType) config.Config {
Expand Down Expand Up @@ -46,7 +47,7 @@ func NewOmnirpcServer(ctx context.Context, tb testing.TB, backends ...backends.S

localmetrics.SetupTestJaeger(ctx, tb)

handler, err := metrics.NewByType(ctx, metadata.BuildInfo(), metrics.Jaeger)
handler, err := metrics.NewByType(ctx, metadata.BuildInfo(), metrics.Null)
assert.Nil(tb, err)

server := proxy.NewProxy(makeConfig(backends, omniHTTP.FastHTTP), handler)
Expand Down
9 changes: 5 additions & 4 deletions services/scribe/api/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ package api_test

import (
"fmt"
"net/http"
"testing"
"time"

"github.com/synapsecns/sanguine/core/metrics"
"github.com/synapsecns/sanguine/core/metrics/localmetrics"
"github.com/synapsecns/sanguine/services/scribe/api"
Expand All @@ -10,9 +14,6 @@ import (
"github.com/synapsecns/sanguine/services/scribe/metadata"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"net/http"
"testing"
"time"

"github.com/Flaque/filet"
"github.com/phayes/freeport"
Expand Down Expand Up @@ -54,7 +55,7 @@ func (g *APISuite) SetupSuite() {
localmetrics.SetupTestJaeger(g.GetSuiteContext(), g.T())

var err error
g.metrics, err = metrics.NewByType(g.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger)
g.metrics, err = metrics.NewByType(g.GetSuiteContext(), metadata.BuildInfo(), metrics.Null)
g.Require().Nil(err)
}

Expand Down
7 changes: 4 additions & 3 deletions services/scribe/backend/suite_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package backend_test

import (
"testing"
"time"

"github.com/synapsecns/sanguine/core/metrics"
"github.com/synapsecns/sanguine/core/metrics/localmetrics"
"github.com/synapsecns/sanguine/services/scribe/metadata"
"testing"
"time"

"github.com/Flaque/filet"
. "github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -53,7 +54,7 @@ func (b *BackendSuite) SetupSuite() {
localmetrics.SetupTestJaeger(b.GetSuiteContext(), b.T())

var err error
b.metrics, err = metrics.NewByType(b.GetSuiteContext(), metadata.BuildInfo(), metrics.Jaeger)
b.metrics, err = metrics.NewByType(b.GetSuiteContext(), metadata.BuildInfo(), metrics.Null)
Nil(b.T(), err)
}

Expand Down
Loading

0 comments on commit 2320a1c

Please sign in to comment.