Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Replace OpenTracing error logs with SignalFx tags #29

Merged
merged 1 commit into from
Apr 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .circleci/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
!go.mod
!go.sum
82 changes: 26 additions & 56 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ references:
image: circleci/golang:latest

workdir: &workdir
working_directory: /go/src/github.com/signalfx/signalfx-go-tracing
working_directory: /home/circleci/signalfx-go-tracing

executors:
go:
Expand Down Expand Up @@ -89,8 +89,12 @@ commands:
description: Sets project to act as go module
steps:
- run:
name: Go mod
command: go mod init
name: Setup Go mod
command: |
cp .circleci/go.mod .
cp .circleci/go.sum .
cp .circleci/grpcv12_go.mod contrib/google.golang.org/grpc.v12/go.mod
cp .circleci/grpcv12_go.sum contrib/google.golang.org/grpc.v12/go.sum

install_rdkafka:
description: Install rdkafka
Expand Down Expand Up @@ -123,33 +127,6 @@ commands:
paths:
- << parameters.dest >>

get_grpc:
description: Get gRPC
parameters:
version:
description: gRPC branch or tag
type: string
default: v1.2.0
dest:
description: git clone destination directory
type: string
default: contrib/google.golang.org/grpc.v12/vendor/google.golang.org/grpc
steps:
- restore_cache:
keys:
- v1-grpc-<< parameters.version >>
- run:
name: Vendor gRPC << parameters.version >>
command: |
if [ ! -d << parameters.dest >> ]; then
mkdir -p << parameters.dest >>
git clone --branch << parameters.version >> https://github.com/grpc/grpc-go << parameters.dest >>
fi
- save_cache:
key: v1-grpc-<< parameters.version >>
paths:
- << parameters.dest >>

go_get:
parameters:
options:
Expand All @@ -174,31 +151,24 @@ commands:

get_deps:
description: Get project dependencies
parameters:
options:
type: string
default: -v -t
packages:
type: string
default: ./...
steps:
- prepare_go_mod
- restore_cache:
keys:
- v1-gomod-{{ checksum ".circleci/go.mod" }}-{{ checksum ".circleci/grpcv12_go.mod" }}
- v1-gomod-
- run:
name: Download packages
command: |
go mod download
cd contrib/google.golang.org/grpc.v12; go mod download
go install github.com/tebeka/go2xunit
- install_rdkafka:
version: 4ffe54b4f59ee5ae3767f9f25dc14651a3384d62
- get_grpc
- go_get:
# workaround for https://github.com/go-redis/redis/commit/17480c545e170cdb82762d9b0ea5733ec0c750f6
packages: github.com/go-redis/redis@75795aa4236dc7341eefac3bbe945e68c99ef9df
- go_get:
# workaround for https://github.com/mongodb/mongo-go-driver/commit/2e90dce643ffac9852213072213ab457b6bbb62f
packages: go.mongodb.org/mongo-driver@0d1270edf53072da4da781b76d2e1db58831152f
- go_get:
packages: github.com/Shopify/sarama@b3a812117be917e2dd4f8cbcf4ff861e3ae7ef38
- go_get:
packages: google.golang.org/[email protected]
- go_get:
options: << parameters.options >>
packages: << parameters.packages >>
- save_cache:
key: v1-gomod-{{ checksum ".circleci/go.mod" }}-{{ checksum ".circleci/grpcv12_go.mod" }}
paths:
- /go/pkg/

dockerize_wait:
description: Wait for docker service to be ready
Expand Down Expand Up @@ -250,14 +220,12 @@ jobs:
steps:
- checkout
- steps: << parameters.before_deps >>
- get_deps:
packages: << parameters.packages >>
- get_deps
- steps: << parameters.after_deps >>
- run:
name: Run go tests
command: |
mkdir ~/testresults
(cd /tmp; GO111MODULE=on go get github.com/tebeka/go2xunit)
export INTEGRATION=<< parameters.integration >>
bash -euo pipefail -c "go test << parameters.options >> << parameters.packages >> | tee /dev/stderr | grep -v '\[no test files\]' | go2xunit" > ~/testresults/unit.xml
- save_test_results
Expand All @@ -270,7 +238,7 @@ jobs:
- run:
name: Run linter
command: |
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b $(go env GOPATH)/bin v1.17.0
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sudo sh -s -- -b $(go env GOPATH)/bin v1.24.0
GOGC=40 golangci-lint run --deadline 5m

workflows:
Expand All @@ -288,7 +256,9 @@ workflows:
- go_test:
# test all remaining contrib tests not included in the other jobs
name: test_contrib
packages: "`go list ./contrib/... | grep -v -P 'gocql|elastic|Shopify|kafka|memcache|globalsign|mongo|redis|redigo|sql|gorm' | xargs`"
# disable checkptr until this issue gets resolved: https://github.com/tidwall/buntdb/issues/62
options: -v -race -gcflags=all=-d=checkptr=0
packages: "`go list ./contrib/... | grep -v -P 'gocql|elastic|kafka|memcache|globalsign|mongo|redis|redigo|sql|gorm' | sed 's|github.com/signalfx/signalfx-go-tracing|.|g' | xargs`"
- go_test:
name: test_ddtrace
packages: "./ddtrace/..."
Expand Down
69 changes: 69 additions & 0 deletions .circleci/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
module github.com/signalfx/signalfx-go-tracing

go 1.12

require (
github.com/DataDog/zstd v1.4.5 // indirect
github.com/aws/aws-sdk-go v1.30.9
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b
github.com/confluentinc/confluent-kafka-go v1.4.0
github.com/davecgh/go-spew v1.1.1
github.com/emicklei/go-restful v2.12.0+incompatible
github.com/garyburd/redigo v1.6.0
github.com/gin-gonic/gin v1.6.2
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8
github.com/go-chi/chi v4.1.1+incompatible
github.com/go-logfmt/logfmt v0.3.0
github.com/go-redis/redis v6.15.7+incompatible
github.com/go-sql-driver/mysql v1.5.0
github.com/go-stack/stack v1.8.0
github.com/gocql/gocql v0.0.0-20200410100145-b454769479c6
github.com/golang/protobuf v1.4.0
github.com/gomodule/redigo v2.0.0+incompatible
github.com/gorilla/mux v1.7.4
github.com/graph-gophers/graphql-go v0.0.0-20200309224638-dae41bde9ef9
github.com/imdario/mergo v0.3.9 // indirect
github.com/jinzhu/gorm v1.9.12
github.com/jmoiron/sqlx v1.2.0
github.com/julienschmidt/httprouter v1.3.0
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515
github.com/labstack/echo v3.3.10+incompatible
github.com/labstack/gommon v0.3.0 // indirect
github.com/lib/pq v1.2.0
github.com/mailru/easyjson v0.7.1
github.com/mattn/go-sqlite3 v2.0.3+incompatible
github.com/miekg/dns v1.1.29
github.com/opentracing/opentracing-go v1.1.0
github.com/philhofer/fwd v1.0.0
github.com/pierrec/lz4 v2.5.1+incompatible // indirect
github.com/pmezard/go-difflib v1.0.0
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect
github.com/signalfx/golib v2.4.0+incompatible
github.com/stretchr/testify v1.5.1
github.com/syndtr/goleveldb v1.0.0
github.com/tebeka/go2xunit v1.4.10
github.com/tidwall/buntdb v1.1.2
github.com/tinylib/msgp v1.1.0
go.mongodb.org/mongo-driver v1.3.2
golang.org/x/net v0.0.0-20200202094626-16171245cfb2
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/sys v0.0.0-20200116001909-b77594299b42
google.golang.org/api v0.21.0
google.golang.org/grpc v1.28.1
gopkg.in/Shopify/sarama.v1 v1.20.1
gopkg.in/olivere/elastic.v3 v3.0.75
gopkg.in/olivere/elastic.v5 v5.0.85
gopkg.in/yaml.v2 v2.2.8
gotest.tools v2.2.0+incompatible
k8s.io/api v0.0.0-20190819141258-3544db3b9e44
k8s.io/apimachinery v0.0.0-20190817020851-f2f3a405f61d
k8s.io/client-go v0.0.0-20190819141724-e14f31a72a77
k8s.io/utils v0.0.0-20200414100711-2df71ebbae66 // indirect
)

replace (
gopkg.in/Shopify/sarama.v1 => github.com/Shopify/sarama v1.26.1
github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.4.0
go.mongodb.org/mongo-driver => github.com/mongodb/mongo-go-driver v1.0.4
)

Loading