[PECOBLR-1383] Add statement execution hooks for telemetry collection #321
+72
−39
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.
Summary
This stacked PR builds on #320 and adds statement execution hooks to complete end-to-end telemetry collection.
Stack: Part 3 of 3
Changes
Exported Methods for Driver Integration
telemetry/interceptor.goBeforeExecute()- starts metric tracking for a statementAfterExecute()- records metric with timing and error infoAddTag()- adds tags to current metric contextCompleteStatement()- marks statement complete and flushesStatement Execution Hooks
connection.go✅ Added hooks to
QueryContext():BeforeExecute()with statement ID from operation handle GUIDAfterExecute()andCompleteStatement()✅ Added hooks to
ExecContext():BeforeExecute()with statement IDAfterExecute()andCompleteStatement()Documentation
telemetry/DESIGN.mdIntegration Flow
Testing
All tests passing ✅
End-to-End Telemetry
With this PR, the telemetry system is fully functional end-to-end:
Related Issues
Checklist