-
Notifications
You must be signed in to change notification settings - Fork 536
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
Summarizer telemetry and cleanup [0.10] #327
Conversation
nice description! #Resolved |
// initialize values (not exact) | ||
this.lastSummarySeqNumber = this.runtime.deltaManager.referenceSequenceNumber; | ||
this.lastSummarySeqNumber = this.runtime.deltaManager.initialSequenceNumber; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lastSummarySeqNumber [](start = 13, length = 20)
Something to consider:
We could update it when we see summaryAck while processing ops (on the way to become connected), by asking protocol layer for latest ack sequence number
That way we do not need to make changes in DeltaManager.
And I think it will make it more correct when summarizer is run not on document load, but when another summarizer exits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, but it would be a little tedious to implement in the current state, since we'd need to get it from the summary op (not ack), meaning we'd need to pair up all summary ops to acks/nacks all the time, not just while pending. I think if we do this, we should add the reference sequence number to the summary ack op, and work to bypass listening for summary ops altogether, which would require a little more info in the summary ack op.
I think right now, we should only switch to this method if the initialSequenceNumber
in DeltaManager is not useful anywhere else. If it has potential to be useful, we might as well keep it there. If not, I'm all for keeping DeltaManager as simple as possible.
And for now, there is little difference between document load and another summarizer exiting, because summarizer clients spin up only when elected summarizer. Unless a summarizer happens to start before the previous one from another client is acked (fairly unlikely).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's useful as a concept. We just need to be aware that telemetry we are producing might be not very accurate.
It will likely create false positives (signal that we are not summarizing too often) and we will need to fix it to be able to see past it.
In reply to: 334381006 [](ancestors = 334381006)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Summary cleanup [0.10] (#244) * Add logger to SummaryManager; move ITreeEntry implementations to core-utils package * Cleanup SummaryManager * Fix tests * Export summaryTreeConverter * Rename properties on container sublogger * Do not try to submit summary op while disconnected [0.10] (#263) * Do not try to submit summary op while disconnected * Move comment to correct place * Add more checks for disconnected during generate summary * Prevent summarizer from pending timeout while still generating summary (#276) * Summarizer telemetry and cleanup (#327) * Add initialSequenceNumber to DeltaManager and use it for summarizer * Add message for summary reason * Add more wrapping performance events around both summarize and generateSummary * Add progress steps to generate summary perf event * Add timer for pending timeout and summarize timeout and prevent disconnect too early * Wait and fetch summaryConfiguration after we are connected * Fix unit tests * Small PR changes * Return early if disconnected before run and add telemetry event * Rename and do not wait for connected if stopped. * Only realize component if changed while summarizing (#328) * Only realize component if changed while summarizing * Elaborate on comments * Fix tslint
Several small fixes to improve telemetry around summaries.
initialSequenceNumber
to DeltaManager, which tracks the reference sequence number at the time that the protocol handler was set. This is useful to know what op we initially loaded from and is used by the summarizer as the initial value oflastSummarySequenceNumber
.generateSummary()
call in ContainerRuntime. This resembles the one in Summarizer, but has more information and stages. It reports progress after each step: "start", "loadedVersions", "generatedTree", "uploadedTree", and "end" (submitted op). It also includes thefullTree
argument in the start event, and the handle in the end.