[
https://issues.apache.org/jira/browse/BEAM-11217?focusedWorklogId=679363&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-679363
]
ASF GitHub Bot logged work on BEAM-11217:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 09/Nov/21 22:25
Start Date: 09/Nov/21 22:25
Worklog Time Spent: 10m
Work Description: lostluck commented on a change in pull request #15923:
URL: https://github.com/apache/beam/pull/15923#discussion_r746093050
##########
File path: sdks/go/pkg/beam/core/runtime/metricsx/metricsx.go
##########
@@ -150,7 +183,15 @@ func extractGaugeValue(reader *bytes.Reader)
(metrics.GaugeValue, error) {
}
func newLabels(miLabels map[string]string) *metrics.Labels {
- labels := metrics.UserLabels(miLabels["PTRANSFORM"],
miLabels["NAMESPACE"], miLabels["NAME"])
+ labels := metrics.Labels{}
+ if miLabels["PTRANSFORM"] != "" {
+ labels = metrics.UserLabels(miLabels["PTRANSFORM"],
miLabels["NAMESPACE"], miLabels["NAME"])
+ return &labels
+ }
+ if miLabels["PCOLLECTION"] != "" {
+ labels = metrics.PCollectionLabels(miLabels["PCOLLECTION"])
+ return &labels
+ }
return &labels
Review comment:
```suggestion
if miLabels["PTRANSFORM"] != "" {
labels := metrics.UserLabels(miLabels["PTRANSFORM"],
miLabels["NAMESPACE"], miLabels["NAME"])
return &labels
}
if miLabels["PCOLLECTION"] != "" {
labels := metrics.PCollectionLabels(miLabels["PCOLLECTION"])
return &labels
}
return &metrics.Labels{}
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 679363)
Time Spent: 14h 50m (was: 14h 40m)
> Implement metrics filtering
> ---------------------------
>
> Key: BEAM-11217
> URL: https://issues.apache.org/jira/browse/BEAM-11217
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-go
> Reporter: Kamil Wasilewski
> Assignee: Ritesh Ghorse
> Priority: P3
> Time Spent: 14h 50m
> Remaining Estimate: 0h
>
> `metrics.Results` misses a method for querying metrics using a provided
> filter. The method should take a filter object as an argument and return
> `metrics.QueryResults` object containing metrics that matched the filter.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)