-
Notifications
You must be signed in to change notification settings - Fork 901
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementing Tracing Functionality in Flow Execution (#1895)
# Description This PR introduces tracing functionality in the flow execution process. The primary change involves wrapping the original `_exec` function with a new function, `_exec_with_trace`, which starts a new span, enriches it with input and output data, and sets the span status. This enhancement allows us to organize child spans into a flow-level trace, providing a more comprehensive view of flow execution. Key changes include: - New Function - `_exec_with_trace`: This function is similar to `_exec`, but includes additional tracing functionality. It starts a new span, enriches it with input and output data, and sets the span status. - Exception Handling: Exceptions are handled within the context of the new function. In the event of an exception, the span status is set to `StatusCode.ERROR`, and the exception is raised. - Span Enrichment: The new function enriches the span with input and output data, providing a more detailed view of the flow execution process. - Status Setting: The span status is set based on the execution of the function. If the function executes successfully, the status is set to `StatusCode.OK`. If an exception occurs, the status is set to `StatusCode.ERROR`. This enhancement will improve our ability to track and monitor the flow execution process, aiding in debugging and performance optimization efforts. # All Promptflow Contribution checklist: - [ ] **The pull request does not introduce [breaking changes].** - [ ] **CHANGELOG is updated for new features, bug fixes or other significant changes.** - [ ] **I have read the [contribution guidelines](../CONTRIBUTING.md).** - [ ] **Create an issue and link to the pull request to get dedicated review from promptflow team. Learn more: [suggested workflow](../CONTRIBUTING.md#suggested-workflow).** ## General Guidelines and Best Practices - [ ] Title of the pull request is clear and informative. - [ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, [see this page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md). ### Testing Guidelines - [ ] Pull request includes test coverage for the included changes.
- Loading branch information
1 parent
772bb0c
commit 0222279
Showing
3 changed files
with
84 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters