Add telemetry to E-Document AI Tools early exits #6521
Draft
+25
−6
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.
Multiple early exit paths across the E-Document AI tools silently return without any telemetry, providing zero visibility into why AI matching produces no results for users.
E-Doc. AI Tool Processor: AddedSession.LogMessagewithVerbosity::Warningat both early exit paths inSetup(capability not registered, capability not active). MovedAISystem := EDocAISystemassignment before capability checks so the feature name is available for telemetry context.E-Doc. GL Account Matching: Added telemetry when no G/L Accounts exist in the system (GLAccount.IsEmpty()), which causes the tool to skip AI matching entirely.E-Doc. Deferral Matching: Added telemetry when no Deferral Templates exist in the system (DeferralTemplate.IsEmpty()), which causes the tool to skip AI matching entirely.E-Doc. Historical Matching: Added telemetry inPrepareHistoricalDatawhen no E-Document Purchase Lines are found and when no potential historical matches are collected after data collection.All telemetry tags left as
''per convention (filled by automated script). All use the existingSession.LogMessagepattern withVerbosity::Warning.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.