-
Notifications
You must be signed in to change notification settings - Fork 3k
Change Workloads For Circuit Breaker #40843
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces new configuration options to enhance log monitoring and circuit breaker functionality in the test workloads. Key changes include adding new configuration values (USER_AGENT_PREFIX, APP_INSIGHTS_CONNECTION_STRING, CIRCUIT_BREAKER_ENABLED), modifying logger creation to utilize these configs (with changes to user agent format, logger level, and log rotation settings), and updating documentation for scale testing.
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
sdk/cosmos/azure-cosmos/tests/workloads/workload_utils.py | Updated get_user_agent and create_logger functions to incorporate config-driven behavior and adjust logger settings. |
sdk/cosmos/azure-cosmos/tests/workloads/workload_configs.py | Added new configuration parameters to support monitoring and circuit breaker functionality. |
sdk/cosmos/azure-cosmos/tests/workloads/r_w_q_workload.py | Removed an unused import to streamline the code. |
sdk/cosmos/azure-cosmos/tests/workloads/dev.md | Revised documentation to reflect the new setup and shutdown commands along with updated installation instructions. |
Files not reviewed (1)
- sdk/cosmos/azure-cosmos/tests/workloads/shutdown_workloads.sh: Language not supported
Comments suppressed due to low confidence (1)
sdk/cosmos/azure-cosmos/tests/workloads/workload_utils.py:110
- The logger is now obtained from the root logger instead of using the 'azure.cosmos' logger as before, yet the Azure monitor is configured with logger_name 'azure.cosmos'. Please verify that this change is intentional and that logging behavior remains consistent.
logger = logging.getLogger()
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
API change check API changes are not detected in this pull request. |
from workload_configs import NUMBER_OF_LOGICAL_PARTITIONS, PARTITION_KEY | ||
|
||
from azure.monitor.opentelemetry import configure_azure_monitor | ||
from workload_configs import (NUMBER_OF_LOGICAL_PARTITIONS, PARTITION_KEY, USER_AGENT_PREFIX, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: It might be easier to use *
instead of adding every variables.
) | ||
logger.setLevel(logging.DEBUG) | ||
logger.setLevel(logging.INFO) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you change the log level to INFO
? Also, can we just make the log level configurable? or add a parameter for the log level?
Description