apache / apache/beam

[Bug]: LogEntries for exceptions do not include the transform_id

Open
#26,678 4 comments 0 reactions 1 assignee Claimed by @rohdesamuel View on GitHub
bug P2 python
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

### What happened?

In normal operation the [StateSampler](https://github.com/apache/beam/blob/master/sdks/python/apache_beam/runners/worker/statesampler_slow.py#L108) keeps track of the currently executing step in a stack. When a log is emitted, it [looks](https://github.com/apache/beam/blob/master/sdks/python/apache_beam/runners/worker/log_handler.py#L147) at the [top](https://github.com/apache/beam/blob/master/sdks/python/apache_beam/runners/worker/statesampler_slow.py#L41) of the stack for the current step. However, during an exception, this exits the StateSampler scope and pops off the current step and either gets the incorrect step or does not have any step in the stack.

Potential fix would be to only pop the stack when there is no exception.

### Issue Priority

Priority: 2 (default / most bugs should be filed as P2)

### Issue Components

- [X] Component: Python SDK
- [ ] Component: Java SDK
- [ ] 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.