Skip to content

Commit

Permalink
feat(tracing): switch to opentelemetry (#861)
Browse files Browse the repository at this point in the history
Co-authored-by: Patrik <[email protected]>
  • Loading branch information
icyphox and zepatrik authored May 13, 2022
1 parent 9d47369 commit 31f38ed
Show file tree
Hide file tree
Showing 10 changed files with 123 additions and 345 deletions.
2 changes: 0 additions & 2 deletions docker-compose-tracing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ services:
- TRACING_PROVIDER=jaeger
- TRACING_PROVIDER_JAEGER_SAMPLING_SERVER_URL=http://jaeger:5778/sampling
- TRACING_PROVIDER_JAEGER_LOCAL_AGENT_ADDRESS=jaeger:6831
- TRACING_PROVIDER_JAEGER_SAMPLING_TYPE=const
- TRACING_PROVIDER_JAEGER_SAMPLING_VALUE=1

jaeger:
image: jaegertracing/all-in-one:1.7.0
Expand Down
4 changes: 2 additions & 2 deletions embedx/schemas.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/gofrs/uuid"
"github.com/ory/x/logrusx"
"github.com/ory/x/tracing"
"github.com/ory/x/otelx"
"github.com/pkg/errors"
"github.com/tidwall/gjson"
)
Expand All @@ -29,7 +29,7 @@ func init() {
func AddConfigSchema(compiler interface {
AddResource(url string, r io.Reader) error
}) error {
if err := tracing.AddConfigSchema(compiler); err != nil {
if err := otelx.AddConfigSchema(compiler); err != nil {
return err
}
if err := logrusx.AddConfigSchema(compiler); err != nil {
Expand Down
78 changes: 26 additions & 52 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,46 +29,44 @@ require (
github.com/gobuffalo/pop/v6 v6.0.1
github.com/gofrs/uuid v4.1.0+incompatible
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645
github.com/julienschmidt/httprouter v1.3.0
github.com/luna-duclos/instrumentedsql v1.1.3
github.com/luna-duclos/instrumentedsql/opentracing v0.0.0-20201103091713-40d03108b6f4
github.com/mikefarah/yq/v4 v4.19.1
github.com/ory/analytics-go/v4 v4.0.3
github.com/ory/graceful v0.1.2
github.com/ory/herodot v0.9.13
github.com/ory/jsonschema/v3 v3.0.7
github.com/ory/keto/proto v0.0.0-00010101000000-000000000000
github.com/ory/x v0.0.358
github.com/ory/x v0.0.375
github.com/pelletier/go-toml v1.9.4
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
github.com/pkg/errors v0.9.1
github.com/rs/cors v1.8.0
github.com/segmentio/objconv v1.0.1
github.com/sirupsen/logrus v1.8.1
github.com/soheilhy/cmux v0.1.5
github.com/spf13/cobra v1.3.0
github.com/spf13/cobra v1.4.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.7.0
github.com/tidwall/gjson v1.9.4
github.com/tidwall/sjson v1.2.2
github.com/stretchr/testify v1.7.1
github.com/tidwall/gjson v1.14.0
github.com/tidwall/sjson v1.2.4
github.com/urfave/negroni v1.0.0
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.30.0
go.opentelemetry.io/otel v1.6.3
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
google.golang.org/grpc v1.43.0
google.golang.org/protobuf v1.27.1
google.golang.org/grpc v1.45.0
google.golang.org/protobuf v1.28.0
)

require (
cloud.google.com/go v0.99.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/DataDog/datadog-go v4.8.2+incompatible // indirect
github.com/DataDog/sketches-go v1.2.1 // indirect
github.com/Masterminds/semver/v3 v3.1.1 // indirect
github.com/Microsoft/go-winio v0.5.1 // indirect
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/a8m/envsubst v1.3.0 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand All @@ -77,7 +75,6 @@ require (
github.com/cockroachdb/cockroach-go/v2 v2.2.7 // indirect
github.com/containerd/containerd v1.5.8 // indirect
github.com/containerd/continuity v0.2.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgraph-io/ristretto v0.1.0 // indirect
github.com/docker/cli v20.10.11+incompatible // indirect
Expand All @@ -86,15 +83,13 @@ require (
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/elastic/go-licenser v0.3.1 // indirect
github.com/elastic/go-sysinfo v1.7.1 // indirect
github.com/elastic/go-windows v1.0.1 // indirect
github.com/elliotchance/orderedmap v1.4.0 // indirect
github.com/evanphx/json-patch v4.11.0+incompatible // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/felixge/httpsnoop v1.0.2 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-logr/logr v1.2.2 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/analysis v0.20.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
Expand All @@ -121,33 +116,29 @@ require (
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-hclog v1.0.0 // indirect
github.com/hashicorp/go-retryablehttp v0.7.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/inhies/go-bytesize v0.0.0-20210819104631-275770b98743 // indirect
github.com/instana/go-sensor v1.34.0 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.10.1 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.1.1 // indirect
github.com/jackc/pgproto3/v2 v2.2.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
github.com/jackc/pgtype v1.8.1 // indirect
github.com/jackc/pgx/v4 v4.13.0 // indirect
github.com/jackc/pgtype v1.9.0 // indirect
github.com/jackc/pgx/v4 v4.14.0 // indirect
github.com/jandelgado/gcov2lcov v1.0.5 // indirect
github.com/jcchavezs/porto v0.3.0 // indirect
github.com/jinzhu/copier v0.3.5 // indirect
github.com/jmoiron/sqlx v1.3.4 // indirect
github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 // indirect
github.com/joho/godotenv v1.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/knadh/koanf v1.4.0 // indirect
github.com/lib/pq v1.10.4 // indirect
github.com/looplab/fsm v0.3.0 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
Expand All @@ -164,24 +155,18 @@ require (
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opencontainers/runc v1.1.0 // indirect
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5 // indirect
github.com/openzipkin/zipkin-go v0.2.5 // indirect
github.com/ory/dockertest/v3 v3.8.1 // indirect
github.com/ory/go-acc v0.2.6 // indirect
github.com/ory/viper v1.7.5 // indirect
github.com/pborman/uuid v1.2.1 // indirect
github.com/philhofer/fwd v1.1.1 // indirect
github.com/pkg/profile v1.6.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.11.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/rogpeppe/go-internal v1.8.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/santhosh-tekuri/jsonschema v1.2.4 // indirect
github.com/seatgeek/logrus-gelf-formatter v0.0.0-20210414080842-5b05eb8ff761 // indirect
github.com/segmentio/backo-go v0.0.0-20200129164019-23eae7c10bd3 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
Expand All @@ -195,44 +180,33 @@ require (
github.com/tidwall/pretty v1.2.0 // indirect
github.com/timtadh/data-structures v0.5.3 // indirect
github.com/timtadh/lexmachine v0.2.2 // indirect
github.com/tinylib/msgp v1.1.6 // indirect
github.com/uber/jaeger-client-go v2.29.1+incompatible // indirect
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c // indirect
go.elastic.co/apm v1.14.0 // indirect
go.elastic.co/apm/module/apmhttp v1.14.0 // indirect
go.elastic.co/apm/module/apmot v1.14.0 // indirect
go.elastic.co/fastjson v1.1.0 // indirect
go.mongodb.org/mongo-driver v1.7.3 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.25.0 // indirect
go.opentelemetry.io/otel v1.3.0 // indirect
go.opentelemetry.io/otel/bridge/opentracing v1.2.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.3.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.3.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.3.0 // indirect
go.opentelemetry.io/otel/sdk v1.3.0 // indirect
go.opentelemetry.io/otel/trace v1.3.0 // indirect
go.opentelemetry.io/proto/otlp v0.11.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 // indirect
go.opentelemetry.io/contrib/propagators/b3 v1.4.0 // indirect
go.opentelemetry.io/contrib/propagators/jaeger v1.4.0 // indirect
go.opentelemetry.io/contrib/samplers/jaegerremote v0.0.0-20220314184135-32895002a444 // indirect
go.opentelemetry.io/otel/exporters/jaeger v1.5.0 // indirect
go.opentelemetry.io/otel/internal/metric v0.27.0 // indirect
go.opentelemetry.io/otel/metric v0.27.0 // indirect
go.opentelemetry.io/otel/sdk v1.6.3 // indirect
go.opentelemetry.io/otel/trace v1.6.3 // indirect
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
golang.org/x/mod v0.5.1 // indirect
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f // indirect
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
golang.org/x/tools v0.1.7 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
gopkg.in/DataDog/dd-trace-go.v1 v1.33.0 // indirect
gopkg.in/ini.v1 v1.66.2 // indirect
gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
howett.net/plist v0.0.0-20201203080718-1454fab16a06 // indirect
)

go 1.17
Loading

0 comments on commit 31f38ed

Please sign in to comment.