Commit Graph

20 Commits (master)

Author SHA1 Message Date
Jeffrey Smith II f74c69c5e4
chore: update to go 1.20 (#24088)
* build: upgrade to go 1.19

* chore: bump go.mod

* chore: `gofmt` changes for doc comments

https://tip.golang.org/doc/comment

* test: update tests for new sort order

* chore: make generate-sources

* chore: make generate-sources

* chore: go 1.20

* chore: handle rand.Seed deprecation

* chore: handle rand.Seed deprecation in tests

---------

Co-authored-by: DStrand1 <dstrandboge@influxdata.com>
2023-02-09 14:14:35 -05:00
Sam Arnold 5015297d40
fix: more expressive errors (#22448)
* fix: more expressive errors

Closes #22446

* fix: server only logging for untyped errors

* chore: fix formatting
2021-09-13 15:12:35 -04:00
Gianluca Arbezzano 36cc197470 fix(tracing): set method to trace
It is solid to use retrieve the method directly from the request.

Co-authored-by: George MacRorie <gmacrorie@influxdata.com>
Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
2020-04-08 14:48:53 +02:00
George 557d522af1
fix(tracing): add support for tracing route annotation when using chi (#17648) 2020-04-07 15:35:56 +01:00
Gianluca Arbezzano 8e5bd1a2dd chore(tracing): embed the opentracing.Span
Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
2020-03-31 16:01:31 +02:00
Gianluca Arbezzano af06897014 chore(tracing): Span with Prometheus Metrics moved to kit/tracing
I think it is a nice utility function that I would like to use
elsewhere.

So I decided to move it out to the tracing package.

Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
2020-03-31 14:17:50 +02:00
George ff38420558
feat(tasks): remove flux stats from run log and replace with trace id (#16263)
* feat(tasks): trace id in task run logs

* refactor(tracing): move trace info utility into kit/tracing package
2019-12-18 16:30:38 +01:00
Gavin Cabbage 43ff4abffd feat(query): add trace response headers 2019-12-11 09:10:21 -05:00
George 3dbb9c0fd2
feat(tracing): dont trace spans with full request paths as operation name in ExtractFromHTTPRequest (#15971)
* feat(tracing): dont trace spans with full URL path names in ExtractFromHTTPRequest

* chore(multiple): replace all occurrences of julienschmidt/httprouter with influxdata/httprouter
2019-11-25 15:22:19 +01:00
Jacob Marble af2d26584a
chore(tracing): LogError handles nil; remove Jaeger from test (#14260) 2019-07-03 16:43:07 -07:00
Jacob Marble f56c42794b
chore(tracing): Cleanup (#13296)
* chore(tracing): Cleanup

* broken test

* fix unused var

* fix test
2019-04-10 19:28:21 -07:00
Jacob Marble 37e581694b
fix: Use simple function name for tracing operation name (#12586)
* fix: Use simple function name for tracing operation name

Every span has an operation name, which shows up in multiple places in
the Jaeger UI. Verbose function names like
`github.com/influxdata/influxdb/kit/tracing.StartSpanFromContext`
are not readable in this UI. Shorter function names like
`StartSpanFromContext` improve UX. Context is not lost because (1) the
filename and line number are logged with the span and (2) spans are
understood in the context of other spans, marked with service name and
operation name.

Extra cost is ~22 ns per call to StartSpanFromContext. No additional
memory is allocated.

* goimports

* slice more than function name as span operatio name
2019-03-13 11:49:32 -07:00
Jacob Marble 5e9a74f46d add benchmarks to demonstrate performance composition 2019-03-07 22:34:31 -08:00
Stuart Carnie b98a8fed0b
perf(tracing): Use alternate runtime APIs to reduce allocs / cpu
```
benchmark                                                      old ns/op     new ns/op     delta
BenchmarkLocal_StartSpanFromContext-8                          1382          718           -48.05%

benchmark                                       old allocs     new allocs     delta
BenchmarkLocal_StartSpanFromContext-8           6              4              -33.33%

benchmark                                       old bytes     new bytes     delta
BenchmarkLocal_StartSpanFromContext-8           376           224           -40.43%
```
2019-03-07 18:28:57 -07:00
Jacob Marble 2d740fc1ce panic on nil context 2019-03-07 12:12:31 -07:00
Jacob Marble 603a1f26e0 use tracing.StartSpanFromContext 2019-03-07 12:12:31 -07:00
Jacob Marble 8d146db9ad commit to using runtime.Caller and added tests 2019-03-07 12:12:31 -07:00
Jacob Marble 742c5fd166 godoc formatting 2019-03-07 12:12:31 -07:00
Jacob Marble 9541e861a3 goimports -w -local github.com/influxdata/influxdb 2019-03-07 12:12:31 -07:00
Jacob Marble 92fa813c45 add spans to multiple services 2019-03-07 12:12:31 -07:00