Skip to content

Commit

Permalink
Fix the sample code in Metrics for Pulsar Functions document (apache#…
Browse files Browse the repository at this point in the history
  • Loading branch information
yumochiz authored and nkurihar committed Jul 31, 2018
1 parent d0350fc commit 5ebd4f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion site/docs/latest/functions/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import org.apache.pulsar.functions.api.Function;

public class MetricRecordingFunction implements Function<String, Void> {
@Override
public void apply(String input, Context context) {
public Void process(String input, Context context) {
context.recordMetric("number-of-characters", input.length());
return null;
}
Expand Down

0 comments on commit 5ebd4f5

Please sign in to comment.