Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Batch Tasklet Span named with operation "Chunk" #3508

Closed
jamesylgan opened this issue Jul 6, 2021 · 1 comment · Fixed by #3528
Closed

Spring Batch Tasklet Span named with operation "Chunk" #3508

jamesylgan opened this issue Jul 6, 2021 · 1 comment · Fixed by #3528
Assignees
Labels
bug Something isn't working

Comments

@jamesylgan
Copy link

Describe the bug
Naming:
When running a Tasklet, spans are named as Chunks

Steps to reproduce
Not possible to share - but this does appear while using a standard org.springframework.batch.core.step.tasklet.Tasklet

What did you expect to see?
BatchJob jobName.stepName.Tasklet

What did you see instead?
BatchJob jobName.stepName.Chunk

What version are you using?
v0.9.0

@jamesylgan jamesylgan added the bug Something isn't working label Jul 6, 2021
@mateuszrzeszutek
Copy link
Member

Hey @jamesylgan,
Spring Batch Tasklet is always executed in the context of a chunk (its execute() method even receives a ChunkContext as one of its parameters). If you configure a TaskletStep that only calls the passed Tasklet it'll still setup a chunk for the tasklet call, and it'll still execute all ChunkListeners that are set on the step (we use listeners to capture spring batch spans). In fact, when you set up a step processing items (ItemReader, ItemWriter, etc) Spring batch will use a ChunkOrientedTasklet which itself is a Tasklet to process those items in chunks.

trask pushed a commit that referenced this issue Dec 10, 2022
This is based on a conversation in [opentelemetry-go
#3508](open-telemetry/opentelemetry-go#3508) and
to be more consistent with [the js cgroupv2 parser
impl](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/f0a93685cfb43543b7ca577dd370d56576b49e3f/detectors/node/opentelemetry-resource-detector-container/src/detectors/ContainerDetector.ts#L68).

Unsurprisingly, podman does not include the word `docker` in the
`mountinfo` file. As a result, the container id parsing would fail from
inside a podman container. This fixes that up to be more compatible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants