Skip to content

Commit

Permalink
Merge branch 'master' into feature/add-dependency-id-to-eventhubs
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnmoreels committed Jun 1, 2022
2 parents 175178a + acf566a commit 744b03f
Show file tree
Hide file tree
Showing 21 changed files with 1,439 additions and 245 deletions.
6 changes: 3 additions & 3 deletions docs/preview/02-Features/writing-different-telemetry-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -483,13 +483,13 @@ loger.LogSecurityEvent("Invalid Order");

Metrics allow you to report custom metrics which allow you to give insights on application-specific metrics.

Here is how you can report an `Invoice Received` metric:
Here is how you can report an `Invoices Received` metric:

```csharp
using Microsoft.Extensions.Logging;

logger.LogMetric("Invoice Received", 133.37, telemetryContext);
// Output: {"MetricName": "Invoice Received", "MetricValue": 133.37, "Timestamp": "03/23/2020 09:32:02 +00:00", "Context: {}}
logger.LogMetric("Invoices Received", 133);
// Output: {"MetricName": "Invoices Received", "MetricValue": 133, "Timestamp": "03/23/2020 09:32:02 +00:00", "Context: {[TelemetryType, Metric]}}
```

## Requests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static class ILoggerHttpDependencyExtensions
/// <param name="logger">The logger to track the telemetry.</param>
/// <param name="request">The request that started the HTTP communication.</param>
/// <param name="statusCode">The status code that was returned by the service for this HTTP communication.</param>
/// <param name="measurement">The measuring the latency of the HTTP dependency.</param>
/// <param name="measurement">The measurement of the duration to call the dependency.</param>
/// <param name="context">The context that provides more insights on the dependency that was measured.</param>
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="logger"/>, <paramref name="request"/>, or <paramref name="measurement"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentException">
Expand Down Expand Up @@ -53,7 +53,7 @@ public static void LogHttpDependency(
/// <param name="logger">The logger to track the telemetry.</param>
/// <param name="request">The request that started the HTTP communication.</param>
/// <param name="statusCode">The status code that was returned by the service for this HTTP communication.</param>
/// <param name="measurement">The measuring the latency of the HTTP dependency.</param>
/// <param name="measurement">The measurement of the duration to call the dependency.</param>
/// <param name="dependencyId">The ID of the dependency to link as parent ID.</param>
/// <param name="context">The context that provides more insights on the dependency that was measured.</param>
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="logger"/>, <paramref name="request"/>, or <paramref name="measurement"/> is <c>null</c>.</exception>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static void LogRequest(this ILogger logger, HttpRequest request, HttpResp
/// <param name="logger">The logger to track the telemetry.</param>
/// <param name="request">The incoming HTTP request that was processed.</param>
/// <param name="response">The outgoing HTTP response that was created.</param>
/// <param name="measurement">The instance to measure the latency duration of the HTTP request.</param>
/// <param name="measurement">The instance to measure the duration of the HTTP request.</param>
/// <param name="context">The context that provides more insights on the tracked HTTP request.</param>
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="logger"/>, <paramref name="request"/>, or <paramref name="measurement"/> is <c>null</c></exception>
/// <exception cref="ArgumentOutOfRangeException">Thrown when the <paramref name="response"/>'s status code is outside the 0-999 range inclusively.</exception>
Expand Down Expand Up @@ -143,7 +143,7 @@ public static void LogRequest(this ILogger logger, HttpRequest request, HttpResp
/// <param name="request">The incoming HTTP request that was processed.</param>
/// <param name="response">The outgoing HTTP response that was created.</param>
/// <param name="operationName">The name of the operation of the HTTP request.</param>
/// <param name="measurement">The instance to measure the latency duration of the HTTP request.</param>
/// <param name="measurement">The instance to measure the duration of the HTTP request.</param>
/// <param name="context">The context that provides more insights on the tracked HTTP request.</param>
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="logger"/>, <paramref name="request"/>, or the <paramref name="measurement"/> is <c>null</c></exception>
/// <exception cref="ArgumentOutOfRangeException">Thrown when the <paramref name="response"/>'s status code is outside the 0-999 range inclusively.</exception>
Expand Down Expand Up @@ -237,7 +237,7 @@ public static void LogRequest(this ILogger logger, HttpRequest request, int resp
/// <param name="logger">The logger to track the telemetry.</param>
/// <param name="request">The incoming HTTP request that was processed.</param>
/// <param name="responseStatusCode">The HTTP status code returned by the service.</param>
/// <param name="measurement">The instance to measure the latency duration of the HTTP request.</param>
/// <param name="measurement">The instance to measure the duration of the HTTP request.</param>
/// <param name="context">The context that provides more insights on the tracked HTTP request.</param>
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="logger"/>, <paramref name="request"/> or <paramref name="measurement"/> is <c>null</c></exception>
/// <exception cref="ArgumentOutOfRangeException">Thrown when the <paramref name="responseStatusCode"/> is outside the 0-999 range inclusively.</exception>
Expand Down Expand Up @@ -335,7 +335,7 @@ public static void LogRequest(this ILogger logger, HttpRequest request, int resp
/// <param name="request">The incoming HTTP request that was processed.</param>
/// <param name="responseStatusCode">The HTTP status code returned by the service.</param>
/// <param name="operationName">The name of the operation of the HTTP request.</param>
/// <param name="measurement">The instance to measure the latency duration of the HTTP request.</param>
/// <param name="measurement">The instance to measure the duration of the HTTP request.</param>
/// <param name="context">The context that provides more insights on the tracked HTTP request.</param>
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="logger"/>, <paramref name="request"/>, or the <paramref name="measurement"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentOutOfRangeException">Thrown when the <paramref name="responseStatusCode"/> is outside the 0-999 inclusively.</exception>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static void LogAzureKeyVaultDependency(
/// <param name="vaultUri">The URI pointing to the Azure Key Vault resource.</param>
/// <param name="secretName">The secret that is being used within the Azure Key Vault resource.</param>
/// <param name="isSuccessful">The indication whether or not the operation was successful.</param>
/// <param name="measurement">The measuring the latency to call the dependency.</param>
/// <param name="measurement">The measurement of the duration to call the dependency.</param>
/// <param name="context">The context that provides more insights on the dependency that was measured.</param>
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="logger"/> or <paramref name="measurement"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentException">Thrown when the <paramref name="vaultUri"/> or <paramref name="secretName"/> is blank.</exception>
Expand Down Expand Up @@ -114,7 +114,7 @@ public static void LogAzureKeyVaultDependency(
/// <param name="vaultUri">The URI pointing to the Azure Key Vault resource.</param>
/// <param name="secretName">The secret that is being used within the Azure Key Vault resource.</param>
/// <param name="isSuccessful">The indication whether or not the operation was successful.</param>
/// <param name="measurement">The measuring the latency to call the dependency.</param>
/// <param name="measurement">The measurement of the duration to call the dependency.</param>
/// <param name="dependencyId">The ID of the dependency to link as parent ID.</param>
/// <param name="context">The context that provides more insights on the dependency that was measured.</param>
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="logger"/> or <paramref name="measurement"/> is <c>null</c>.</exception>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static void LogAzureSearchDependency(
/// <param name="searchServiceName">The name of the Azure Search service.</param>
/// <param name="operationName">The name of the operation to execute on the Azure Search service.</param>
/// <param name="isSuccessful">The indication whether or not the operation was successful.</param>
/// <param name="measurement">The measuring the latency to call the dependency.</param>
/// <param name="measurement">The measurement of the duration to call the dependency.</param>
/// <param name="context">The context that provides more insights on the dependency that was measured.</param>
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="logger"/> or <paramref name="measurement"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentException">Thrown when the <paramref name="searchServiceName"/> or <paramref name="operationName"/> is blank.</exception>
Expand Down Expand Up @@ -79,7 +79,7 @@ public static void LogAzureSearchDependency(
/// <param name="searchServiceName">The name of the Azure Search service.</param>
/// <param name="operationName">The name of the operation to execute on the Azure Search service.</param>
/// <param name="isSuccessful">The indication whether or not the operation was successful.</param>
/// <param name="measurement">The measuring the latency to call the dependency.</param>
/// <param name="measurement">The measurement of the duration to call the dependency.</param>
/// <param name="dependencyId">The ID of the dependency to link as parent ID.</param>
/// <param name="context">The context that provides more insights on the dependency that was measured.</param>
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="logger"/> or <paramref name="measurement"/> is <c>null</c>.</exception>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static void LogBlobStorageDependency(
/// <param name="accountName">The account of the storage resource.</param>
/// <param name="containerName">The name of the Blob Container resource.</param>
/// <param name="isSuccessful">The indication whether or not the operation was successful.</param>
/// <param name="measurement">The measuring the latency to call the dependency.</param>
/// <param name="measurement">The measurement of the duration to call the dependency.</param>
/// <param name="context">The context that provides more insights on the dependency that was measured.</param>
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="logger"/> or <paramref name="measurement"/> is <c>null</c>.</exception>
/// <exception cref="ArgumentException">Thrown when the <paramref name="accountName"/> or <paramref name="containerName"/> is blank.</exception>
Expand All @@ -75,7 +75,7 @@ public static void LogBlobStorageDependency(
/// <param name="accountName">The account of the storage resource.</param>
/// <param name="containerName">The name of the Blob Container resource.</param>
/// <param name="isSuccessful">The indication whether or not the operation was successful.</param>
/// <param name="measurement">The measuring the latency to call the dependency.</param>
/// <param name="measurement">The measurement of the duration to call the dependency.</param>
/// <param name="dependencyId">The ID of the dependency to link as parent ID.</param>
/// <param name="context">The context that provides more insights on the dependency that was measured.</param>
/// <exception cref="ArgumentNullException">Thrown when the <paramref name="logger"/> or <paramref name="measurement"/> is <c>null</c>.</exception>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static void LogDependency(
/// <param name="dependencyType">The custom type of dependency.</param>
/// <param name="dependencyData">The custom data of dependency.</param>
/// <param name="isSuccessful">The indication whether or not the operation was successful.</param>
/// <param name="measurement">The measuring the latency to call the dependency.</param>
/// <param name="measurement">The measurement of the duration to call the dependency.</param>
/// <param name="context">The context that provides more insights on the dependency that was measured.</param>
/// <exception cref="ArgumentNullException">
/// Thrown when the <paramref name="logger"/>, <paramref name="dependencyData"/>, <paramref name="measurement"/> is <c>null</c>.
Expand Down Expand Up @@ -79,7 +79,7 @@ public static void LogDependency(
/// <param name="dependencyType">The custom type of dependency.</param>
/// <param name="dependencyData">The custom data of dependency.</param>
/// <param name="isSuccessful">The indication whether or not the operation was successful.</param>
/// <param name="measurement">The measuring the latency to call the dependency.</param>
/// <param name="measurement">The measurement of the duration to call the dependency.</param>
/// <param name="dependencyId">The ID of the dependency to link as parent ID.</param>
/// <param name="context">The context that provides more insights on the dependency that was measured.</param>
/// <exception cref="ArgumentNullException">
Expand Down Expand Up @@ -143,7 +143,7 @@ public static void LogDependency(
/// <param name="dependencyData">The custom data of dependency.</param>
/// <param name="isSuccessful">The indication whether or not the operation was successful.</param>
/// <param name="dependencyName">The name of the dependency.</param>
/// <param name="measurement">The measuring the latency to call the dependency.</param>
/// <param name="measurement">The measurement of the duration to call the dependency.</param>
/// <param name="context">The context that provides more insights on the dependency that was measured.</param>
/// <exception cref="ArgumentNullException">
/// Thrown when the <paramref name="logger"/>, <paramref name="dependencyData"/>, <paramref name="measurement"/> is <c>null</c>.
Expand Down Expand Up @@ -174,7 +174,7 @@ public static void LogDependency(
/// <param name="dependencyData">The custom data of dependency.</param>
/// <param name="isSuccessful">The indication whether or not the operation was successful.</param>
/// <param name="dependencyName">The name of the dependency.</param>
/// <param name="measurement">The measuring the latency to call the dependency.</param>
/// <param name="measurement">The measurement of the duration to call the dependency.</param>
/// <param name="dependencyId">The ID of the dependency to link as parent ID.</param>
/// <param name="context">The context that provides more insights on the dependency that was measured.</param>
/// <exception cref="ArgumentNullException">
Expand Down Expand Up @@ -375,7 +375,7 @@ public static void LogDependency(
/// <param name="dependencyData">The custom data of dependency.</param>
/// <param name="targetName">The name of the dependency target.</param>
/// <param name="isSuccessful">The indication whether or not the operation was successful.</param>
/// <param name="measurement">The measuring the latency to call the dependency.</param>
/// <param name="measurement">The measurement of the duration to call the dependency.</param>
/// <param name="context">The context that provides more insights on the dependency that was measured.</param>
/// <exception cref="ArgumentNullException">
/// Thrown when the <paramref name="logger"/>, <paramref name="dependencyData"/>, <paramref name="measurement"/> is <c>null</c>.
Expand Down Expand Up @@ -406,7 +406,7 @@ public static void LogDependency(
/// <param name="dependencyData">The custom data of dependency.</param>
/// <param name="targetName">The name of the dependency target.</param>
/// <param name="isSuccessful">The indication whether or not the operation was successful.</param>
/// <param name="measurement">The measuring the latency to call the dependency.</param>
/// <param name="measurement">The measurement of the duration to call the dependency.</param>
/// <param name="dependencyId">The ID of the dependency to link as parent ID.</param>
/// <param name="context">The context that provides more insights on the dependency that was measured.</param>
/// <exception cref="ArgumentNullException">
Expand Down Expand Up @@ -474,7 +474,7 @@ public static void LogDependency(
/// <param name="targetName">The name of the dependency target.</param>
/// <param name="isSuccessful">The indication whether or not the operation was successful.</param>
/// <param name="dependencyName">The name of the dependency.</param>
/// <param name="measurement">The measuring the latency to call the dependency.</param>
/// <param name="measurement">The measurement of the duration to call the dependency.</param>
/// <param name="context">The context that provides more insights on the dependency that was measured.</param>
/// <exception cref="ArgumentNullException">
/// Thrown when the <paramref name="logger"/>, <paramref name="dependencyData"/>, <paramref name="measurement"/> is <c>null</c>.
Expand Down Expand Up @@ -507,7 +507,7 @@ public static void LogDependency(
/// <param name="targetName">The name of the dependency target.</param>
/// <param name="isSuccessful">The indication whether or not the operation was successful.</param>
/// <param name="dependencyName">The name of the dependency.</param>
/// <param name="measurement">The measuring the latency to call the dependency.</param>
/// <param name="measurement">The measurement of the duration to call the dependency.</param>
/// <param name="dependencyId">The ID of the dependency to link as parent ID.</param>
/// <param name="context">The context that provides more insights on the dependency that was measured.</param>
/// <exception cref="ArgumentNullException">
Expand Down
Loading

0 comments on commit 744b03f

Please sign in to comment.