Skip to content

Commit

Permalink
Remove OpenCensus
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme committed Oct 4, 2024
1 parent 250bfc5 commit 0a37090
Show file tree
Hide file tree
Showing 9 changed files with 537 additions and 1,000 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.18
go-version: 1.23

- name: Cache Go
id: module-cache
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.18
go-version: 1.23

- name: Cache Go
id: module-cache
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.18
go-version: 1.23

- name: Cache Go
id: module-cache
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.18
go-version: 1.23

- name: Cache Go
id: module-cache
Expand Down
9 changes: 7 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,8 @@ linters:
disable:
- errcheck
enable:
- depguard
- errorlint
- exportloopref
- copyloopvar
- gocritic
- gofmt
- goimports
Expand All @@ -118,6 +117,12 @@ linters:
issues:
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
- linters:
- gosec
text: "G115"
- linters:
- staticcheck
text: "SA1019"

# The list of ids of default excludes to include or disable. By default it's empty.
# See the list of default excludes here https://golangci-lint.run/usage/configuration.
Expand Down
5 changes: 0 additions & 5 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"time"

jaegerpb "github.com/jaegertracing/jaeger/model"
"go.opencensus.io/stats/view"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/trace"
Expand Down Expand Up @@ -73,10 +72,6 @@ type Client struct {

// New creates a new SAPM Client
func New(opts ...Option) (*Client, error) {
views := metricViews()
if err := view.Register(views...); err != nil {
return nil, err
}

c := &Client{
numWorkers: defaultNumWorkers,
Expand Down
67 changes: 0 additions & 67 deletions client/metrics.go

This file was deleted.

6 changes: 0 additions & 6 deletions client/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,22 +120,16 @@ func (w *worker) export(ctx context.Context, batches []*jaegerpb.Batch, accessTo
if err != nil {
span.RecordError(err)
span.SetStatus(codes.Error, "")
recordEncodingFailure(ctx, sr)
return nil, &ErrSend{Err: err, Permanent: true}
}

responseBody, serr := w.send(ctx, sr, accessToken)
if serr == nil {
recordSuccess(ctx, sr)
return responseBody, nil
}
span.RecordError(err)
span.SetStatus(codes.Error, "")

recordSendFailure(ctx, sr)
if serr.Permanent {
recordDrops(ctx, sr)
}
return responseBody, serr
}

Expand Down
59 changes: 27 additions & 32 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,47 +1,42 @@
module github.com/signalfx/sapm-proto

go 1.18
go 1.23

require (
github.com/gogo/protobuf v1.3.2
github.com/golang/protobuf v1.5.2
github.com/jaegertracing/jaeger v1.41.0
github.com/klauspost/compress v1.16.5
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.68.0
github.com/stretchr/testify v1.8.4
go.opencensus.io v0.24.0
go.opentelemetry.io/collector/pdata v1.0.0-rc2
go.opentelemetry.io/collector/semconv v0.79.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.37.0
go.opentelemetry.io/otel v1.11.2
go.opentelemetry.io/otel/trace v1.11.2
go.opentelemetry.io/proto/otlp v0.19.0
google.golang.org/protobuf v1.28.1
github.com/golang/protobuf v1.5.4
github.com/jaegertracing/jaeger v1.61.0
github.com/klauspost/compress v1.17.9
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.108.0
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/collector/pdata v1.15.0
go.opentelemetry.io/collector/semconv v0.109.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0
go.opentelemetry.io/otel v1.30.0
go.opentelemetry.io/otel/trace v1.30.0
go.opentelemetry.io/proto/otlp v1.3.1
google.golang.org/protobuf v1.34.2
)

require (
github.com/apache/thrift v0.17.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/apache/thrift v0.20.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.68.0 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
go.opentelemetry.io/otel/metric v0.34.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.108.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
go.opentelemetry.io/otel/metric v1.30.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c // indirect
google.golang.org/grpc v1.51.0 // indirect
google.golang.org/grpc v1.66.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 0a37090

Please sign in to comment.