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>
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>
With `/health`, it is possible to override the overall status reported.
This change adds the same functionality to `/ready`. This allows
incident responders to take an unhealthy pod out of a service without
killing it—giving them time to gather meaningful forensic data from the
pod. The new contract is:
Force not ready:
GET /ready?force=true&ready=false
Force ready:
GET /ready?force=true&ready=true
Disable override:
GET /ready?force=false
* chore: Remove several instances of WithLogger
* chore: unexport Logger fields
* chore: unexport some more Logger fields
* chore: go fmt
chore: fix test
chore: s/logger/log
chore: fix test
chore: revert http.Handler.Handler constructor initialization
* refactor: integrate review feedback, fix all test nop loggers
* refactor: capitalize all log messages
* refactor: rename two logger to log
* feat(tracing): dont trace spans with full URL path names in ExtractFromHTTPRequest
* chore(multiple): replace all occurrences of julienschmidt/httprouter with influxdata/httprouter
This command performs verification of TSM blocks
* expected and actual CRC-32 checksums match
* expected and actual min and max timestamps match decoded
data
This commit consists of several improvements or changes:
* migrate the influxd binary to cobra.Command
* introduce a default run sub-command to start the server
* register the run sub-command flags with viper
to maintain compatibility with the existing behavior of automatic
binding of flags to environment variables.
Closes#12602
* 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
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.
* feat(api/health): Add a standardized health and ready check system
Build a system that can be used for both ready and health checking.
It can be used directly as a http.Handler and can be given a passthrough handler,
allowing it to operate as middleware.
test(testing): add tests for dashboards and cells
test(bolt): all conformance tests for dashbaords and cells
fix(bolt): rename dashboardV2Bucket to dashboardBucket
feat(chronograf): introduce v2 dashboards
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
chore(chronograf): add tests for v2 dashboard reducer
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
chore(chronograf): create dashboard from dashboard index
Co-authored-by: Andrew Watkins <andrew.watkinz@gmail.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
chore(chronograf): move tests to same level of heirarchy as file tested
chronograf(chore): implement import dashboard with v2 api
chore(chronograf): delete dashboards from v2 api
chore(chronograf): add source health handler
chore(chronograf): move sources reducer to sources dir
chore(chronograf): remove stutter in notify
WIP stop namespacing by sourceID
chore(chronograf): no longer namespace routes under sources/:sourceID
WIP move dashtimeV1 to ranges
WIP remove CEO
chrore(chronograf): WIP Remove CEO and QueryMaker
chore(chronograf): introduce updateDashboard v2
chore(chronograf): Change cell to view
A dashboard's cell object now only contains positional information
for the cell in it's grid and a reference to the cell's view data.
A cell's view contains all necessary information for the cell's
visualization.
Add react-grid-layout types
chore(chronograf): introduce add cell
chore(chronograf): fix type errors
Not on DashboardPage
feat(platform): add cell methods to dashboard service interface
feat(mock): update dashboard service with cell methods
feat(testing): add cell methods to testing package
feat(bolt): add dashboard cell methods to bolt dashbaord service
feat(http): add cell routes to dashbaord handler
feat(platform): add dependent create/destroy of views from cells
chore(chronograf): introduce update dashboard cells endpoint
WIP update cells FE
fix(http): rename Cells to cells on dashboard cells response
chore(chronograf): re-introduce dashboard cell dragging
feat(platform): add copy dashboard cell to dashboard service
chore(platform): rename cell to view across codebase
feat(bolt): add replace dashboard tests
Move Layouts to Cells
Introduce delete cell
Fix broken test
fix(platform): update route for copying a a dashboard cell
UI for delete cell
Introduce copy cell
feat(platform): add copy view options to AddDashboardCell
feat(bolt): delete views when dashboard is removed.
Cleanup
Fix type errors
Fix links not updating
Remove annotations from RefreshingGraph
Sources and types work
fix(platform): add TODO.go files back
fix(view): rename visualizationType to type in view JSON
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
fix(dashboardTime): change dashboardID to string
Co-authored-by: Deniz Kusefoglu <deniz@influxdata.com>
Co-authored-by: Michael Desa <mjdesa@gmail.com>
feat(http): add dashboard api to swagger documentation
review(http): fix comments and function naming
feat(http): update sources swagger documentation
review(http): update the swagger to reflect the implementation
feat(platform): add usingView options to POST /dashboard/:id/cells