You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/04/08 03:50:18 UTC
[GitHub] [skywalking-satellite] mrproliu opened a new pull request, #108: Fix Metadata lost in the Native Meter protocol
mrproliu opened a new pull request, #108:
URL: https://github.com/apache/skywalking-satellite/pull/108
Package the data when receiving streaming meter data, and use `collectBatch` to send them.
Ignore the old transform data(if using the `mmap` queue), and log it to ignore them.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-satellite] mrproliu commented on a diff in pull request #108: Fix Metadata lost in the Native Meter protocol
Posted by GitBox <gi...@apache.org>.
mrproliu commented on code in PR #108:
URL: https://github.com/apache/skywalking-satellite/pull/108#discussion_r845719929
##########
plugins/forwarder/grpc/nativemeter/forwarder.go:
##########
@@ -98,22 +98,28 @@ func (f *Forwarder) Forward(batch event.BatchEvents) error {
}
}
}()
+ oldTransformDataCount := 0
for _, e := range batch {
- if data, ok := e.GetData().(*v1.SniffData_Meter); ok {
- if err := f.handleMeter(data, streamMap); err != nil {
- return err
- }
- }
- if data, ok := e.GetData().(*v1.SniffData_MeterCollection); ok {
+ switch data := e.GetData().(type) {
+ case *v1.SniffData_MeterCollection:
if err := f.handleMeterCollection(data, streamMap); err != nil {
return err
}
+ case *v1.SniffData_Meter:
+ oldTransformDataCount++
Review Comment:
updated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-satellite] wu-sheng commented on a diff in pull request #108: Fix Metadata lost in the Native Meter protocol
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on code in PR #108:
URL: https://github.com/apache/skywalking-satellite/pull/108#discussion_r845719251
##########
plugins/forwarder/grpc/nativemeter/forwarder.go:
##########
@@ -98,22 +98,28 @@ func (f *Forwarder) Forward(batch event.BatchEvents) error {
}
}
}()
+ oldTransformDataCount := 0
for _, e := range batch {
- if data, ok := e.GetData().(*v1.SniffData_Meter); ok {
- if err := f.handleMeter(data, streamMap); err != nil {
- return err
- }
- }
- if data, ok := e.GetData().(*v1.SniffData_MeterCollection); ok {
+ switch data := e.GetData().(type) {
+ case *v1.SniffData_MeterCollection:
if err := f.handleMeterCollection(data, streamMap); err != nil {
return err
}
+ case *v1.SniffData_Meter:
+ oldTransformDataCount++
Review Comment:
As we have moved to `MeterCollection`, let's ignore meter(s) in queue(mmap) directly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking-satellite] wu-sheng merged pull request #108: Fix Metadata lost in the Native Meter protocol
Posted by GitBox <gi...@apache.org>.
wu-sheng merged PR #108:
URL: https://github.com/apache/skywalking-satellite/pull/108
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org