Commit Graph

12 Commits

Author SHA1 Message Date
Ignacio Cano c56cedc7e7 Serializing/Deserializing Logging and Metrics configs (#656)
* source stats reporter... should be used by well-behaved sources

* public fields

* moving serialization/deserialization of metrics and logging maps to pkg

* nits

* adding UT

* same order

* updates

* sock-puppet

* unregistration problem?

* removing base64 encoding

* removing TODO

* comments after review

* removing the other constants
2019-09-10 12:36:29 -07:00
Ignacio Cano ec2f20ae67 Eventing Stackdriver integration (#612)
* adding eventing metrics, and tried to split separable things to ease
future refactors.

* updates

* updates after code review
2019-08-30 09:13:49 -07:00
Matt Moore 222dd25986 Migrate pkg to use the knative.dev/pkg import path (#489)
* Manual changes.

* scripted changes.
2019-06-26 13:02:06 -07:00
Matt Moore 35a6f90d16 Sprinkle more ClearAll around to enabled -count=N (#485) 2019-06-23 19:24:02 -07:00
Yanwei Guo 5323eaf18b Expose UpdateExporter function to accept map as parameter (#347)
* expose func

* use different metric name

* remove stackdriver change

* change comment

* return err
2019-03-29 16:38:54 -07:00
Yanwei Guo b4a3bde045 Decide whether to record metrics according to current metrics config (#292)
* split and update

* bug fixed

* change the copyright year

* use fake metadata in tests

* exclude test coverage for gcp_metadata

* add record

* add tests

* revert 2019 and add a new var

* change documents

* address comment

* change line
2019-03-07 10:26:42 -08:00
Yanwei Guo 1aca435944 Read metrics backend from environment variable (#218)
* add env to set backend

* join two lines
2019-01-10 11:03:42 -08:00
Yanwei Guo 08febf8f13 Change Stackdriver resource type for metrics (#210)
* change resource type

* copied PR #188

* add unit tests

* change Fatal back to Error

* solve comments

* change to use map

* modify tests
2019-01-08 13:14:42 -08:00
jonjohnsonjr a8c40a9e3b Default metrics.backend-destination to Prometheus (#213)
Fixes #212
2019-01-08 09:54:43 -08:00
Mustafa Demirhan 53b1235c2a Use different reporting periods based on the metrics backend (#182)
* Use different reporting periods based on the metrics backend. Original implementation was setting this value to 1 min to accommodate the minimum allowed value for stackdriver, but that is a sub optimal behavior for Prometheus. The change also allows operator to override the default values.

* Fix the units of reconciler latency from nano seconds to milliseconds.

* Address PR comments.

* Add better logging for reconciliation.

* Remove unnecessary lock in the UT.

* Address PR comments.
2018-12-04 15:16:25 -08:00
akyyy 02b354e3a4 Relax the requirement for stackdriver project id for metrics exporter. (#147)
* fix flaky test

* relax the requirement for stackdriver project id

* improve log

* add comment for stackdriverProjectIDKey not provided case

* minor format

* simplify the map access
2018-10-30 16:20:34 -07:00
akyyy 10ceeb6163 Add stackdriver exporter support in pkg. (#126)
* update dep golang.org/x/net

* Add stackdriver exporter support in pkg

* fix race and tests

* Use thread safe newMetricsExporter in tests

* address cr comments

* minor fix

* checkpoint

* Address cr comments

* add test for UpdateExporterFromConfigMap

* Move lock position

* add a test case for stackdriver error check

* minor change

* removing one test case since it seems app default creds exists for presubmit tests

* replace promSrvChan with promSrv as cr suggsted

* use a local var server for ListenAndServe

* add getter and setter for shared variables

* add func isMetricsConfigChanged and test

* address cr comments

* Update opencensus-go-exporter-stackdriver to v0.7.0

* Revert "Update opencensus-go-exporter-stackdriver to v0.7.0"

This reverts commit 9825f641f8.

* run update-deps.sh

* merge conflict

* run update-deps.sh

* Update Gopkg.toml so it doesn't have stackdriver exporter

* remove regex for metrics domain at pkg repo per cr comments

* merge conflict
2018-10-24 15:23:31 -07:00