[
https://issues.apache.org/jira/browse/BEAM-3545?focusedWorklogId=84650&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-84650
]
ASF GitHub Bot logged work on BEAM-3545:
----------------------------------------
Author: ASF GitHub Bot
Created on: 27/Mar/18 01:16
Start Date: 27/Mar/18 01:16
Worklog Time Spent: 10m
Work Description: lostluck commented on a change in pull request #4899:
[BEAM-3545] Go SDK UserCounters
URL: https://github.com/apache/beam/pull/4899#discussion_r177281109
##########
File path: sdks/go/examples/wordcount/wordcount.go
##########
@@ -104,9 +104,11 @@ var (
var wordRE = regexp.MustCompile(`[a-zA-Z]+('[a-z])?`)
// extractFn is a DoFn that emits the words in a given line.
-func extractFn(line string, emit func(string)) {
+func extractFn(ctx context.Context, line string, emit func(string)) {
+ c := beam.GetCounter("extract", "count")
Review comment:
Done. I'm going to defer updating the other examples to match java to
another PR to avoid too much churn.
As a rule we do want to declare metrics globally. It was to
demonstrate/sanity check that local definitions with the same namespace.name
are "the same" counter. This is now handled in the declareAnywhere example.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 84650)
Time Spent: 7h (was: 6h 50m)
> Fn API metrics in Go SDK harness
> --------------------------------
>
> Key: BEAM-3545
> URL: https://issues.apache.org/jira/browse/BEAM-3545
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-go
> Reporter: Kenneth Knowles
> Assignee: Robert Burke
> Priority: Major
> Labels: portability
> Time Spent: 7h
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)