-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Docs] Add telemetry section to chaos strategies documentation pages #2071
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
Merged
martincostello
merged 14 commits into
App-vNext:main
from
peter-csala:add-telemetry-section-to-chaos-strategy-documentation
Apr 27, 2024
Merged
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
445c51d
Use relative links instead of absolute
peter-csala fa3070c
Add telemetry section to Behavior Chaos
peter-csala c4d520e
Add telemetry section to Fault Chaos
peter-csala 48f421c
Add telemetry to Latency Chaos
peter-csala 0f9e52f
Revise defaults descriptions for chaos strategies
peter-csala c5db33f
Add telemetry section to Outcome
peter-csala b64f75c
Replace mandatory to required
peter-csala 800be64
Fix linting issue
peter-csala 0038671
Fix linting issue
peter-csala 4d1e9e5
Update chaos index page
peter-csala b8bbfdf
Update telemetry page
peter-csala 3e062eb
Rename static to fixed
peter-csala 616fdc7
Replace table to bullet list
peter-csala 975a8f3
Replace table to bullet list
peter-csala File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,13 +2,15 @@ | |
|
|
||
| ## About | ||
|
|
||
| - **Options**: [`ChaosLatencyStrategyOptions`](xref:Polly.Simmy.Latency.ChaosLatencyStrategyOptions) | ||
| - **Extensions**: `AddChaosLatency` | ||
| - **Strategy Type**: Proactive | ||
| - **Option(s)**: | ||
| - [`ChaosLatencyStrategyOptions`](xref:Polly.Simmy.Latency.ChaosLatencyStrategyOptions) | ||
| - **Extension(s)**: | ||
| - `AddChaosLatency` | ||
| - **Exception(s)**: - | ||
|
|
||
| --- | ||
|
|
||
| The latency chaos strategy is designed to introduce controlled delays into system operations, simulating network latency or slow processing times. This strategy helps in assessing and improving the resilience of applications against increased response times. | ||
| The latency **proactive** chaos strategy is designed to introduce controlled delays into system operations, simulating network latency or slow processing times. This strategy helps in assessing and improving the resilience of applications against increased response times. | ||
|
|
||
| ## Usage | ||
|
|
||
|
|
@@ -90,15 +92,45 @@ var pipeline = new ResiliencePipelineBuilder() | |
|
|
||
| ## Defaults | ||
|
|
||
| | Property | Default Value | Description | | ||
| |---------------------|---------------|--------------------------------------------------------| | ||
| | `Latency` | `30 seconds` | A `TimeSpan` indicating the delay to be injected. | | ||
| | `LatencyGenerator` | `null` | Generates the latency to inject for a given execution. | | ||
| | `OnLatencyInjected` | `null` | Action executed when latency is injected. | | ||
| | Property | Default Value | Description | | ||
| |---------------------|---------------|----------------------------------------------------------------------------------------------------------------------| | ||
| | `Latency` | 30 seconds | Defines a **fixed** delay to be injected. | | ||
| | `LatencyGenerator` | `null` | This delegate allows you to **dynamically** inject delay by utilizing information that is only available at runtime. | | ||
| | `OnLatencyInjected` | `null` | If provided then it will be invoked after the latency injection occurred. | | ||
|
|
||
| > [!NOTE] | ||
| > If both `Latency` and `LatencyGenerator` are specified then `Latency` will be ignored. | ||
|
|
||
| --- | ||
|
|
||
| > [!IMPORTANT] | ||
| > Please note that if the calculated latency is negative (regardless if it's fixed or dynamic) then it will not be injected. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
|
|
||
| ## Telemetry | ||
|
|
||
| The latency chaos strategy reports the following telemetry events: | ||
|
|
||
| | Event Name | Event Severity | When? | | ||
| |-------------------|----------------|-----------------------------------------------------------------| | ||
| | `Chaos.OnLatency` | `Information` | Just before the strategy calls the `OnLatencyInjected` delegate | | ||
|
|
||
| Here are some sample events: | ||
|
|
||
| ```none | ||
| Resilience event occurred. EventName: 'Chaos.OnLatency', Source: '(null)/(null)/Chaos.Latency', Operation Key: '', Result: '' | ||
|
|
||
| Resilience event occurred. EventName: 'Chaos.OnLatency', Source: 'MyPipeline/MyPipelineInstance/MyLatencyStrategy', Operation Key: 'MyLatencyInjectedOperation', Result: '' | ||
| ``` | ||
|
|
||
| > [!NOTE] | ||
| > Please note that the `Chaos.OnLatency` telemetry event will be reported **only if** the latency chaos strategy injects a positive delay. | ||
| > | ||
| > So, if the latency is not injected then there will be no telemetry emitted. Also if injected but the latency is negative or the `LatencyGenerator` throws an exception then there will be no telemetry emitted. | ||
| > | ||
| > Also remember that the `Result` will be **always empty** for the `Chaos.OnLatency` telemetry event. | ||
|
|
||
| For further information please check out the [telemetry page](../advanced/telemetry.md). | ||
|
|
||
| ## Diagrams | ||
|
|
||
| ### Normal 🐵 sequence diagram | ||
|
|
||
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.