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

feat: traces block height and timestamp for InfluxDB #1062

Merged
merged 9 commits into from
Aug 17, 2023

Conversation

staheri14
Copy link
Contributor

@staheri14 staheri14 commented Aug 16, 2023

Description

To accurately gauge block time, it's essential to track the timestamps of committed blocks. The modifications made in this PR incorporate this feature.

Incremental work toward #1056

@staheri14 staheri14 self-assigned this Aug 16, 2023
@staheri14 staheri14 marked this pull request as draft August 16, 2023 20:57
@staheri14 staheri14 changed the base branch from main to v0.34.x-celestia August 16, 2023 21:13
@staheri14 staheri14 marked this pull request as ready for review August 17, 2023 00:52
evan-forbes
evan-forbes previously approved these changes Aug 17, 2023
Copy link
Member

@evan-forbes evan-forbes left a comment

Choose a reason for hiding this comment

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

also a note for other reviewers, part of the reasoning for adding this here was to so that we have the option to query from a single source

we could query this data directly using rpc or get aggregated data using the existing metrics (assuming we query prometheus directly), but now we could use influx with the rest of the trace data

// following schema:
//
// | time | height | timestamp |
BlockTable = "consensus_block"
Copy link
Member

Choose a reason for hiding this comment

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

perhaps?

Suggested change
BlockTable = "consensus_block"
BlockTable = "consensus_block_time"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 1d29ac2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason I initially avoided the _time suffix was that we may actually want to trace further attributes for each block. Nevertheless, I incorporated your suggestion!

Copy link
Member

Choose a reason for hiding this comment

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

we may actually want to trace further attributes for each block.

exactly, this was actually the same reason I think we should change it. If we want further metrics, then we will use a new table, but the name "consensus_block" is already used by the block time

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we may actually want to trace further attributes for each block.

exactly, this was actually the same reason I think we should change it. If we want further metrics, then we will use a new table, but the name "consensus_block" is already used by the block time

So, does this mean that for each additional metric associated with the block, a new table will need to be created? For instance, if we intend to store the DataHash of the block header, would it be necessary to establish another table with a |time|height|data_hash| schema? Not that it is a big issue, but there seems to be potential redundancy, such as the block height being recorded in multiple tables.

Copy link
Member

Choose a reason for hiding this comment

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

ahhh I see okay that makes sense

Copy link
Member

Choose a reason for hiding this comment

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

I'll defer to you on if we want to change it back. We can also change it when/if we add more things to this table.

@staheri14 staheri14 changed the title feat: adds consensus_block table and traces block height and timestamp feat: traces block height and timestamp for InfluxDB Aug 17, 2023
@staheri14 staheri14 merged commit 76145bc into v0.34.x-celestia Aug 17, 2023
18 checks passed
@staheri14 staheri14 deleted the sanaz/log-block-time-influx branch August 17, 2023 20:05
evan-forbes added a commit that referenced this pull request Aug 22, 2023
## Description

adds more things to the block table, see
#1062 (comment)
for further context.

part of #1056

---------

Co-authored-by: Sanaz Taheri <35961250+staheri14@users.noreply.github.com>
staheri14 added a commit that referenced this pull request Nov 21, 2023
## Description

To accurately gauge block time, it's essential to track the timestamps
of committed blocks. The modifications made in this PR incorporate this
feature.

Incremental work toward
#1056
staheri14 added a commit that referenced this pull request Nov 21, 2023
## Description

adds more things to the block table, see
#1062 (comment)
for further context.

part of #1056

---------

Co-authored-by: Sanaz Taheri <35961250+staheri14@users.noreply.github.com>
@faddat faddat mentioned this pull request Feb 22, 2024
3 tasks
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