Commit Graph

16 Commits

Author SHA1 Message Date
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
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
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
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
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
Julian Friedman 7c6171acf4
Add EnableProbeReqLogKey constant (#1806)
For consistency with existing EnableReqLogKey.
2020-10-14 10:28:30 -07:00
Victor Agababov 56fba14ba7
Use the constant in the unit tests that we already have (#1690)
and make it public so it can be used in serving as well.
2020-09-08 16:52:50 -07:00
Victor Agababov 1fe808911e
Fix the the request logging boolean toggle (#1648)
* Fix the the request logging boolean toggle

Since we have cut the 0.17, we can go for the proper toggle setup:

- if request logging is on — template must be present and the logging will be on
- if the request of logging is off — template can be present, but will not affect whether the request logs will be collected

* review

* 1 moer test
2020-08-24 17:50:48 -07:00
Victor Agababov 7aa8743aaa
Some minor test coverage improvements and code flow improvements (#1649)
This way it's shorter and easier to read and also cover those super-important functions with
unit tests, since why not? :)
2020-08-24 15:46:47 -07:00
jjzeng-seattle b5411f2221
Add collector address to be used by queue-proxy (#1635) 2020-08-19 13:23:14 -07:00
Stavros Kontopoulos 23ef76f986
Add field to observability config for enabling request logging (#1577)
* add field for enabling request logging

* fixes

* update logic

* add unit tests

* add comment
2020-08-05 09:19:28 -07:00
Victor Agababov fdb7691d92
Brush up the observability config (#1204)
- add proper defaulting
- cleanup test (was pretty shaggy with wrong variable names and such)
- raised coverage a bit
2020-04-07 16:50:00 -07:00
Nima Kaviani bb0f16f214 Add default metrics backend to observability config (#994) 2020-01-14 23:08:06 -08:00
Nima Kaviani 4deb5d83d2 move metrics config to pkg (#786)
the observability config is used in other packages including
the sample controller. This commit pulls observability config
into knative.dev/pkg similar to logging config for better reusability.
2019-11-13 06:52:28 -08:00