Commit Graph

19 Commits (9b6d4f949975b9f9db8228a961090b5b4f49b1a4)

Author SHA1 Message Date
Ayan George ca2055c16c
refactor: Replace ctx.Done() with ctx.Err() (#19546)
* refactor: Replace ctx.Done() with ctx.Err()

Prior to this commit we checked for context cancellation with a select
block and context.Context.Done() without multiplexing over any other
channel like:

  select {
    case <-ctx.Done():
      // handle cancellation
    default:
      // fallthrough
  }

This commit replaces those type of blocks with a simple check of
ctx.Err().  This has the following benefits:

* Calling ctx.Err() is much faster than entering a select block.

* ctx.Done() allocates a channel when called for the first time.

* Testing the result of ctx.Err() is a reliable way of determininging if
  a context.Context value has been canceled.

* fix: Fix data race in execDeleteTagValueEntry()
2020-09-16 12:20:09 -04:00
Jonathan A. Sternberg 5aeca082c8
chore: update staticcheck and fix newly identified lint checks (#18737) 2020-06-26 18:54:09 -05:00
Jonathan A. Sternberg 0ae8bebd75
refactor: rewrite imports to include the /v2 suffix for version 2 2020-04-03 12:39:20 -05:00
Greg e593119c3d
feat: report telegraf plugin usage metrics (#16378)
* Begin implementing retreival of telegraf plugin stats

* Implement storing/deletion of telegraf plugin stats

* Test plugin stats

* Initialize plugins bucket for tests

* Add comment

* Shorten time and frequency in bolt when providing telegraf plugins metrics

* Simplify ticker loop

* Leak underlying ticker while still satisfying linter
2020-02-04 08:24:58 -07:00
Jacob Marble 5f19c6cace
chore: Remove several instances of WithLogger (#15996)
* 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
2019-12-04 15:10:23 -08:00
Chris Goller 93f4954da1 feat(telemetry): update redirection website for telemetry information 2019-01-22 18:27:28 -06:00
Chris Goller 5543e4e296 feat(telemetry): add telemetry.influxdata.com as telemetry URL 2019-01-22 16:56:12 -06:00
Chris Goller 781e305aff feat(telemetry): encode metrics into store in various formats 2019-01-21 22:02:24 -06:00
Chris Goller f30c5358d7 feat(telemetry): allow store format to be set 2019-01-21 18:45:04 -06:00
Chris Goller 4a16a8b68e refactor(telemetry): allow push format to be specified 2019-01-21 17:55:58 -06:00
Chris Goller 1062a5defa fix(telemetry): unused variable in test 2019-01-21 13:05:58 -06:00
Chris Goller d9f5e84d6a feat(telemetry): add telemetry server handler 2019-01-21 13:05:58 -06:00
Chris Goller 2d00eb18c5 feat(telemetry): add telemetry handler 2019-01-21 13:05:58 -06:00
Chris Goller e5c8e545b9 feat(telemetry): add http, query, and storage families 2019-01-21 13:05:58 -06:00
Chris Goller e8215c01b5 refactor(telemetry): remove usage to simplify to a filter. 2019-01-21 13:05:58 -06:00
Chris Goller 68b0163db8 chore(telemetry): rename usage to metrics 2019-01-21 13:05:58 -06:00
Chris Goller 29e3942756 feat(telemetry): add boltdb resource counts to telemetry collection 2019-01-21 13:05:58 -06:00
Chris Goller e690f4bfb3 chore(telemetry): move telemetry into its own package 2019-01-21 13:05:58 -06:00
Chris Goller b3161b0927 chore(telemetry): moving packages from prometheus to telemetry 2019-01-21 13:05:58 -06:00