Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
rlankfo committed Sep 8, 2023
1 parent e92b298 commit 4a9d497
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 23 deletions.
2 changes: 1 addition & 1 deletion connector/servicegraphconnector/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func newConnector(logger *zap.Logger, config component.Config) *serviceGraphConn
}
}

func (p *serviceGraphConnector) Start(_ context.Context, host component.Host) error {
func (p *serviceGraphConnector) Start(_ context.Context, _ component.Host) error {
p.store = store.NewStore(p.config.Store.TTL, p.config.Store.MaxItems, p.onComplete, p.onExpire)

go p.cacheLoop(p.config.CacheLoop)
Expand Down
22 changes: 1 addition & 21 deletions connector/servicegraphconnector/connector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,9 @@ import (
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/component/componenttest"
"go.opentelemetry.io/collector/config/configgrpc"
"go.opentelemetry.io/collector/connector/connectortest"
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/consumer/consumertest"
"go.opentelemetry.io/collector/exporter"
"go.opentelemetry.io/collector/exporter/exportertest"
"go.opentelemetry.io/collector/exporter/otlpexporter"
"go.opentelemetry.io/collector/featuregate"
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/pmetric"
Expand Down Expand Up @@ -344,22 +340,6 @@ func incompleteServerTraces(withParentSpan bool) ptrace.Traces {
return traces
}

func newOTLPExporters(t *testing.T) (component.ID, exporter.Metrics, exporter.Traces) {
otlpExpFactory := otlpexporter.NewFactory()
otlpID := component.NewID("otlp")
otlpConfig := &otlpexporter.Config{
GRPCClientSettings: configgrpc.GRPCClientSettings{
Endpoint: "example.com:1234",
},
}
expCreationParams := exportertest.NewNopCreateSettings()
mexp, err := otlpExpFactory.CreateMetricsExporter(context.Background(), expCreationParams, otlpConfig)
require.NoError(t, err)
texp, err := otlpExpFactory.CreateTracesExporter(context.Background(), expCreationParams, otlpConfig)
require.NoError(t, err)
return otlpID, mexp, texp
}

type mockHost struct {
component.Host
exps map[component.DataType]map[component.ID]component.Component
Expand Down Expand Up @@ -390,7 +370,7 @@ func (*mockMetricsConsumer) Capabilities() consumer.Capabilities {
}

// ConsumeMetrics implements consumer.Metrics.
func (*mockMetricsConsumer) ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error {
func (*mockMetricsConsumer) ConsumeMetrics(_ context.Context, _ pmetric.Metrics) error {
return nil
}

Expand Down
3 changes: 2 additions & 1 deletion connector/servicegraphconnector/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ import (
"context"
"time"

"github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector/internal/metadata"
"go.opencensus.io/stats/view"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/connector"
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/featuregate"

"github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector/internal/metadata"
)

const (
Expand Down

0 comments on commit 4a9d497

Please sign in to comment.