-
Notifications
You must be signed in to change notification settings - Fork 600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use transformers efficiently for extracting info for metrics in Kafka Channel #5505
Conversation
/assign @slinkydeveloper |
@@ -304,6 +304,7 @@ func (f *FanoutMessageHandler) makeFanoutRequest(ctx context.Context, message bi | |||
sub.Reply, | |||
sub.DeadLetter, | |||
sub.RetryConfig, | |||
nil, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for this
Codecov Report
@@ Coverage Diff @@
## main #5505 +/- ##
=======================================
Coverage 82.74% 82.74%
=======================================
Files 198 198
Lines 6098 6098
=======================================
Hits 5046 5046
Misses 727 727
Partials 325 325
Continue to review full report at Codecov.
|
Can you add the rest of the implementation in this pr? |
Which part? I am planning to create a PR to update eventing-kafka after this. |
@skonto you pass the transformers in the signature, but you aren't using them, right? |
Oh yes missed that part will fix in a sec |
@slinkydeveloper Codegen issue is a known one? It is a git file permission issue hmm. |
Yeah it doesn't seem related to your PR, I'm experiencing it too |
Locally it seems ok. So it seems that codegen modifies git file permissions somehow. Following failures are unrelated:
|
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: skonto, slinkydeveloper 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:
Approvers can indicate their approval by writing |
… Channel (knative#5505) * use transformers for extracting event type for metrics * fix * fix
…ka (#1318) * make eventing metrics generic (knative#5478) * Expose dispatch result to be used by other implementations (knative#5481) * expose dispatch result to be used by other implementations * expose fields * add getters etc * less verbose * Use transformers efficiently for extracting info for metrics in Kafka Channel (knative#5505) * use transformers for extracting event type for metrics * fix * fix * pass transformers to executeRequest (knative#5512)
In knative-extensions/eventing-kafka#688 the Kafka message needs to be copied to in order to extract the event type (used for labeling metrics) with a transformer. Transformers can be used though in DispatchWithRetries via the execute method, so with this PR we can touch the msg only when we write it and get the info we need back efficiently.
Implementation example of this can be found here downstream.
/cc @matzew