-
Notifications
You must be signed in to change notification settings - Fork 918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SDK] Add workspace info in CLI telemetry #1349
Merged
Merged
Conversation
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
Stephen1993
previously approved these changes
Dec 1, 2023
wangchao1230
reviewed
Dec 1, 2023
wangchao1230
approved these changes
Dec 1, 2023
elliotzh
approved these changes
Dec 1, 2023
elliotzh
pushed a commit
that referenced
this pull request
Dec 1, 2023
This pull request includes changes related to adding telemetry logging with custom dimensions for workspace information in the PromptFlow Azure CLI. The most important changes include adding a new function `_get_workspace_info(args)` and modifying the `entry` function in `_pf_azure/entry.py` to support telemetry logging, as well as adding an import statement for the `contextlib` module and a new test method `test_cli_telemetry` in `test_cli_with_azure.py` to verify the correctness of telemetry logging. Main changes: * <a href="diffhunk://#diff-3f1dd7459115086f5d3af3d298744079416aebf0a0a99d19883591e7e053cf19R91-R102">`src/promptflow/promptflow/_cli/_pf_azure/entry.py`</a>: Added a new function `_get_workspace_info(args)` and modified the `entry` function to support telemetry logging with custom dimensions related to the workspace information. <a href="diffhunk://#diff-3f1dd7459115086f5d3af3d298744079416aebf0a0a99d19883591e7e053cf19R91-R102">[1]</a> <a href="diffhunk://#diff-3f1dd7459115086f5d3af3d298744079416aebf0a0a99d19883591e7e053cf19L99-R117">[2]</a> * <a href="diffhunk://#diff-d5a4a429f9ab76787a5800c3c679ac45e94ca9b5193e3f726ab9d528397ee339L4-R11">`src/promptflow/tests/sdk_cli_azure_test/e2etests/test_cli_with_azure.py`</a>: Added an import statement for the `contextlib` module and a new test method `test_cli_telemetry` to verify that telemetry logging with workspace information is working correctly. <a href="diffhunk://#diff-d5a4a429f9ab76787a5800c3c679ac45e94ca9b5193e3f726ab9d528397ee339L4-R11">[1]</a> <a href="diffhunk://#diff-d5a4a429f9ab76787a5800c3c679ac45e94ca9b5193e3f726ab9d528397ee339R172-R196">[2]</a># Description Please add an informative description that covers that changes made by the pull request and link all relevant issues. # 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. (cherry picked from commit 20cfed8)
elliotzh
pushed a commit
that referenced
this pull request
Dec 1, 2023
This pull request includes changes related to adding telemetry logging with custom dimensions for workspace information in the PromptFlow Azure CLI. The most important changes include adding a new function `_get_workspace_info(args)` and modifying the `entry` function in `_pf_azure/entry.py` to support telemetry logging, as well as adding an import statement for the `contextlib` module and a new test method `test_cli_telemetry` in `test_cli_with_azure.py` to verify the correctness of telemetry logging. Main changes: * <a href="diffhunk://#diff-3f1dd7459115086f5d3af3d298744079416aebf0a0a99d19883591e7e053cf19R91-R102">`src/promptflow/promptflow/_cli/_pf_azure/entry.py`</a>: Added a new function `_get_workspace_info(args)` and modified the `entry` function to support telemetry logging with custom dimensions related to the workspace information. <a href="diffhunk://#diff-3f1dd7459115086f5d3af3d298744079416aebf0a0a99d19883591e7e053cf19R91-R102">[1]</a> <a href="diffhunk://#diff-3f1dd7459115086f5d3af3d298744079416aebf0a0a99d19883591e7e053cf19L99-R117">[2]</a> * <a href="diffhunk://#diff-d5a4a429f9ab76787a5800c3c679ac45e94ca9b5193e3f726ab9d528397ee339L4-R11">`src/promptflow/tests/sdk_cli_azure_test/e2etests/test_cli_with_azure.py`</a>: Added an import statement for the `contextlib` module and a new test method `test_cli_telemetry` to verify that telemetry logging with workspace information is working correctly. <a href="diffhunk://#diff-d5a4a429f9ab76787a5800c3c679ac45e94ca9b5193e3f726ab9d528397ee339L4-R11">[1]</a> <a href="diffhunk://#diff-d5a4a429f9ab76787a5800c3c679ac45e94ca9b5193e3f726ab9d528397ee339R172-R196">[2]</a># Description Please add an informative description that covers that changes made by the pull request and link all relevant issues. # 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. (cherry picked from commit 20cfed8)
crazygao
pushed a commit
that referenced
this pull request
Dec 4, 2023
This pull request includes changes related to adding telemetry logging with custom dimensions for workspace information in the PromptFlow Azure CLI. The most important changes include adding a new function `_get_workspace_info(args)` and modifying the `entry` function in `_pf_azure/entry.py` to support telemetry logging, as well as adding an import statement for the `contextlib` module and a new test method `test_cli_telemetry` in `test_cli_with_azure.py` to verify the correctness of telemetry logging. Main changes: * <a href="diffhunk://#diff-3f1dd7459115086f5d3af3d298744079416aebf0a0a99d19883591e7e053cf19R91-R102">`src/promptflow/promptflow/_cli/_pf_azure/entry.py`</a>: Added a new function `_get_workspace_info(args)` and modified the `entry` function to support telemetry logging with custom dimensions related to the workspace information. <a href="diffhunk://#diff-3f1dd7459115086f5d3af3d298744079416aebf0a0a99d19883591e7e053cf19R91-R102">[1]</a> <a href="diffhunk://#diff-3f1dd7459115086f5d3af3d298744079416aebf0a0a99d19883591e7e053cf19L99-R117">[2]</a> * <a href="diffhunk://#diff-d5a4a429f9ab76787a5800c3c679ac45e94ca9b5193e3f726ab9d528397ee339L4-R11">`src/promptflow/tests/sdk_cli_azure_test/e2etests/test_cli_with_azure.py`</a>: Added an import statement for the `contextlib` module and a new test method `test_cli_telemetry` to verify that telemetry logging with workspace information is working correctly. <a href="diffhunk://#diff-d5a4a429f9ab76787a5800c3c679ac45e94ca9b5193e3f726ab9d528397ee339L4-R11">[1]</a> <a href="diffhunk://#diff-d5a4a429f9ab76787a5800c3c679ac45e94ca9b5193e3f726ab9d528397ee339R172-R196">[2]</a># Description Please add an informative description that covers that changes made by the pull request and link all relevant issues. # 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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request includes changes related to adding telemetry logging with custom dimensions for workspace information in the PromptFlow Azure CLI. The most important changes include adding a new function
_get_workspace_info(args)
and modifying theentry
function in_pf_azure/entry.py
to support telemetry logging, as well as adding an import statement for thecontextlib
module and a new test methodtest_cli_telemetry
intest_cli_with_azure.py
to verify the correctness of telemetry logging.Main changes:
src/promptflow/promptflow/_cli/_pf_azure/entry.py
: Added a new function_get_workspace_info(args)
and modified theentry
function to support telemetry logging with custom dimensions related to the workspace information. [1] [2]src/promptflow/tests/sdk_cli_azure_test/e2etests/test_cli_with_azure.py
: Added an import statement for thecontextlib
module and a new test methodtest_cli_telemetry
to verify that telemetry logging with workspace information is working correctly. [1] [2]# DescriptionPlease add an informative description that covers that changes made by the pull request and link all relevant issues.
All Promptflow Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines