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

store: Disable collecting write metrics for synced deployments #4489

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

lutter
Copy link
Collaborator

@lutter lutter commented Mar 22, 2023

It's been a long-standing annoyance that the metrics for writing keep getting updated for synced subgraphs.

@leoyvens
Copy link
Collaborator

I think deployment_synced is only called once though, so if the graph node is restarted it won't be called again and the stopwatch will re-enable.

@lutter
Copy link
Collaborator Author

lutter commented Mar 23, 2023

I think deployment_synced is only called once though, so if the graph node is restarted it won't be called again and the stopwatch will re-enable.

It looks to me like deployment_synced is called once every time graph-node starts: that call is here and self.state.synced is initialized to false here There are no other assignments to it.

@leoyvens
Copy link
Collaborator

Ah right, I assumed that was initialized from the DB.

Copy link
Collaborator

@leoyvens leoyvens left a comment

Choose a reason for hiding this comment

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

Nice!

@lutter lutter force-pushed the lutter/write-metrics branch from b6935f5 to 07cfe79 Compare March 23, 2023 18:51
@lutter lutter merged commit 07cfe79 into master Mar 23, 2023
@lutter lutter deleted the lutter/write-metrics branch March 23, 2023 18:51
@brianluong
Copy link

brianluong commented Jul 26, 2023

Hey team!

I'm still seeing deployment_sync_sec metrics emitted for subgraphs that are already synced only when the indexer starts up.

For example:
image

Seen on v0.31.0.

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