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

Add more Jaeger spans to Worker constructor #114

Merged
merged 1 commit into from
Oct 17, 2022

Conversation

harrishancock
Copy link
Collaborator

Also, stop the globals_instantiation span before top_level_execution.

Also, stop the globals_instantiation span before top_level_execution.
@@ -1253,8 +1253,21 @@ Worker::Worker(kj::Own<const Script> scriptParam,
}
});

auto maybeMakeSpan = [&](auto operationName) -> MaybeSpan {
if (auto span = systemTracer.makeSpan(operationName)) {
span.setTag("truncated_script_id"_kj, truncateScriptId(script->getId()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess all the spans created this way would have a common truncated_script_id tag... not sure if there is a point at which it becomes more efficient to just have it present once in a parent span. But I suppose there is also a convenience factor in being able to search for spans by the truncated_string_id tag, too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intentional, precisely for the convenience you mention. In theory, it should be perfectly possible to perform some sort of graph query that expresses, "find me all sub-spans of a span with a particular value for truncated_script_id", or "find me the truncated_script_id value of the ancestor span of a particular span that I have identified", but in practice this is difficult to express, and slow to execute, with the tools we have.

@harrishancock harrishancock merged commit e730d79 into main Oct 17, 2022
@harrishancock harrishancock deleted the harris/add-worker-ctor-jaeger-spans branch October 17, 2022 20:16
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.

3 participants