Skip to content
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

Fixing broken links and typos #2672

Merged
merged 4 commits into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion documentation/api/collectionrules-get.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Allowed schemes:

| Name | Type | Description | Content Type |
|---|---|---|---|
| 200 OK | [CollectionRuleDetailedDescription](definitions.md#collectionruledetaileddescription) | The detailed information about the current state of the specified collection rule. | `application/json` |
| 200 OK | [CollectionRuleDetailedDescription](definitions.md#collectionruledetaileddescription-63) | The detailed information about the current state of the specified collection rule. | `application/json` |
| 400 Bad Request | [ValidationProblemDetails](definitions.md#validationproblemdetails) | An error occurred due to invalid input. The response body describes the specific problem(s). | `application/problem+json` |
| 401 Unauthorized | | Authentication is required to complete the request. See [Authentication](./../authentication.md) for further information. | |

Expand Down
2 changes: 1 addition & 1 deletion documentation/api/collectionrules-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Allowed schemes:

| Name | Type | Description | Content Type |
|---|---|---|---|
| 200 OK | map (of [CollectionRuleDescription](definitions.md#collectionruledescription)) | The basic information about the current state of the configured collection rules. | `application/json` |
| 200 OK | map (of [CollectionRuleDescription](definitions.md#collectionruledescription-63)) | The basic information about the current state of the configured collection rules. | `application/json` |
| 400 Bad Request | [ValidationProblemDetails](definitions.md#validationproblemdetails) | An error occurred due to invalid input. The response body describes the specific problem(s). | `application/problem+json` |
| 401 Unauthorized | | Authentication is required to complete the request. See [Authentication](./../authentication.md) for further information. | |

Expand Down
4 changes: 2 additions & 2 deletions documentation/api/definitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Object describing the basic state of a collection rule for the executing instanc

| Name | Type | Description |
|---|---|---|
| State | [CollectionRuleState](#collectionrulestate) | Indicates what state the collection rule is in for the current process. |
| State | [CollectionRuleState](#collectionrulestate-63) | Indicates what state the collection rule is in for the current process. |
| StateReason | string | Human-readable explanation for the current state of the collection rule. |

## CollectionRuleDetailedDescription (6.3+)
Expand All @@ -50,7 +50,7 @@ Object describing the detailed state of a collection rule for the executing inst

| Name | Type | Description |
|---|---|---|
| State | [CollectionRuleState](#collectionrulestate) | Indicates what state the collection rule is in for the current process. |
| State | [CollectionRuleState](#collectionrulestate-63) | Indicates what state the collection rule is in for the current process. |
| StateReason | string | Human-readable explanation for the current state of the collection rule. |
| LifetimeOccurrences | int | The number of times the trigger has executed for a process in its lifetime. |
| SlidingWindowOccurrences | int | The number of times the trigger has executed within the current sliding window. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,10 @@ private void HandleProgramEvent(ConsoleLogEvent logEvent)
switch ((TestAppLogEventIds)logEvent.EventId)
{
case TestAppLogEventIds.ScenarioState:
Assert.True(logEvent.State.TryGetValue("state", out TestAppScenarios.SenarioState state));
Assert.True(logEvent.State.TryGetValue("state", out TestAppScenarios.ScenarioState state));
switch (state)
{
case TestAppScenarios.SenarioState.Ready:
case TestAppScenarios.ScenarioState.Ready:
Assert.True(_readySource.TrySetResult(null));
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static class Commands
public const string PrintEnvironmentVariables = nameof(PrintEnvironmentVariables);
}

public enum SenarioState
public enum ScenarioState
{
Waiting,
Ready,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ namespace Microsoft.Diagnostics.Monitoring.UnitTestApp
{
internal static class LoggingExtensions
{
private static readonly Action<ILogger, TestAppScenarios.SenarioState, Exception> _scenarioState =
LoggerMessage.Define<TestAppScenarios.SenarioState>(
private static readonly Action<ILogger, TestAppScenarios.ScenarioState, Exception> _scenarioState =
LoggerMessage.Define<TestAppScenarios.ScenarioState>(
eventId: TestAppLogEventIds.ScenarioState.EventId(),
logLevel: LogLevel.Information,
formatString: "State: {state}");
Expand All @@ -28,7 +28,7 @@ internal static class LoggingExtensions
logLevel: LogLevel.Information,
formatString: "Environment Variable: {name} = {value}");

public static void ScenarioState(this ILogger logger, TestAppScenarios.SenarioState state)
public static void ScenarioState(this ILogger logger, TestAppScenarios.ScenarioState state)
{
_scenarioState(logger, state, null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ public static async Task<int> RunScenarioAsync(Func<ILogger, Task<int>> func, Ca
ILogger<Program> logger = hostServices.GetRequiredService<ILoggerFactory>()
.CreateLogger<Program>();

logger.ScenarioState(TestAppScenarios.SenarioState.Ready);
logger.ScenarioState(TestAppScenarios.ScenarioState.Ready);

// Wait for test host before executing scenario
await WaitForCommandAsync(TestAppScenarios.Commands.StartScenario, logger);

logger.ScenarioState(TestAppScenarios.SenarioState.Executing);
logger.ScenarioState(TestAppScenarios.ScenarioState.Executing);

int result = -1;
try
Expand All @@ -57,7 +57,7 @@ public static async Task<int> RunScenarioAsync(Func<ILogger, Task<int>> func, Ca
Console.Error.WriteLine($"Exception: {ex}");
}

logger.ScenarioState(TestAppScenarios.SenarioState.Finished);
logger.ScenarioState(TestAppScenarios.ScenarioState.Finished);

// Wait for test host before ending scenario
await WaitForCommandAsync(TestAppScenarios.Commands.EndScenario, logger);
Expand All @@ -72,7 +72,7 @@ public static async Task WaitForCommandAsync(string expectedCommand, ILogger log

public static async Task<string> WaitForCommandAsync(string[] expectedCommands, ILogger logger)
{
logger.ScenarioState(TestAppScenarios.SenarioState.Waiting);
logger.ScenarioState(TestAppScenarios.ScenarioState.Waiting);

bool receivedExpected = false;
string line, commandReceived = null;
Expand Down