Skip to content

Can't find "broker_filter_event_latencies" in prometheus #1753

@capri-xiyue

Description

@capri-xiyue

Describe the bug

Can't find metrics "broker_filter_event_latencies" in prometheus("event_latencies" in pkg/broker/filter/stats_reporter.go)

I found it's because we only suppor *string in the ExtensionAs() of eventcontext.

Here is the error log messgage: event extension is map[knativearrivaltime:2019-08-28T18:43:22.986315189Z knativehistory:default-kn2-trigger-kn-channel.default.svc.cluster.local]
extError is unkown extension type *time.Time{"level":"debug","ts":"2019-08-28T18:43:24.986Z","logger":"provisioner","caller":"filter/filter_handler.go:176","msg":"Received message","commit":"96d090e","triggerRef":"default/testevents-trigger"}.

Expected behavior

Be able to see "broker_filter_event_latencies" metrics in prometheus

To Reproduce

Need to add some logs when we try to get arrival time in pkg/broker/filter/filter_handler.go(event.ExtensionAs(broker.EventArrivalTime, &arrivalTime)

Knative release version

Additional context
Add any other context about the problem here such as proposed priority

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions