Commit Graph

184 Commits

Author SHA1 Message Date
Dave Protasowski 7764284cfa
include OpenCensus in the list of metric backend (#2189) 2021-07-14 13:08:31 -07:00
Dave Protasowski aff7376aba
drop stackdriver metrics and tracing exporters (#2183)
* drop stack driver as a tracing backend

* drop stackdriver as a metrics backend

* update deps - dropping stackdriver

* fix linting issues

* drop further references to stack driver

* drop serving & eventing metric key constants
these have been moved to their respective repos
see: https://github.com/knative/pkg/issues/608

* move source metrickeys to pkg/source

We're going to move the StatsReporter downstream eventually

related:
https://github.com/knative/eventing/pull/5587
https://github.com/knative/eventing/pull/5586

* fix linter
2021-07-14 11:45:31 -07:00
Dave Protasowski 6484377731
update boilerplate date (#2134) 2021-05-28 13:21:29 -07:00
Markus Thömmes 980a33719a
Fix revive related linting issues (#2131) 2021-05-26 01:10:28 -07:00
Stavros Kontopoulos 942c621ec5
add prometheus condition (#2088) 2021-04-19 11:42:01 -07:00
Evan Anderson 728bc4ad4e
Update OWNERS_ALIASES to match autogen in community (#2078) 2021-04-08 07:42:51 -07:00
Stavros Kontopoulos b8e331a6ab
Add skonto to metrics reviewers (#2061)
* add to metrics reviewers

* add group

* new line
2021-04-06 10:01:39 -07:00
Markus Thömmes 40488532be
Drop master references to knative repos (#2050) 2021-03-11 09:48:26 -08:00
Stavros Kontopoulos 85bc723bac
Add benchmark for metrics recording (#2052)
* add bench for metrics recording

* fixes

* fix import
2021-03-10 08:50:25 -08:00
Stavros Kontopoulos 5367a43eef
Fix potential deadlock when k8s client is used (#2031)
* remove global metrics config lock

* add header

* add space

* lint

* remove metrics worker setup func
2021-02-24 16:35:47 -08:00
Stavros Kontopoulos 6c2f94a4d6
Unregister views to avoid slow oom issue during meter cleanup (#2005)
* unregister views

* add a test

* fix string issue

* fix

* fixes

* fixe races in tests

* fix exporter issue

* stop meter in cleanup

* fixes

* typo

* revert timeout change

* fixes

* change msg
2021-02-17 02:17:02 -08:00
Stavros Kontopoulos 84c98f3c3e
remove reflector metrics (#2020) 2021-02-15 08:55:23 -08:00
Stavros Kontopoulos 448ae657fb
Metric unit fixes (#2018)
* metric unit fixes

* additional fixes
2021-02-12 12:38:35 -08:00
Matt Moore 27db5ac24c
Add nostackdriver to metrics as well (#1975) 2020-12-23 18:48:04 -08:00
Matt Moore 9d0775512a
Fix comment on constant (#1973) 2020-12-22 16:21:04 -08:00
Evan Anderson e41409af6c
Refactor and fix metrics export tests. (#1957)
* Copy resource_view_test to e2e_test

* Restore metrics/resource_view_test.go

* Refactor metrics tests, fix e2e_test

* Address yanweiguo feedback

* Cleanup per vagababov

* Switch to zap.Error but avoid the bug the code previously had.
2020-12-18 10:57:03 -08:00
Markus Thömmes ba2137c16f
Fix excessive allocation in the resource metrics (#1964)
* Fix excessive allocation in the resource metrics

* Optimize further

* Fix lint

* Prettify

* Add comment to lambda

* Even prettier
2020-12-15 09:37:58 -08:00
Lionel Villard fea72c1c8e
Fix logging message (#1923) 2020-11-23 09:29:58 -08:00
Markus Thömmes d9c4e5c439
Fix a few more occurrences of divisive language (#1902) 2020-11-12 06:41:59 -08:00
Victor Agababov b713a3c08e
Retain the UT improvements from #1898 (#1900) 2020-11-10 14:48:59 -08:00
Victor Agababov 2c9320ae06
Revert "Add a flag to disable QP profiling. (#1898)" (#1899)
REvert since this is not well thought through.
Will take to API WG.

This reverts commit f98befda69.
2020-11-09 09:57:09 -08:00
Victor Agababov f98befda69
Add a flag to disable QP profiling. (#1898)
* Add a flag to disable QP profiling.

Turning profiling on or off toggles full rolling restart
of knative pods. And if profiling QP is not of interest, this
might be quite undesireable. To permit that.

* spelling
2020-11-06 11:29:07 -08:00
Markus Thömmes 8c31b27dfb
Add nolint to false positive being flagged (#1897) 2020-11-05 09:58:08 -08:00
Stavros Kontopoulos c73d344c89
Add host config option to the prometheus exporter (#1882)
* add host to the prometheus exporter

* typo

* fix imports

* updates

* fixes

* more fixes

* typos

* respect the default

* fix comment

* use default

* nits
2020-11-04 11:38:04 -08:00
Markus Thömmes 565516e224
Add errorlint and fix all existing issues (#1855) 2020-10-29 01:14:35 -07:00
Markus Thömmes 03dd7b7c48
Skip flaky OpenCensus exporter test until fixed (#1870) 2020-10-28 04:58:41 -07:00
Victor Agababov c4ce2ffa6a
Remove deprecated methods now that downstream has been updated (#1847) 2020-10-26 13:02:42 -07:00
Markus Thömmes 22e4e0a702
Fix API stutter in metric option functions (#1837) 2020-10-23 09:37:37 -07:00
Victor Agababov 324e49bc7f
Some cleanups arounds the metrics code (#1834)
- use switch
- add new method that won't trigger lint, with a deprecation notice when deps are updated
- other minor things
2020-10-22 18:21:37 -07:00
Markus Thömmes 385c8b9c0e
Fix nolint warnings and adhere to best practices (#1823) 2020-10-20 09:33:59 -07:00
Scott Nichols fc447086b7
Remove re-definition of kubeconfig from pkg/test (#1820)
* pull flags from injection

* lint

* trim T interface, use flagset
2020-10-19 16:30:58 -07:00
Victor Agababov ee0539ddff
Get rid of the interface (#1817)
and other nits.
2020-10-19 10:58:58 -07:00
Markus Thömmes 95e9532f04
Wait for prometheus server to start serving before fetching metrics (#1819) 2020-10-19 04:42:58 -07:00
Josh Soref b39d5da935
Spelling (#1797)
* spelling: adopted

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: aliased

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: apierrs

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: assignment

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: available

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: coexistence

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: commit

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: conversions

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: creates

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: custom

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: determine

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: different

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: distribution

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: duplicate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: editing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: endpoint

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: environment

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: generate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: implementation

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: identified

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: ignore

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: indicates

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: interface

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: interleaved

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: labels

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: label

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: mimic

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: namespaced

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: necessary

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: organization

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: populatable

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: prometheus

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: refer

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: reference

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: repetitive

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: response

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: something

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: specable

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: spoofing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: synchronized

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: this

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: trailing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unsupported

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: validation

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* chore: reviewdog go header boilerplate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2020-10-18 14:22:57 -07:00
Dave Protasowski 1cc00f652a
drop the default log url template (#1804)
this had references to the monitoring bundle which is being removed
2020-10-15 15:16:56 -07:00
Julian Friedman 7c6171acf4
Add EnableProbeReqLogKey constant (#1806)
For consistency with existing EnableReqLogKey.
2020-10-14 10:28:30 -07:00
Scott Nichols 5a5f68637e
use k8s.interface (#1808)
* use k8s.interface

* start to remove test client

* don't use test/KubeClient
2020-10-14 09:51:31 -07:00
Victor Agababov e3b4e9c229
Step I: move memstats to metrics (#1799)
step II: update deps (serving and eventing)
step: III: remove from shared main

For https://github.com/knative/serving/issues/9787
2020-10-12 15:14:17 -07:00
Victor Agababov 7bad843466
Enable golint and exclude some other generated or additional dirs (#1783)
* Enable golint and exclude some other generated or additional dirs

Also remove `test` ignore, since it's covered by path ignore rule.

* meh

* fixes

* more

* progressing

* further

* like a boss
2020-10-07 14:58:20 -07:00
Victor Agababov 247841408e
Apply the cleanup to the pkg (#1776)
* Apply the cleanup to the pkg

This is probably the final iteration of my cleanup application.

* codegen

* one more try
2020-10-05 21:41:20 -07:00
Montgomery Carter 21cb070a8b
Introduce pkg/metrics allMeter cache (#1741)
We currently keep all metrics exporters created since start.
For a busy, long running server, this will be a problem.  Clean
these up when they get old so we don't dedicate memory to non-existent
2020-10-05 10:51:34 -07:00
Victor Agababov 1e373a9e5d
take 2 (#1755) 2020-09-29 14:10:29 -07:00
Victor Agababov a371418524
v2 (#1754) 2020-09-29 13:18:29 -07:00
Victor Agababov d86a08b1d8
Some more replacements to atomic.* types (#1747)
* Some more replacements to atomic.* types

* fix
2020-09-25 10:54:44 -07:00
Markus Thömmes 5fbbde31b3
Align linters with serving (enables stylecheck and asciicheck) (#1738) 2020-09-23 07:37:40 -07:00
Markus Thömmes 754da4653a
Enable unparam linter to catch unused parameters (#1731) 2020-09-22 09:13:40 -07:00
Markus Thömmes e4ecf702a3
Apply gosec checks to the codebase, except tests. (#1725)
* Apply gosec checks to the codebase, except tests.

* Fix YAML whitespace.

* Tune back file mode change and add a comment.
2020-09-22 08:55:40 -07:00
Ian Milligan 9128d4b9c1
Deep copy views to avoid races (#1720)
* Deep copy views to avoid races

* Use copy instead of append

* Update metrics/resource_view.go

Co-authored-by: Victor Agababov <vagababov@gmail.com>

* Update metrics/resource_view.go

Co-authored-by: Matt Moore <mattmoor@vmware.com>

Co-authored-by: Victor Agababov <vagababov@gmail.com>
Co-authored-by: Matt Moore <mattmoor@vmware.com>
2020-09-21 15:22:37 -07:00
Evan Anderson 8c2ebdb0e0
Speed up & deflake tests by disabling bundling (#1689)
* Speed up & deflake tests by disabling bundling

* Fix `go vet` and races detected

* Address @vagababov comments, add nil check
2020-09-18 16:34:45 -07:00
Victor Agababov ddf2cbe3c1
Various nits around the code (#1719)
* Various nits around the code

* stagger
2020-09-18 16:22:45 -07:00