Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tracing): dont trace spans with full request paths as operation name in ExtractFromHTTPRequest #15971

Merged
merged 2 commits into from
Nov 25, 2019
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: 1 addition & 1 deletion chronograf/server/annotations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/influxdata/influxdb/chronograf"
"github.com/influxdata/influxdb/chronograf/mocks"
"github.com/julienschmidt/httprouter"
"github.com/influxdata/httprouter"
)

func TestService_Annotations(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion chronograf/server/cells.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"fmt"
"net/http"

"github.com/influxdata/httprouter"
"github.com/influxdata/influxdb/chronograf"
idgen "github.com/influxdata/influxdb/chronograf/id"
"github.com/julienschmidt/httprouter"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion chronograf/server/cells_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb/chronograf"
"github.com/influxdata/influxdb/chronograf/mocks"
"github.com/julienschmidt/httprouter"
"github.com/influxdata/httprouter"
)

func Test_Cells_CorrectAxis(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion chronograf/server/databases.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"net/url"
"strconv"

"github.com/influxdata/httprouter"
"github.com/influxdata/influxdb/chronograf"
"github.com/julienschmidt/httprouter"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion chronograf/server/databases_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/influxdata/influxdb/chronograf"
"github.com/influxdata/influxdb/chronograf/mocks"
"github.com/julienschmidt/httprouter"
"github.com/influxdata/httprouter"
)

func TestService_GetDatabases(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion chronograf/server/influx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/influxdata/influxdb/chronograf"
"github.com/influxdata/influxdb/chronograf/mocks"
"github.com/julienschmidt/httprouter"
"github.com/influxdata/httprouter"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the go.mod replace was supposed to make import changes unnecessary?

Copy link
Contributor Author

@GeorgeMac GeorgeMac Nov 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah as @mark-rushakoff says. This is great until the compat tests run and then it breaks :( but seems like bringing the fork under our banner works.

My latest problem is flux depends on the original version 😂 that is my next challenge. figured it out

)

func TestService_Influx(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion chronograf/server/mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (

"github.com/NYTimes/gziphandler"
"github.com/bouk/httprouter"
jhttprouter "github.com/influxdata/httprouter"
"github.com/influxdata/influxdb/chronograf"
"github.com/influxdata/influxdb/chronograf/oauth2"
"github.com/influxdata/influxdb/chronograf/roles"
jhttprouter "github.com/julienschmidt/httprouter"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion chronograf/server/permissions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/influxdata/influxdb/chronograf"
"github.com/influxdata/influxdb/chronograf/mocks"
"github.com/julienschmidt/httprouter"
"github.com/influxdata/httprouter"
)

func TestService_Permissions(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion chronograf/server/queries_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/influxdata/influxdb/chronograf"
"github.com/influxdata/influxdb/chronograf/mocks"
"github.com/julienschmidt/httprouter"
"github.com/influxdata/httprouter"
)

func TestService_Queries(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion chronograf/server/sources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/influxdata/influxdb/chronograf"
"github.com/influxdata/influxdb/chronograf/mocks"
"github.com/julienschmidt/httprouter"
"github.com/influxdata/httprouter"
)

func Test_ValidSourceRequest(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ require (
github.com/hashicorp/vault/api v1.0.2
github.com/influxdata/cron v0.0.0-20191112133922-ad5847cfab62
github.com/influxdata/flux v0.54.0
github.com/influxdata/httprouter v1.3.1-0.20191122104820-ee83e2772f69
github.com/influxdata/influxql v0.0.0-20180925231337-1cbfca8e56b6
github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368
github.com/jessevdk/go-flags v1.4.0
github.com/jsternberg/zap-logfmt v1.2.0
github.com/julienschmidt/httprouter v1.2.0
github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 // indirect
github.com/kevinburke/go-bindata v3.11.0+incompatible
Expand Down
3 changes: 2 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ github.com/influxdata/flux v0.54.0 h1:DjAkGoPkgHLDPEn1jSuOpsH4QgcjmSBkRuxSAaQCj1
github.com/influxdata/flux v0.54.0/go.mod h1:ZFf4F0c8ACFP/5BkfCwk9I/vUwcByr0vMdLxwgOk57E=
github.com/influxdata/goreleaser v0.97.0-influx h1:jT5OrcW7WfS0e2QxfwmTBjhLvpIC9CDLRhNgZJyhj8s=
github.com/influxdata/goreleaser v0.97.0-influx/go.mod h1:MnjA0e0Uq6ISqjG1WxxMAl+3VS1QYjILSWVnMYDxasE=
github.com/influxdata/httprouter v1.3.1-0.20191122104820-ee83e2772f69 h1:WQsmW0fXO4ZE/lFGIE84G6rIV5SJN3P3sjIXAP1a8eU=
github.com/influxdata/httprouter v1.3.1-0.20191122104820-ee83e2772f69/go.mod h1:pwymjR6SrP3gD3pRj9RJwdl1j5s3doEEV8gS4X9qSzA=
github.com/influxdata/influxql v0.0.0-20180925231337-1cbfca8e56b6 h1:CFx+pP90q/qg3spoiZjf8donE4WpAdjeJfPOcoNqkWo=
github.com/influxdata/influxql v0.0.0-20180925231337-1cbfca8e56b6/go.mod h1:KpVI7okXjK6PRi3Z5B+mtKZli+R1DnZgb3N+tzevNgo=
github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e h1:/o3vQtpWJhvnIbXley4/jwzzqNeigJK9z+LZcJZ9zfM=
Expand All @@ -269,7 +271,6 @@ github.com/jsternberg/zap-logfmt v1.2.0 h1:1v+PK4/B48cy8cfQbxL4FmmNZrjnIMr2BsnyE
github.com/jsternberg/zap-logfmt v1.2.0/go.mod h1:kz+1CUmCutPWABnNkOu9hOHKdT2q3TDYCcsFy9hpqb0=
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/julienschmidt/httprouter v1.2.0 h1:TDTW5Yz1mjftljbcKqRcrYhd4XeOoI98t+9HbQbYf7g=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef h1:2jNeR4YUziVtswNP9sEFAI913cVrzH85T+8Q6LpYbT0=
github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0=
Expand Down
2 changes: 1 addition & 1 deletion http/auth_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (

"go.uber.org/zap"

"github.com/influxdata/httprouter"
platform "github.com/influxdata/influxdb"
platcontext "github.com/influxdata/influxdb/context"
"github.com/julienschmidt/httprouter"
)

// AuthorizationBackend is all services and associated parameters required to construct
Expand Down
2 changes: 1 addition & 1 deletion http/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/influxdata/influxdb/kv"
"github.com/influxdata/influxdb/mock"
platformtesting "github.com/influxdata/influxdb/testing"
"github.com/julienschmidt/httprouter"
"github.com/influxdata/httprouter"
)

// NewMockAuthorizationBackend returns a AuthorizationBackend with mock services.
Expand Down
2 changes: 1 addition & 1 deletion http/authentication_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"net/http"
"time"

"github.com/influxdata/httprouter"
platform "github.com/influxdata/influxdb"
platcontext "github.com/influxdata/influxdb/context"
"github.com/influxdata/influxdb/jsonweb"
"github.com/julienschmidt/httprouter"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion http/bucket_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"path"
"time"

"github.com/julienschmidt/httprouter"
"github.com/influxdata/httprouter"
"go.uber.org/zap"

"github.com/influxdata/influxdb"
Expand Down
2 changes: 1 addition & 1 deletion http/bucket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/influxdata/influxdb/kv"
"github.com/influxdata/influxdb/mock"
platformtesting "github.com/influxdata/influxdb/testing"
"github.com/julienschmidt/httprouter"
"github.com/influxdata/httprouter"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion http/check_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"fmt"
"net/http"

"github.com/influxdata/httprouter"
"github.com/influxdata/influxdb"
pctx "github.com/influxdata/influxdb/context"
"github.com/influxdata/influxdb/notification/check"
"github.com/julienschmidt/httprouter"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion http/check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/influxdata/influxdb/mock"
"github.com/influxdata/influxdb/notification/check"
influxTesting "github.com/influxdata/influxdb/testing"
"github.com/julienschmidt/httprouter"
"github.com/influxdata/httprouter"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion http/chronograf_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"net/http"

"github.com/NYTimes/gziphandler"
"github.com/influxdata/httprouter"
"github.com/influxdata/influxdb"
"github.com/influxdata/influxdb/chronograf/server"
"github.com/julienschmidt/httprouter"
)

// ChronografHandler is an http handler for serving chronograf chronografs.
Expand Down
2 changes: 1 addition & 1 deletion http/dashboard_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"net/http"
"path"

"github.com/influxdata/httprouter"
platform "github.com/influxdata/influxdb"
"github.com/julienschmidt/httprouter"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion http/dashboard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/influxdata/influxdb/inmem"
"github.com/influxdata/influxdb/mock"
platformtesting "github.com/influxdata/influxdb/testing"
"github.com/julienschmidt/httprouter"
"github.com/influxdata/httprouter"
"github.com/yudai/gojsondiff"
"github.com/yudai/gojsondiff/formatter"
)
Expand Down
2 changes: 1 addition & 1 deletion http/delete_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
http "net/http"
"time"

"github.com/influxdata/httprouter"
"github.com/influxdata/influxdb"
pcontext "github.com/influxdata/influxdb/context"
"github.com/influxdata/influxdb/kit/tracing"
"github.com/influxdata/influxdb/predicate"
"github.com/julienschmidt/httprouter"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion http/document_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"fmt"
"net/http"

"github.com/influxdata/httprouter"
"github.com/influxdata/influxdb"
pcontext "github.com/influxdata/influxdb/context"
"github.com/julienschmidt/httprouter"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion http/document_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
pcontext "github.com/influxdata/influxdb/context"
"github.com/influxdata/influxdb/mock"
influxtesting "github.com/influxdata/influxdb/testing"
"github.com/julienschmidt/httprouter"
"github.com/influxdata/httprouter"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion http/label_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (

"go.uber.org/zap"

"github.com/influxdata/httprouter"
"github.com/influxdata/influxdb"
"github.com/julienschmidt/httprouter"
)

// LabelHandler represents an HTTP API handler for labels
Expand Down
2 changes: 1 addition & 1 deletion http/label_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
platform "github.com/influxdata/influxdb"
"github.com/influxdata/influxdb/mock"
platformtesting "github.com/influxdata/influxdb/testing"
"github.com/julienschmidt/httprouter"
"github.com/influxdata/httprouter"
)

func TestService_handleGetLabels(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion http/notification_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"fmt"
"net/http"

"github.com/influxdata/httprouter"
"github.com/influxdata/influxdb"
pctx "github.com/influxdata/influxdb/context"
"github.com/influxdata/influxdb/notification/endpoint"
"github.com/julienschmidt/httprouter"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion http/notification_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/influxdata/influxdb/mock"
"github.com/influxdata/influxdb/notification/endpoint"
influxTesting "github.com/influxdata/influxdb/testing"
"github.com/julienschmidt/httprouter"
"github.com/influxdata/httprouter"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion http/notification_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"fmt"
"net/http"

"github.com/influxdata/httprouter"
"github.com/influxdata/influxdb"
pctx "github.com/influxdata/influxdb/context"
"github.com/influxdata/influxdb/notification/rule"
"github.com/julienschmidt/httprouter"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion http/onboarding.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"fmt"
"net/http"

"github.com/influxdata/httprouter"
platform "github.com/influxdata/influxdb"
"github.com/julienschmidt/httprouter"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion http/org_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http"
"path"

"github.com/julienschmidt/httprouter"
"github.com/influxdata/httprouter"
"go.uber.org/zap"

"github.com/influxdata/influxdb"
Expand Down
2 changes: 1 addition & 1 deletion http/query_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ import (
"github.com/influxdata/flux/csv"
"github.com/influxdata/flux/iocounter"
"github.com/influxdata/flux/parser"
"github.com/influxdata/httprouter"
"github.com/influxdata/influxdb"
pcontext "github.com/influxdata/influxdb/context"
"github.com/influxdata/influxdb/http/metric"
"github.com/influxdata/influxdb/kit/check"
"github.com/influxdata/influxdb/kit/tracing"
"github.com/influxdata/influxdb/query"
"github.com/julienschmidt/httprouter"
"github.com/pkg/errors"
prom "github.com/prometheus/client_golang/prometheus"
"go.uber.org/zap"
Expand Down
3 changes: 2 additions & 1 deletion http/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"sync"

"github.com/go-chi/chi"
"github.com/influxdata/httprouter"
platform "github.com/influxdata/influxdb"
influxlogger "github.com/influxdata/influxdb/logger"
"github.com/julienschmidt/httprouter"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)
Expand All @@ -22,6 +22,7 @@ func NewRouter(h platform.HTTPErrorHandler) *httprouter.Router {
router.NotFound = http.HandlerFunc(b.notFound)
router.MethodNotAllowed = http.HandlerFunc(b.methodNotAllowed)
router.PanicHandler = b.panic
router.AddMatchedRouteToContext = true
return router
}

Expand Down
2 changes: 1 addition & 1 deletion http/scraper_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"net/http"
"path"

"github.com/influxdata/httprouter"
"github.com/influxdata/influxdb"
pctx "github.com/influxdata/influxdb/context"
"github.com/julienschmidt/httprouter"
"go.uber.org/zap"
)

Expand Down
2 changes: 1 addition & 1 deletion http/scraper_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/influxdata/influxdb/inmem"
"github.com/influxdata/influxdb/mock"
platformtesting "github.com/influxdata/influxdb/testing"
"github.com/julienschmidt/httprouter"
"github.com/influxdata/httprouter"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion http/session_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"net/http"

"github.com/influxdata/httprouter"
platform "github.com/influxdata/influxdb"
"github.com/julienschmidt/httprouter"
"go.uber.org/zap"
)

Expand Down
Loading