mirror of https://github.com/knative/caching.git
upgrade to latest dependencies (#395)
Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
parent
dfa63c15d1
commit
cc50055c16
2
go.mod
2
go.mod
|
@ -18,5 +18,5 @@ require (
|
||||||
k8s.io/code-generator v0.18.12
|
k8s.io/code-generator v0.18.12
|
||||||
k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29
|
k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29
|
||||||
knative.dev/hack v0.0.0-20201120192952-353db687ec5b
|
knative.dev/hack v0.0.0-20201120192952-353db687ec5b
|
||||||
knative.dev/pkg v0.0.0-20201123172958-fea72c1c8e2f
|
knative.dev/pkg v0.0.0-20201124204235-3154117dcfaf
|
||||||
)
|
)
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -1133,8 +1133,8 @@ k8s.io/utils v0.0.0-20200603063816-c1c6865ac451 h1:v8ud2Up6QK1lNOKFgiIVrZdMg7Mpm
|
||||||
k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||||
knative.dev/hack v0.0.0-20201120192952-353db687ec5b h1:Lc+AKgwhAZUD98mN++qTHeeaP6FRmS8fcwc/rXkP8G0=
|
knative.dev/hack v0.0.0-20201120192952-353db687ec5b h1:Lc+AKgwhAZUD98mN++qTHeeaP6FRmS8fcwc/rXkP8G0=
|
||||||
knative.dev/hack v0.0.0-20201120192952-353db687ec5b/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
|
knative.dev/hack v0.0.0-20201120192952-353db687ec5b/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
|
||||||
knative.dev/pkg v0.0.0-20201123172958-fea72c1c8e2f h1:zQEnqguiWwewcE2munQYL38S8VuV/hAuZCCk/6UMvhI=
|
knative.dev/pkg v0.0.0-20201124204235-3154117dcfaf h1:H5um6wZSd1Qmqqozr+/nHF2HyaMde6GNXM3+KbaYlJc=
|
||||||
knative.dev/pkg v0.0.0-20201123172958-fea72c1c8e2f/go.mod h1:wXZqP8MXCxb51yNFlecA13BwG7Hk370SWDFWV4dx4ug=
|
knative.dev/pkg v0.0.0-20201124204235-3154117dcfaf/go.mod h1:wXZqP8MXCxb51yNFlecA13BwG7Hk370SWDFWV4dx4ug=
|
||||||
pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
|
pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
|
||||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||||
|
|
|
@ -493,7 +493,7 @@ func (c *Impl) processNextWorkItem() bool {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
status = falseString
|
status = falseString
|
||||||
}
|
}
|
||||||
c.statsReporter.ReportReconcile(time.Since(startTime), status)
|
c.statsReporter.ReportReconcile(time.Since(startTime), status, key)
|
||||||
|
|
||||||
// We call Done here so the workqueue knows we have finished
|
// We call Done here so the workqueue knows we have finished
|
||||||
// processing this item. We also must remember to call Forget if
|
// processing this item. We also must remember to call Forget if
|
||||||
|
|
|
@ -25,10 +25,12 @@ import (
|
||||||
"go.opencensus.io/stats/view"
|
"go.opencensus.io/stats/view"
|
||||||
"go.opencensus.io/tag"
|
"go.opencensus.io/tag"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
"k8s.io/apimachinery/pkg/types"
|
||||||
"k8s.io/client-go/tools/cache"
|
"k8s.io/client-go/tools/cache"
|
||||||
kubemetrics "k8s.io/client-go/tools/metrics"
|
kubemetrics "k8s.io/client-go/tools/metrics"
|
||||||
"k8s.io/client-go/util/workqueue"
|
"k8s.io/client-go/util/workqueue"
|
||||||
"knative.dev/pkg/metrics"
|
"knative.dev/pkg/metrics"
|
||||||
|
"knative.dev/pkg/metrics/metricskey"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -47,6 +49,7 @@ var (
|
||||||
// - characters are printable US-ASCII
|
// - characters are printable US-ASCII
|
||||||
reconcilerTagKey = tag.MustNewKey("reconciler")
|
reconcilerTagKey = tag.MustNewKey("reconciler")
|
||||||
successTagKey = tag.MustNewKey("success")
|
successTagKey = tag.MustNewKey("success")
|
||||||
|
NamespaceTagKey = tag.MustNewKey(metricskey.LabelNamespaceName)
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -170,12 +173,12 @@ func init() {
|
||||||
Description: "Number of reconcile operations",
|
Description: "Number of reconcile operations",
|
||||||
Measure: reconcileCountStat,
|
Measure: reconcileCountStat,
|
||||||
Aggregation: view.Count(),
|
Aggregation: view.Count(),
|
||||||
TagKeys: []tag.Key{reconcilerTagKey, successTagKey},
|
TagKeys: []tag.Key{reconcilerTagKey, successTagKey, NamespaceTagKey},
|
||||||
}, {
|
}, {
|
||||||
Description: "Latency of reconcile operations",
|
Description: "Latency of reconcile operations",
|
||||||
Measure: reconcileLatencyStat,
|
Measure: reconcileLatencyStat,
|
||||||
Aggregation: reconcileDistribution,
|
Aggregation: reconcileDistribution,
|
||||||
TagKeys: []tag.Key{reconcilerTagKey, successTagKey},
|
TagKeys: []tag.Key{reconcilerTagKey, successTagKey, NamespaceTagKey},
|
||||||
}}
|
}}
|
||||||
views = append(views, wp.DefaultViews()...)
|
views = append(views, wp.DefaultViews()...)
|
||||||
views = append(views, rp.DefaultViews()...)
|
views = append(views, rp.DefaultViews()...)
|
||||||
|
@ -195,7 +198,7 @@ type StatsReporter interface {
|
||||||
ReportQueueDepth(v int64) error
|
ReportQueueDepth(v int64) error
|
||||||
|
|
||||||
// ReportReconcile reports the count and latency metrics for a reconcile operation
|
// ReportReconcile reports the count and latency metrics for a reconcile operation
|
||||||
ReportReconcile(duration time.Duration, success string) error
|
ReportReconcile(duration time.Duration, success string, key types.NamespacedName) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reporter holds cached metric objects to report metrics
|
// Reporter holds cached metric objects to report metrics
|
||||||
|
@ -237,11 +240,14 @@ func (r *reporter) ReportQueueDepth(v int64) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReportReconcile reports the count and latency metrics for a reconcile operation
|
// ReportReconcile reports the count and latency metrics for a reconcile operation
|
||||||
func (r *reporter) ReportReconcile(duration time.Duration, success string) error {
|
func (r *reporter) ReportReconcile(duration time.Duration, success string, key types.NamespacedName) error {
|
||||||
ctx, err := tag.New(
|
ctx, err := tag.New(
|
||||||
context.Background(),
|
context.Background(),
|
||||||
tag.Insert(reconcilerTagKey, r.reconciler),
|
tag.Insert(reconcilerTagKey, r.reconciler),
|
||||||
tag.Insert(successTagKey, success))
|
tag.Insert(successTagKey, success),
|
||||||
|
tag.Insert(NamespaceTagKey, key.Namespace),
|
||||||
|
)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -742,7 +742,7 @@ k8s.io/utils/trace
|
||||||
# knative.dev/hack v0.0.0-20201120192952-353db687ec5b
|
# knative.dev/hack v0.0.0-20201120192952-353db687ec5b
|
||||||
## explicit
|
## explicit
|
||||||
knative.dev/hack
|
knative.dev/hack
|
||||||
# knative.dev/pkg v0.0.0-20201123172958-fea72c1c8e2f
|
# knative.dev/pkg v0.0.0-20201124204235-3154117dcfaf
|
||||||
## explicit
|
## explicit
|
||||||
knative.dev/pkg/apis
|
knative.dev/pkg/apis
|
||||||
knative.dev/pkg/apis/duck
|
knative.dev/pkg/apis/duck
|
||||||
|
|
Loading…
Reference in New Issue