apache / apache/beam

[Bug][Go]: Metrics incremented in Setup methods are not recalled.

Open
#27,038 18 comments 0 reactions 0 assignees View on GitHub
bug go good first issue P3
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

### What happened?

Because the ParDo [Setup context is uncached](https://github.com/apache/beam/blob/833261f0a041e04ca4dcb8719424fda09edcc5e6/sdks/go/pkg/beam/core/runtime/exec/pardo.go#L104) metrics initialized in Setup are lost, which is unexpected. Work done in setup, while logically outside of a bundle, will be under the context of the first bundle to execute that transform.

So there needs to be a way to transfer/extract the metrics from the Setup context so they are recorded back to the runner.

### Issue Priority

Priority: 3 (minor)

### Issue Components

- [ ] Component: Python SDK
- [ ] Component: Java SDK
- [X] Component: Go SDK
- [ ] Component: Typescript SDK
- [ ] Component: IO connector
- [ ] Component: Beam examples
- [ ] Component: Beam playground
- [ ] Component: Beam katas
- [ ] Component: Website
- [ ] Component: Spark Runner
- [ ] Component: Flink Runner
- [ ] Component: Samza Runner
- [ ] Component: Twister2 Runner
- [ ] Component: Hazelcast Jet Runner
- [ ] Component: Google Cloud Dataflow Runner

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.