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 information about shard/thread to the tracing #1716

Merged
merged 1 commit into from Jul 21, 2023

Conversation

sylwiaszunejko
Copy link
Contributor

@sylwiaszunejko sylwiaszunejko commented Jul 19, 2023

Previously there was no information about shards/threads in tracing. It could be problematic, if we want to test shard/thread related features.

This PR introduces adding information about shard/thread to the tracing. This information could be needed for testing shard awareness. Also it is more in line with cqlsh tracing.

In Cassandra single tracing event looks like that:

session_id                           | event_id                             | activity                                    | source    | source_elapsed | source_port | thread
-------------------------------------+--------------------------------------+---------------------------------------------+-----------+----------------+-------------+-----------------------------
568f2370-26ed-11ee-8120-57607de2775b | 5690aa10-26ed-11ee-8120-57607de2775b |        Parsing SELECT * FROM system.local ; | 127.0.0.1 |           7107 |        null | Native-Transport-Requests-1

where thead could be for example: Native-Transport-Requests-1, ReadStage-2.

Accordingly, in Scylla single tracing event looks like that:

session_id                           | event_id                             | activity                                  | scylla_parent_id | scylla_span_id  | source    | source_elapsed | thread
-------------------------------------+--------------------------------------+-------------------------------------------+------------------+-----------------+-----------+----------------+----------
7b9f82c0-2604-11ee-ad99-17a0af160bf8 | 7b9f9b56-2604-11ee-ad99-17a0af160bf8 |                       Parsing a statement |                0 | 147842476120455 | 127.0.0.2 |              1 |  shard 4

with thread in the form: shard x, where x is a number.

@sylwiaszunejko sylwiaszunejko changed the title Add information about shard to the tracing Add information about shard/thread to the tracing Jul 20, 2023
This information is needed for testing shard awareness.
Also it is more in line with cqlsh tracing.
@martin-sucha martin-sucha merged commit db6d556 into gocql:master Jul 21, 2023
16 checks passed
@martin-sucha
Copy link
Contributor

Looks good to me. Thank you!

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.

None yet

2 participants