Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent ter Maat authored and Vincent ter Maat committed Jul 4, 2022
1 parent 5545387 commit 3dde0c3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions docs/preview/02-Features/making-telemetry-more-powerful.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var telemetryContext = new Dictionary<string, object>
{"OrderId", "ABC"},
};

logger.LogEvent("Order Created", telemetryContext);
logger.LogCustomEvent("Order Created", telemetryContext);
// Output: "Events Order Created (Context: [Customer, Arcus], [OrderId, ABC])"
```

Expand All @@ -34,7 +34,7 @@ Let's use an example - When measuring a metric you get an understanding of the c
```csharp
using Microsoft.Extensions.Logging;

logger.LogMetric("Orders Received", 133);
logger.LogCustomMetric("Orders Received", 133);
// Log output: "Metric Orders Received: 133 (Context: )"
```

Expand All @@ -51,7 +51,7 @@ var telemetryContext = new Dictionary<string, object>
{ "Customer", "Contoso"},
};

logger.LogMetric("Orders Received", 133, telemetryContext);
logger.LogCustomMetric("Orders Received", 133, telemetryContext);
// Log output: "Metric Orders Received: 133 (Context: [Customer, Contoso])"
```

Expand Down
4 changes: 2 additions & 2 deletions docs/preview/02-Features/writing-different-telemetry-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ Here is how you can report an `Order Created` event:
```csharp
using Microsoft.Extensions.Logging;

logger.LogEvent("Order Created");
logger.LogCustomEvent("Order Created");
// Output: {"EventName": "Order Created", "Context": {}}
```

Expand All @@ -488,7 +488,7 @@ Here is how you can report an `Invoices Received` metric:
```csharp
using Microsoft.Extensions.Logging;

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

Expand Down
2 changes: 1 addition & 1 deletion docs/preview/03-Guidance/use-with-dotnet-and-aspnetcore.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public class OrderController : ControllerBase
{"Customer", order.Customer.Name}
};

_logger.LogEvent("Order received", contextualInformation);
_logger.LogCustomEvent("Order received", contextualInformation);
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/preview/03-Guidance/use-with-dotnet-and-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public class DockerHubMetricScraperFunction
{"Image ID", $"{repoName}/{imageName}"}
};

_logger.LogMetric("Image Pulls", pullCount, contextualInformation);
_logger.LogCustomMetric("Image Pulls", pullCount, contextualInformation);
}
}
```
Expand Down

0 comments on commit 3dde0c3

Please sign in to comment.