Skip to content

Cosmos: Add diagnostic events with statistics#25431

Merged
AndriySvyryd merged 1 commit intomainfrom
Issue17298
Aug 5, 2021
Merged

Cosmos: Add diagnostic events with statistics#25431
AndriySvyryd merged 1 commit intomainfrom
Issue17298

Conversation

@AndriySvyryd
Copy link
Copy Markdown
Member

Fixes #17298

@AndriySvyryd AndriySvyryd requested a review from a team August 5, 2021 04:46
// Command events
ExecutingSqlQuery = CoreEventId.ProviderBaseId + 100,
ExecutingReadItem
ExecutingReadItem,
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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