knative / serving-operator

DEPRECATED: Development continues in https://github.com/knative/operator/
Apache License 2.0
39 stars 45 forks source link

Add metrics about KnativeServing CR edits #233

Closed jihuin closed 4 years ago

jihuin commented 4 years ago

Proposed Changes

Serving operator can emit metrics on KnativeServing CR edits, including creation, modification and deletion.

Steps to test metrics with Prometheus exporter (default):

  1. Forward the local port 9090 to the port 9090 on operator pod by running kubectl port-forward ${{operator_pod_name}} 9090
  2. Check the metrics by visiting localhost:9090/metrics

Release Note

NONE
jihuin commented 4 years ago

/assign @trshafer @anniefu @garron

knative-metrics-robot commented 4 years ago

The following is the coverage report on the affected files. Say /test pull-knative-serving-operator-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/reconciler.go 100.0% 94.4% -5.6
pkg/reconciler/stats_reporter.go Do not exist 75.0%
anniefu commented 4 years ago

Could you test with stackdriver by setting these in config-observability?

    metrics.backend-destination: stackdriver
    metrics.request-metrics-backend-destination: stackdriver
    metrics.allow-stackdriver-custom-metrics: "true"

Otherwise, /lgtm

jihuin commented 4 years ago

@anniefu Tested with prometheus and stackdriver, and both worked as expected.

trshafer commented 4 years ago

/lgtm /approve

knative-prow-robot commented 4 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jihuin, trshafer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/knative/serving-operator/blob/master/OWNERS)~~ [trshafer] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment