Better telemetry through metadata #103
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

What does this PR do?
This PR adds some metadata to the model that can be useful for telemetry. Currently, telemetry reports the number of unmodeled syntax objects and the number of errors in a query model. A more qualitative approach would allow us to make better inferences from the telemetric data. For example, it is more useful to know that a query has unmodeled syntax because of the presences of a semi-join than simply that it has 1 instance of unmodeled syntax.
This PR classifies unmodeled syntax objects with a
reasonproperty that accounts for why that particular model object is unmodeled. It also adds agrammarRuleproperty toModelErrorwhich shows which grammar rule the error takes place in. Combined with the type of error ('UNKNOWN', 'INCOMPLETEFROM', etc), this tells us much more about an error than simply that there is one.The changes in telemetry that these changes to the model can support are illustrated in the following examples.
Quantitative telemetry (current):
Qualitative telemetry:
What issues does this PR fix or reference?
@W-8547957@