Commit Graph

201 Commits

Author SHA1 Message Date
Kenjiro Nakayama c11003ae6d
Use go sync/atomic instead of go.uber.org/atomic (#2777)
* wip

* tiny fix

* Fix controller/controller_test.go

* fix metrics.go

* Fix profiling/server.go

* Fix reconciler/testing

* update ./test/spoof/spoof_test.go

* Fix ./test/zipkin/util.go

* update go.uber.org/atomic
2023-08-02 16:26:48 +00:00
Izabela Gomes 53f04b373c
Make minimum TLS version configurable for webhooks (#2721)
* make minimum tls version configurable

* change default min TLS version to 1.3

* change opencensus tls min version to 1.3

* Update env var name

Co-authored-by: Dave Protasowski <dprotaso@gmail.com>

* use webhook options to configure min tls version

* add unit tests for webhook tlsMinVersion option

* Update webhook/env.go

Co-authored-by: Dave Protasowski <dprotaso@gmail.com>

* address feeback

---------

Co-authored-by: Dave Protasowski <dprotaso@gmail.com>
2023-04-14 15:45:51 +00:00
Stavros Kontopoulos 696cac83c1
Expose queue proxy request metrics reporting period (#2362)
* expose qp request metrics reporting period

* remove dead link

* add comments

* add default

* fix unit test

* add back the correct url

* use metrics.reporting-period as default

* don't return a pointer
2023-03-29 20:01:00 +00:00
kmahapatra 2f55fe00c5
Fix potential slowloris attack (#2682) 2023-02-15 23:47:51 +00:00
Dave Protasowski 8532ae0645
update OWNERS files to use teams with active members (#2672)
* update OWNERS files to use teams with active members

* add eventing-wg leads as approvers to /apis
2023-02-06 16:58:45 +00:00
Dave Protasowski 44d1d7d978
Go1.19 changes (#2631)
* run goimports

* ignore linter errors for now

* fix boilerplate
2022-11-03 22:34:05 +00:00
Jonathan Innis 6ce976ce92
Default observability config if nil (#2614) 2022-10-25 20:08:56 +00:00
Dave Protasowski ff956846a1
make METRICS_DOMAIN optional when backend is not OpenCensus (#2617) 2022-10-25 18:42:56 +00:00
Kenny Leung b812affa38
Support fetching observability from ctx. (#2610)
* add option to load observability config from ctx

Signed-off-by: Kenny Leung <kleung@chainguard.dev>

* comments and tests

Signed-off-by: Kenny Leung <kleung@chainguard.dev>

* undo

Signed-off-by: Kenny Leung <kleung@chainguard.dev>

* move observability setup logic into function to match logger

Signed-off-by: Kenny Leung <kleung@chainguard.dev>

* fix arg

Signed-off-by: Kenny Leung <kleung@chainguard.dev>

Signed-off-by: Kenny Leung <kleung@chainguard.dev>
2022-10-14 16:45:53 +00:00
Dave Protasowski 3d24b8416b
fix lint warnings (#2589)
* resolve deprecation warnings

* drop use of ioutil

* fix license

* run hack/update-codegen.sh
2022-09-12 18:15:45 +00:00
Paul Schweigert 5569169b0c
update boilerplate date (#2539)
Signed-off-by: Paul S. Schweigert <paulschw@us.ibm.com>
2022-06-30 22:25:31 +00:00
Antoine Cotten 18f6995887
Log metrics/logging init messages at debug level (#2522) 2022-05-25 15:30:05 +00:00
Pierangelo Di Pilato a850b9e047
Use t.Setenv instead of os.Setenv in tests (#2454)
Go 1.17 introduced a new handy API for setting env vars scoped for
a single test so we can avoid the hard to read set and reset env
loops.

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
2022-03-10 10:00:48 -08:00
Julian Friedman 787aec59e7
Remove unused recorder field (#2358) 2021-11-23 05:51:50 -08:00
knative-automation e61a20dd64
Update actions (#2313)
Signed-off-by: Knative Automation <automation@knative.team>
2021-10-15 12:26:13 -07:00
Markus Thömmes 2bd91f7557
Bump K8s dependencies to 1.21.4 (#2242)
* Bump apimachinery

* Update code-generator

* Update API and client, some progress

* Hack the generator to work at all

* Hack the PodDisruptionBudget extension to fulfill the interfaces

* Bump apiextensions as well

* Fix conflict

* Better condition

* Roll back unnecessary codegen change

* Fix PodDisruptionBudget extensions

* Panic on not-yet-implemented like others
2021-08-27 11:45:38 -07:00
Julian Friedman 50410e0b83
Use consistent case for "Deprecated" comments (#2216)
* Use consistent case for "Deprecated" comments

Not the most important thing ever, but the canonical string to use for
Deprecated warnings is case sensitive, and also it's nice to be
consistent.

* Add nolint comment
2021-08-17 09:15:16 -07:00
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