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

[Disk Manager] Add parent span for regular tasks, add parent span rotation for long-running regular tasks #2474

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gy2411
Copy link
Collaborator

@gy2411 gy2411 commented Nov 12, 2024

#1199

Now spans for regular are inconvenient. Tasks have no common parent. For example, if a regular tasks had several generations, each generation will create spans in separate trace.

In this pr we create common parent span for spans created by a regular task.

Also, we rotate the parent span if the task runs for long. This prevents from obtaining too large trace and from losing all spans due to trace expiration. This feature is useful for OptimizeBaseDisks task.

For example, assume that some task ran for 7 days, trace ttl is 5 days and parent rotation period is 3 days. And assume that we want to look at the traced of this task just after it's completion. Then the task will have three traces, the oldest one will be already expired, but we will be able to see the remaining two traces. Without rotation, we wouldn't be able to see anything.

We use tracestate field in task metadata to store the timestamp of the trace.

Note: parent span rotation will not happen if a task is runned for long with one and the same generation.

@gy2411 gy2411 added the large-tests Launch large tests for PR label Nov 12, 2024
"metadata",
persistence.BytesValue(common.MarshalStringMap(
newMetadata.Vals(),
)),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Хм, а неверное здесь надо также поле UpdatedAt обновить?

Copy link
Contributor

Note

This is an automated comment that will be appended during run.

🟢 linux-x86_64-relwithdebinfo: all tests PASSED for commit 5a9969f.

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
6296 6296 0 0 0 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
large-tests Launch large tests for PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant