Skip to content

Commit

Permalink
refactor: rename common package to prevent conflicts/confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
iamKunalGupta committed May 21, 2024
1 parent bf4d025 commit 1ef2739
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package common
package otel_common

import (
"go.opentelemetry.io/otel/sdk/resource"
Expand Down
4 changes: 2 additions & 2 deletions flow/instrumentation/tracing/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
sdktrace "go.opentelemetry.io/otel/sdk/trace"

"github.com/PeerDB-io/peer-flow/instrumentation/common"
"github.com/PeerDB-io/peer-flow/instrumentation/otel_common"
"github.com/PeerDB-io/peer-flow/peerdbenv"
)

Expand Down Expand Up @@ -61,7 +61,7 @@ func SetupOtelTraceProviderExporter(otelServiceName string) (func(ctx context.Co
if err != nil {
return nil, fmt.Errorf("failed to create OpenTelemetry trace exporter: %w", err)
}
otelResource, err := common.NewOtelResource(otelServiceName)
otelResource, err := otel_common.NewOtelResource(otelServiceName)
if err != nil {
return nil, fmt.Errorf("failed to create OpenTelemetry resource: %w", err)
}
Expand Down
4 changes: 2 additions & 2 deletions flow/otel_metrics/otel_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"go.opentelemetry.io/otel/metric"
sdkmetric "go.opentelemetry.io/otel/sdk/metric"

"github.com/PeerDB-io/peer-flow/instrumentation/common"
"github.com/PeerDB-io/peer-flow/instrumentation/otel_common"
"github.com/PeerDB-io/peer-flow/peerdbenv"
)

Expand Down Expand Up @@ -44,7 +44,7 @@ func SetupOtelMetricsExporter(otelServiceName string) (*sdkmetric.MeterProvider,
if err != nil {
return nil, fmt.Errorf("failed to create OpenTelemetry metrics exporter: %w", err)
}
otelResource, err := common.NewOtelResource(otelServiceName)
otelResource, err := otel_common.NewOtelResource(otelServiceName)
if err != nil {
return nil, fmt.Errorf("failed to create OpenTelemetry resource: %w", err)
}
Expand Down

0 comments on commit 1ef2739

Please sign in to comment.