[ 
https://issues.apache.org/jira/browse/BEAM-3545?focusedWorklogId=84524&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-84524
 ]

ASF GitHub Bot logged work on BEAM-3545:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Mar/18 20:04
            Start Date: 26/Mar/18 20:04
    Worklog Time Spent: 10m 
      Work Description: herohde commented on a change in pull request #4899: 
[BEAM-3545] Go SDK UserCounters
URL: https://github.com/apache/beam/pull/4899#discussion_r177162996
 
 

 ##########
 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:
   Could we make it match java instead?:
   
   
https://github.com/apache/beam/blob/597e3f92bc8be692d5d8e8040b33ce0c77350fa2/examples/java/src/main/java/org/apache/beam/examples/WordCount.java#L92
   
   Also, don't we want to use a global var for the metric?

----------------------------------------------------------------
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: 84524)
    Time Spent: 2h 50m  (was: 2h 40m)

> 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: 2h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to