Skip to content

Commit

Permalink
Updated readme documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert McCabe committed Apr 19, 2020
1 parent c11ad1b commit 50c8680
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# **Cloud.Core.Telemetry.AzureAppInsights** [![Build status](https://dev.azure.com/cloudcoreproject/CloudCore/_apis/build/status/Cloud.Core/Cloud.Core.Telemetry.AzureAppInsights_Package)](https://dev.azure.com/cloudcoreproject/CloudCore/_build/latest?definitionId=10) ![Code Coverage](https://cloud1core.blob.core.windows.net/codecoveragebadges/Cloud.Core.Telemetry.AzureAppInsights-LineCoverage.png)
[![Cloud.Core.Configuration package in Cloud.Core feed in Azure Artifacts](https://feeds.dev.azure.com/cloudcoreproject/dfc5e3d0-a562-46fe-8070-7901ac8e64a0/_apis/public/Packaging/Feeds/8949198b-5c74-42af-9d30-e8c462acada6/Packages/e71ddf20-f66a-45da-b672-c32798cf1e51/Badge)](https://dev.azure.com/cloudcoreproject/CloudCore/_packaging?_a=package&feed=8949198b-5c74-42af-9d30-e8c462acada6&package=e71ddf20-f66a-45da-b672-c32798cf1e51&preferRelease=true)
# **Cloud.Core.Telemetry.AzureAppInsights** [![Build status](https://dev.azure.com/cloudcoreproject/CloudCore/_apis/build/status/Cloud.Core/Cloud.Core.Telemetry.AzureAppInsights_Package)](https://dev.azure.com/cloudcoreproject/CloudCore/_build/latest?definitionId=10) ![Code Coverage](https://cloud1core.blob.core.windows.net/codecoveragebadges/Cloud.Core.Telemetry.AzureAppInsights-LineCoverage.png) [![Cloud.Core.Telemetry.AzureAppInsights package in Cloud.Core feed in Azure Artifacts](https://feeds.dev.azure.com/cloudcoreproject/dfc5e3d0-a562-46fe-8070-7901ac8e64a0/_apis/public/Packaging/Feeds/8949198b-5c74-42af-9d30-e8c462acada6/Packages/77080b8d-f547-4193-b2a1-6cdfd7eb6719/Badge)](https://dev.azure.com/cloudcoreproject/CloudCore/_packaging?_a=package&feed=8949198b-5c74-42af-9d30-e8c462acada6&package=77080b8d-f547-4193-b2a1-6cdfd7eb6719&preferRelease=true)



Expand Down Expand Up @@ -71,6 +70,21 @@ public class Startup
}
```

## Logging Metrics and Custom Dimensions

```csharp
ITelemeteryLogger logger = new AppInsightsLogger("instrumentationKey");

// Log metrics.
logger.LogMetric("Metric Name", 100);

// Log custom dimensions.
logger.LogInformation("Some log message", new Dictionary<string, string> {
{ "dimension1", "someVal" },
{ "dimension2", "someOtherVal" }
});
```

If you use the first example (implicitly AddingAppInsightsLogger) without specifying config, the code will look for the instrumentation key in one of the following config settings:

1. _InstrumentationKey_
Expand Down

0 comments on commit 50c8680

Please sign in to comment.