Skip to content

STOR-4395 Improve span parenting for Hibernate events, add TODOs for other events#4947

Closed
fhanau wants to merge 1 commit into
mainfrom
felix/083025-STOR-4395
Closed

STOR-4395 Improve span parenting for Hibernate events, add TODOs for other events#4947
fhanau wants to merge 1 commit into
mainfrom
felix/083025-STOR-4395

Conversation

@fhanau

@fhanau fhanau commented Aug 31, 2025

Copy link
Copy Markdown
Contributor

For some customEvents, we did not create trace scopes so far. Note that this only affects the internal tracing system.

@fhanau

fhanau commented Sep 2, 2025

Copy link
Copy Markdown
Contributor Author

@jasnell @danlapid this PR attempts to address STOR-4395, but I don't understand the underlying issue well enough to know if this is the right approach in each case – see the TODO comments. Input on that will be useful, I'm also not sure if we'll need to do the same thing for Automated Tracing too – as is, the makeAsyncTraceScope() call only affects the internal tracing system.

@danlapid

danlapid commented Sep 3, 2025

Copy link
Copy Markdown
Collaborator

I actually don't like context.makeAsyncTraceScope.
Why do we need it now that we have context.attachSpans?

@fhanau

fhanau commented Sep 3, 2025

Copy link
Copy Markdown
Contributor Author

I actually don't like context.makeAsyncTraceScope. Why do we need it now that we have context.attachSpans?

As I understand, this is supposed to be used at the start of all worker events and only pertains to the internal tracing system (so far) – see the internal issue. It is not tied to any specific span. I think that the problem it's trying to address is distinct from the span lifetimes addressed by attachSpans?
I also opened this in part to discuss if we'd need this for user tracing – as I understand it can cause spans to be attributed to the wrong parent span?

Edit: If the span lifetimes are all correct and they end while the IoContext is still available, then it is impossible for them to be attributed to a different worker event.

@fhanau fhanau force-pushed the felix/083025-STOR-4395 branch from 32d42e2 to a056c43 Compare September 8, 2025 17:29
@fhanau fhanau changed the title STOR-4395 Improve span parenting for Hibernate JSRpc, TailStream events STOR-4395 Improve span parenting for Hibernate events, add TODOs for other events Sep 8, 2025
@fhanau fhanau marked this pull request as ready for review September 8, 2025 17:30
@fhanau fhanau requested review from a team as code owners September 8, 2025 17:30
@fhanau

fhanau commented Sep 8, 2025

Copy link
Copy Markdown
Contributor Author

Updated the PR to only fix this for Hibernate events, adding TODO(later) for things that were unclear to me. This only partially addresses the issue now, but should be wholly uncontroversial at least.

@fhanau fhanau requested review from danlapid and mar-cf September 9, 2025 17:29
…other events

For some customEvents, we did not create trace scopes so far. Note that this
only affects the internal tracing system.
@fhanau fhanau force-pushed the felix/083025-STOR-4395 branch from a056c43 to a92d307 Compare September 10, 2025 17:34
@fhanau

fhanau commented Sep 25, 2025

Copy link
Copy Markdown
Contributor Author

@jclee since you opened the issue for this – this PR is a partial fix for STOR-4395, adding TODOs for the cases that are non-trivial to support. Unfortunately I haven't been able to secure approval for this, lmk if this half-measure works for you if I should close it.

@fhanau fhanau closed this Sep 27, 2025
@fhanau fhanau deleted the felix/083025-STOR-4395 branch September 27, 2025 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants