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

Cosmos: Add diagnostic events with statistics #25431

Merged
merged 1 commit into from
Aug 5, 2021
Merged

Conversation

AndriySvyryd
Copy link
Member

Fixes #17298

@AndriySvyryd AndriySvyryd requested a review from a team August 5, 2021 04:46
ExecutingSqlQuery = CoreEventId.ProviderBaseId + 100,
ExecutingReadItem
ExecutingReadItem,
Copy link
Member

Choose a reason for hiding this comment

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

A bit weird that SqlQuery has only an Executing event, ReadItem has both Executing and Executed, and the others only Executed. Should have a Executing and Executed for all of them, or is there a good reason it's this way?

Copy link
Member Author

Choose a reason for hiding this comment

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

SqlQuery has both Executing and Executed. The difference is that ExecutedReadNext can be called multiple times per query if it was split up (paging).

ExecutingReadItem is there because it would be breaking to remove it, I don't think there's value in adding Executing for any of the other ones.

}
}

private static string ExecutedReadNext(EventDefinitionBase definition, EventData payload)
Copy link
Member

Choose a reason for hiding this comment

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

Can move this inside ExecutedReadNext above as a local method (other methods too)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but I'm sticking to the pattern. If we want to refactor this we should do it everywhere.

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.

Cosmos: Diagnostic events including statistics (query cost, activity id)
2 participants