-
Notifications
You must be signed in to change notification settings - Fork 311
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
fix(reporting): gateway events are not reported when source is connected to no destination(or device mode destination) #1822
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1822 +/- ##
==========================================
- Coverage 24.24% 24.21% -0.03%
==========================================
Files 122 122
Lines 24236 24294 +58
==========================================
+ Hits 5876 5884 +8
- Misses 18010 18059 +49
- Partials 350 351 +1
Continue to review full report at Codecov.
|
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.
Still many questions will go through the changes together
if countMetadataMap != nil { | ||
if _, ok := countMetadataMap[countKey]; !ok { | ||
countMetadataMap[countKey] = MetricMetadata{sourceID: event.Metadata.SourceID, destinationID: event.Metadata.DestinationID, sourceBatchID: event.Metadata.SourceBatchID, sourceTaskID: event.Metadata.SourceTaskID, sourceTaskRunID: event.Metadata.SourceTaskRunID, sourceJobID: event.Metadata.SourceJobID, sourceJobRunID: event.Metadata.SourceJobRunID, sourceDefinitionID: event.Metadata.SourceDefinitionID, destinationDefinitionID: event.Metadata.DestinationDefinitionID, sourceCategory: event.Metadata.SourceCategory} | ||
countMetadataMap[countKey] = MetricMetadata{ |
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.
👍
@@ -879,21 +879,59 @@ func (proc *HandleT) updateMetricMaps(countMetadataMap map[string]MetricMetadata | |||
var eventType string | |||
eventName = event.Metadata.EventName | |||
eventType = event.Metadata.EventType | |||
countKey := strings.Join([]string{event.Metadata.SourceID, event.Metadata.DestinationID, event.Metadata.SourceBatchID, eventName, eventType}, METRICKEYDELIMITER) | |||
|
|||
countKey := strings.Join([]string{ |
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.
👍
sourceForSingularEvent, | ||
) | ||
|
||
//REPORTING - GATEWAY metrics - START |
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.
The current implementation of capturing reporting metrics seems to be convoluted. The least I can say is that it is hard to follow, since as it appears many things need to happen at different stages of this method, without a clear purpose.
I will invest some time to study the current implementation in hope of forming a cleaner picture for the specific domain, otherwise I cannot be of any more use with regards to reviewing this PR.
Co-authored-by: Aris Tzoumas <atzoumas@rudderstack.com>
2652bd6
to
8eca515
Compare
Please update the pull request's title according to our new policy |
Is there an example I can see? From the article: Suggestions/corrections welcome. |
This should be enough (I used the title from the notion ticket, but feel free to change it if there is something more appropriate):
In the title you are free to use language that humans can understand (with spaces) 😊 |
Understood now.
|
Description of the change
Example scenarios:
Notion Link
Type of change
Checklist:
Security