Commit Graph

13 Commits (1ccd0e1d60868f4cf25326393733d8eb72f6270a)

Author SHA1 Message Date
Johnny Steenbergen 1ccd0e1d60 chore(http): add panic mw for chi base router 2020-06-09 16:01:11 -07:00
Jonathan A. Sternberg 0ae8bebd75
refactor: rewrite imports to include the /v2 suffix for version 2 2020-04-03 12:39:20 -05:00
Johnny Steenbergen c8aabaf515 chore(http): fixup middleware stack and normalize metrics into same buckets for id fields 2020-01-08 15:05:34 -08:00
Johnny Steenbergen 8729cd0959 chore(http): refactor api handler take advantage of route tree instead of switch statement
is very much WIP at this point
2019-12-11 09:53:29 -08: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
Johnny Steenbergen b4b337e414 chore(http): provide mountable router for registering routes on APIHandler 2019-11-07 09:44:24 -08:00
Kelvin Wang 9ecada4dce feat(http): convert errorEncode to use interface 2019-06-26 21:41:01 -04:00
Jonathan A. Sternberg 38d9fb8c79
feat(http): pretty stack trace for the http panic recovery handler (#13509)
When printing out a stacktrace with a logged error message, it is better
to set the `Stack` property on the entry than to include it as a string
within the context fields. It is also better than using `zap.Stack()`
too.

This is because certain encoders will perform a pretty print of the
stacktrace. The default zap-logfmt will read this property and include
it as a field so this code is identical when using that encoder, but the
console encoder, which is commonly used in local development because it
is automatically used with a TTY available, will print out a newline and
pretty print the stacktrace if it is included on the entry itself.
2019-04-26 15:06:41 -05:00
zhulongcheng 17a3a02ee3 log api panic with a stack trace 2019-01-15 11:58:42 +08:00
Mark Rushakoff d73d73c0d4 chore: rename imports from platform to influxdb
I did this with a dumb editor macro, so some comments changed too.

Also rename root package from platform to influxdb.

In interest of minimizing risk, anyone importing the root package has
now aliased it to "platform" so that no changes beyond imports were
necessary in those files.

Lastly, replace the old platform module to local path /dev/null so that
nobody can accidentally reintroduce a platform dependency while
migrating platform code to influxdb.
2019-01-09 20:51:47 -08:00
zhulongcheng e73d4fc637 add MethodNotAllowed handler 2018-12-23 15:55:45 +08:00
zhulongcheng 73a52bad6c add panic handler 2018-12-21 18:20:14 +08:00
zhulongcheng 5f40883342 add custom-404 handler 2018-12-16 22:55:39 +08:00