From bc374d86dca35650c32e6a68764f603f13c673d5 Mon Sep 17 00:00:00 2001 From: stijnmoreels <9039753+stijnmoreels@users.noreply.github.com> Date: Thu, 3 Mar 2022 08:50:40 +0100 Subject: [PATCH] chore: use file paths io url routes --- docs/preview/01-index.md | 14 ++--- docs/preview/02-Features/correlation.md | 4 +- .../making-telemetry-more-powerful.md | 2 +- .../sinks/azure-application-insights.md | 7 ++- .../02-Features/telemetry-enrichment.md | 23 +++++--- docs/preview/02-Features/telemetry-filter.md | 2 +- .../writing-different-telemetry-types.md | 58 ++++++++++--------- .../use-with-dotnet-and-functions.md | 3 - .../versioned_docs/version-v0.1.0/01-index.md | 10 ++-- .../version-v0.1.0/02-Features/correlation.md | 4 +- .../02-Features/telemetry-enrichment.md | 10 ++-- .../02-Features/telemetry-filter.md | 2 +- .../writing-different-telemetry-types.md | 30 +++++----- .../versioned_docs/version-v0.1.1/01-index.md | 10 ++-- .../version-v0.1.1/02-Features/correlation.md | 4 +- .../02-Features/telemetry-enrichment.md | 10 ++-- .../02-Features/telemetry-filter.md | 2 +- .../writing-different-telemetry-types.md | 30 +++++----- .../versioned_docs/version-v0.2.0/01-index.md | 12 ++-- .../version-v0.2.0/02-Features/correlation.md | 2 +- .../making-telemetry-more-powerful.md | 2 +- .../02-Features/telemetry-enrichment.md | 10 ++-- .../02-Features/telemetry-filter.md | 2 +- .../writing-different-telemetry-types.md | 45 +++++++------- docs/versioned_docs/version-v0.3/01-index.md | 14 ++--- .../version-v0.3/02-Features/correlation.md | 2 +- .../making-telemetry-more-powerful.md | 2 +- .../02-Features/telemetry-enrichment.md | 12 ++-- .../02-Features/telemetry-filter.md | 2 +- .../writing-different-telemetry-types.md | 47 +++++++-------- docs/versioned_docs/version-v0.4/01-index.md | 14 ++--- .../version-v0.4/02-Features/correlation.md | 4 +- .../making-telemetry-more-powerful.md | 2 +- .../02-Features/telemetry-enrichment.md | 23 +++++--- .../02-Features/telemetry-filter.md | 2 +- .../writing-different-telemetry-types.md | 50 ++++++++-------- docs/versioned_docs/version-v1.0/01-index.md | 14 ++--- .../version-v1.0/02-Features/correlation.md | 4 +- .../making-telemetry-more-powerful.md | 2 +- .../02-Features/telemetry-enrichment.md | 23 +++++--- .../02-Features/telemetry-filter.md | 2 +- .../writing-different-telemetry-types.md | 50 ++++++++-------- docs/versioned_docs/version-v2.0/01-index.md | 14 ++--- .../version-v2.0/02-Features/correlation.md | 4 +- .../making-telemetry-more-powerful.md | 2 +- .../02-Features/telemetry-enrichment.md | 23 +++++--- .../02-Features/telemetry-filter.md | 2 +- .../writing-different-telemetry-types.md | 51 ++++++++-------- docs/versioned_docs/version-v2.1/01-index.md | 14 ++--- .../version-v2.1/02-Features/correlation.md | 4 +- .../making-telemetry-more-powerful.md | 2 +- .../sinks/azure-application-insights.md | 3 +- .../02-Features/telemetry-enrichment.md | 23 +++++--- .../02-Features/telemetry-filter.md | 2 +- .../writing-different-telemetry-types.md | 51 ++++++++-------- docs/versioned_docs/version-v2.2/01-index.md | 14 ++--- .../making-telemetry-more-powerful.md | 2 +- .../sinks/azure-application-insights.md | 3 +- .../02-Features/telemetry-enrichment.md | 25 +++++--- .../02-Features/telemetry-filter.md | 2 +- .../writing-different-telemetry-types.md | 51 ++++++++-------- docs/versioned_docs/version-v2.3/01-index.md | 14 ++--- .../version-v2.3/02-Features/correlation.md | 4 +- .../making-telemetry-more-powerful.md | 2 +- .../sinks/azure-application-insights.md | 3 +- .../02-Features/telemetry-enrichment.md | 23 +++++--- .../02-Features/telemetry-filter.md | 2 +- .../writing-different-telemetry-types.md | 45 +++++++------- docs/versioned_docs/version-v2.4/01-index.md | 14 ++--- .../version-v2.4/02-Features/correlation.md | 4 +- .../making-telemetry-more-powerful.md | 2 +- .../sinks/azure-application-insights.md | 7 ++- .../02-Features/telemetry-enrichment.md | 23 +++++--- .../02-Features/telemetry-filter.md | 2 +- .../writing-different-telemetry-types.md | 52 +++++++++-------- 75 files changed, 570 insertions(+), 486 deletions(-) diff --git a/docs/preview/01-index.md b/docs/preview/01-index.md index 96e859db..815bca93 100644 --- a/docs/preview/01-index.md +++ b/docs/preview/01-index.md @@ -19,18 +19,18 @@ For more granular packages we recommend reading the documentation. # Features -- [Making telemetry more powerful](/features/making-telemetry-more-powerful) by making it simple to provide contextual information -- [Writing different telemetry types](/features/writing-different-telemetry-types) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. -- [Correlation](/features/correlation) - A common set of correlation levels. +- [Making telemetry more powerful](./02-Features/making-telemetry-more-powerful.md) by making it simple to provide contextual information +- [Writing different telemetry types](./02-Features/writing-different-telemetry-types.md) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. +- [Correlation](./02-Features/correlation.md) - A common set of correlation levels. - Telemetry - - [Enrichment](/features/telemetry-enrichment) - A set of enrichers to improve telemetry information. - - [Filters](/features/telemetry-filter) - A set of filters to control telemetry flow with. + - [Enrichment](./02-Features/telemetry-enrichment.md) - A set of enrichers to improve telemetry information. + - [Filters](./02-Features/telemetry-filter.md) - A set of filters to control telemetry flow with. - Sinks - - [Azure Application Insights](/features/sinks/azure-application-insights) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights + - [Azure Application Insights](./02-Features/sinks/azure-application-insights.md) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights # Guidance -- [Using Arcus & Serilog in Azure Functions](/guidance/use-with-dotnet-and-functions) +- [Using Arcus & Serilog in Azure Functions](./03-Guidance/use-with-dotnet-and-functions.md) # License This is licensed under The MIT License (MIT). Which means that you can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the web application. But you always need to state that Codit is the original author of this web application. diff --git a/docs/preview/02-Features/correlation.md b/docs/preview/02-Features/correlation.md index f31ecb11..b5422b6e 100644 --- a/docs/preview/02-Features/correlation.md +++ b/docs/preview/02-Features/correlation.md @@ -46,7 +46,7 @@ namespace Application ``` ## Custom Correlation -We register two interfaces during the registration of the correlation: `ICorrealtionInfoAccessor` and `ICorrelationInfoAccessor<>`. +We register two interfaces during the registration of the correlation: `ICorrelationInfoAccessor` and `ICorrelationInfoAccessor<>`. The reason is because some applications require a custom `CorrelationInfo` model, and with using the generic interface `ICorrelationInfoAccessor<>` we can support this. **Example** @@ -192,7 +192,7 @@ namespace Application This custom options model can then be included when registering the correlation: ```csharp -using Microsoft.Excentions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; namespace Application { diff --git a/docs/preview/02-Features/making-telemetry-more-powerful.md b/docs/preview/02-Features/making-telemetry-more-powerful.md index b0679f41..d2934f61 100644 --- a/docs/preview/02-Features/making-telemetry-more-powerful.md +++ b/docs/preview/02-Features/making-telemetry-more-powerful.md @@ -25,7 +25,7 @@ logger.LogEvent("Order Created", telemetryContext); By doing so, you'll be able to interact more efficient with your logs by filtering, searching, ... on it. -We support this for all [telemetry types that you can write](/features/writing-different-telemetry-types). +We support this for all [telemetry types that you can write](./writing-different-telemetry-types.md). ### Seeing the power in action diff --git a/docs/preview/02-Features/sinks/azure-application-insights.md b/docs/preview/02-Features/sinks/azure-application-insights.md index 722eb8d9..10d52285 100644 --- a/docs/preview/02-Features/sinks/azure-application-insights.md +++ b/docs/preview/02-Features/sinks/azure-application-insights.md @@ -153,7 +153,7 @@ var host = Host.CreateDefaultBuilder() string instrumentationKey = context.Configuration["ApplicationInsights:InstrumentationKey"]; - if (!String.IsNullOrWhiteSpace(instrumentationKey)) + if (!string.IsNullOrWhiteSpace(instrumentationKey)) { loggerConfiguration.WriteTo.AzureApplicationInsights(instrumentationKey, LogEventLevel.Information); } @@ -172,7 +172,8 @@ using Arcus.Security.Core; var host = Host.CreateDefaultBuilder() .ConfigureSecretStore((context, config, builder) => { - // Configure the secretstore here + // Configure the secret store here + // https://security.arcus-azure.net/features/secret-store/ }) .UseSerilog((context, serviceProvider, loggerConfig) => { @@ -183,7 +184,7 @@ var host = Host.CreateDefaultBuilder() var instrumentationKey = secretProvider.GetRawSecretAsync("ApplicationInsights:InstrumentationKey").GetAwaiter().GetResult(); - if (!String.IsNullOrWhiteSpace(instrumentationKey)) + if (!string.IsNullOrWhiteSpace(instrumentationKey)) { loggerConfiguration.WriteTo.AzureApplicationInsights(instrumentationKey, LogEventLevel.Information); } diff --git a/docs/preview/02-Features/telemetry-enrichment.md b/docs/preview/02-Features/telemetry-enrichment.md index b8ec690c..e2453d7d 100644 --- a/docs/preview/02-Features/telemetry-enrichment.md +++ b/docs/preview/02-Features/telemetry-enrichment.md @@ -7,10 +7,17 @@ layout: default We provide a variety of enrichers for Serilog: -- [Application Enricher](#application-enricher) -- [Correlation Enricher](#correlation-enricher) -- [Kubernetes Enricher](#kubernetes-enricher) -- [Version Enricher](#version-enricher) +- [Telemetry Enrichment](#telemetry-enrichment) + - [Installation](#installation) + - [Application Enricher](#application-enricher) + - [Custom Serilog property names](#custom-serilog-property-names) + - [Correlation Enricher](#correlation-enricher) + - [Custom Serilog property names](#custom-serilog-property-names-1) + - [Kubernetes Enricher](#kubernetes-enricher) + - [Custom Serilog property names](#custom-serilog-property-names-2) + - [Version Enricher](#version-enricher) + - [Custom application version](#custom-application-version) + - [Custom Serilog property names](#custom-serilog-property-names-3) ## Installation @@ -23,7 +30,7 @@ PM > Install-Package Arcus.Observability.Telemetry.Serilog.Enrichers ## Application Enricher The `Arcus.Observability.Telemetry.Serilog.Enrichers` library provides a [Serilog enricher](https://github.com/serilog/serilog/wiki/Enrichment) -that adds the application's component name to the log event as a log property with the name `ComponentName` and gives the opportiunity to choose the location from where the application 'instance' should be retrieved. +that adds the application's component name to the log event as a log property with the name `ComponentName` and gives the opportunity to choose the location from where the application 'instance' should be retrieved. **Example** Name: `ComponentName` @@ -42,7 +49,7 @@ logger.Information("Some event"); // Output: Some event {ComponentName: My application component, MachineName: MyComputer} ``` -Or, alternatively one can choose to use the Kubernetes information which our [Application Insights](./sinks/azure-application-insights) sink will prioritize above the `MachineName` when determining the telemetry `Cloud.RoleInstance`. +Or, alternatively one can choose to use the Kubernetes information which our [Application Insights](./sinks/azure-application-insights.md) sink will prioritize above the `MachineName` when determining the telemetry `Cloud.RoleInstance`. ```csharp using Serilog; @@ -255,7 +262,7 @@ logger.Information("Some event"); ### Custom application version -The version enricher allows you to specify an `IAppVersion` instance that retrieves your custom application version, which will be used during enrichement. +The version enricher allows you to specify an `IAppVersion` instance that retrieves your custom application version, which will be used during enrichment. By default this is set to the version of the current executing assembly. **Assembly version as application version** @@ -325,7 +332,7 @@ ILogger logger = new LoggerConfiguration() ### Custom Serilog property names -The version enricher allows you to specify the name of the property that will be added to the log event during enrichement. +The version enricher allows you to specify the name of the property that will be added to the log event during enrichment. By default this is set to `version`. ```csharp diff --git a/docs/preview/02-Features/telemetry-filter.md b/docs/preview/02-Features/telemetry-filter.md index 533663e6..e42ac966 100644 --- a/docs/preview/02-Features/telemetry-filter.md +++ b/docs/preview/02-Features/telemetry-filter.md @@ -42,7 +42,7 @@ ILogger logger = new LoggerConfiguration() Alternatively, you can explicitly specify if it should track telemetry or not based on the application configuration has to be tracked or not : ```csharp -var trackDependencies = configuration["telemetry:depenencies:isEnabled"]; +var trackDependencies = configuration["telemetry:dependencies:isEnabled"]; ILogger logger = new LoggerConfiguration() .WriteTo.AzureApplicationInsights("") .Filter.With(TelemetryTypeFilter.On(TelemetryType.Dependency, isTrackingEnabled: bool.Parse(trackDependencies))) diff --git a/docs/preview/02-Features/writing-different-telemetry-types.md b/docs/preview/02-Features/writing-different-telemetry-types.md index a3724c04..b336a043 100644 --- a/docs/preview/02-Features/writing-different-telemetry-types.md +++ b/docs/preview/02-Features/writing-different-telemetry-types.md @@ -9,16 +9,36 @@ Logs are a great way to gain insights, but sometimes they are not the best appro We provide the capability to track the following telemetry types on top of ILogger with good support on Serilog: -- [Dependencies](#dependencies) -- [Events](#events) -- [Metrics](#metrics) -- [Requests](#requests) - -For most optimal output, we recommend using our [Azure Application Insights sink](/features/sinks/azure-application-insights). +- [Write different telemetry types](#write-different-telemetry-types) + - [Installation](#installation) + - [Dependencies](#dependencies) + - [Measuring Azure Blob Storage dependencies](#measuring-azure-blob-storage-dependencies) + - [Measuring Azure Cosmos DB dependencies](#measuring-azure-cosmos-db-dependencies) + - [Measuring Azure Event Hubs dependencies](#measuring-azure-event-hubs-dependencies) + - [Measuring Azure IoT Hub dependencies](#measuring-azure-iot-hub-dependencies) + - [Measuring Azure Key Vault dependencies](#measuring-azure-key-vault-dependencies) + - [Measuring Azure Search dependencies](#measuring-azure-search-dependencies) + - [Measuring Azure Service Bus dependencies](#measuring-azure-service-bus-dependencies) + - [Measuring Azure Table Storage Dependencies](#measuring-azure-table-storage-dependencies) + - [Measuring HTTP dependencies](#measuring-http-dependencies) + - [Measuring SQL dependencies](#measuring-sql-dependencies) + - [Measuring custom dependencies](#measuring-custom-dependencies) + - [Making it easier to measure telemetry](#making-it-easier-to-measure-telemetry) + - [Making it easier to measure dependencies](#making-it-easier-to-measure-dependencies) + - [Making it easier to measure requests](#making-it-easier-to-measure-requests) + - [Making it easier to link services](#making-it-easier-to-link-services) + - [Events](#events) + - [Security Events](#security-events) + - [Metrics](#metrics) + - [Requests](#requests) + - [Incoming Azure Service Bus requests](#incoming-azure-service-bus-requests) + - [Incoming HTTP requests](#incoming-http-requests) + +For most optimal output, we recommend using our [Azure Application Insights sink](./sinks/azure-application-insights.md). **We highly encourage to provide contextual information to all your telemetry** to make it more powerful and support this for all telemetry types. -> :bulb: For sake of simplicity we have not included how to track contextual information, for more information see [our documentation](/features/making-telemetry-more-powerful). +> :bulb: For sake of simplicity we have not included how to track contextual information, for more information see [our documentation](./making-telemetry-more-powerful.md). ## Installation @@ -32,20 +52,6 @@ PM > Install-Package Arcus.Observability.Telemetry.Core Dependencies allow you to track how your external dependencies are doing to give you insights on performance and error rate. -We provide support for the following dependencies: - -- [Azure Blob Storage](#measuring-azure-blob-storage-dependencies) -- [Azure Cosmos DB](#measuring-azure-cosmos-db-dependencies) -- [Azure Event Hubs](#measuring-azure-event-hubs-dependencies) -- [Azure IoT Hub](#measuring-azure-iot-hub-dependencies) -- [Azure Key Vault](#measuring-azure-key-vault-dependencies) -- [Azure Search](#measuring-azure-search-dependencies) -- [Azure Service Bus](#measuring-azure-service-bus-dependencies) -- [Azure Table Storage](#measuring-azure-table-storage-dependencies) -- [HTTP](#measuring-http-dependencies) -- [SQL](#measuring-sql-dependencies) -- [Custom](#measuring-custom-dependencies) - Since measuring dependencies can add some noise in your code, we've introduced `DependencyMeasurement` to make it simpler. ([docs](#making-it-easier-to-measure-dependencies)) Linking service-to-service correlation can be hard, this can be made easier with including dependency ID's. ([docs](#making-it-easier-to-link-services)) @@ -105,7 +111,7 @@ durationMeasurement.Start(); var startTime = DateTimeOffset.UtcNow; logger.LogEventHubsDependency(namespaceName: "be.sensors.contoso", eventHubName: "temperature", isSuccessful: true, startTime: startTime, duration: durationMeasurement.Elapsed); -// Output: {"DependencyType": "Azure Event Hubs", "DependencyData": "be.sensors.contoso", "TargetName": "temerature", "Duration": "00:00:00.2521801", "StartTime": "03/23/2020 09:56:31 +00:00", "IsSuccessful": true, "Context": {}} +// Output: {"DependencyType": "Azure Event Hubs", "DependencyData": "be.sensors.contoso", "TargetName": "temperature", "Duration": "00:00:00.2521801", "StartTime": "03/23/2020 09:56:31 +00:00", "IsSuccessful": true, "Context": {}} ``` ### Measuring Azure IoT Hub dependencies @@ -129,7 +135,7 @@ logger.LogIotHubDependency(iotHubName: "sensors", isSuccessful: true, startTime: // Output: {"DependencyType": "Azure IoT Hub", "TargetName": "sensors", "Duration": "00:00:00.2521801", "StartTime": "03/23/2020 09:56:31 +00:00", "IsSuccessful": true, "Context": {}} ``` -Or, alternatively you can pass allong the IoT connection string itself so the host name will be selected for you. +Or, alternatively you can pass along the IoT connection string itself so the host name will be selected for you. **Installation** @@ -179,7 +185,7 @@ logger.AzureKeyVaultDependency(vaultUri: "https://my-secret-store.vault.azure.ne ### Measuring Azure Search dependencies -We allow you to measure Azure Search depdendencies for cognetive services. +We allow you to measure Azure Search dependencies for cognitive services. Here is how you can report an Azure Search dependency: @@ -312,7 +318,7 @@ logger.LogSqlDependency(connectionString, "my-table", "get-products", isSuccessf ### Measuring custom dependencies -Here is how you can areport a custom depenency: +Here is how you can measure a custom dependency: ```csharp using Microsoft.Extensions.Logging; @@ -518,7 +524,7 @@ using (var measurement = RequestMeasurement.Start()) ``` We provide support for all Azure Service Bus entity types such as queues, topics and subscriptions. -All these types can be tracked by passing allong the full Azure Service namespace, or with providing the namespace name and the Azure cloud separately. +All these types can be tracked by passing along the full Azure Service namespace, or with providing the namespace name and the Azure cloud separately. ```csharp diff --git a/docs/preview/03-Guidance/use-with-dotnet-and-functions.md b/docs/preview/03-Guidance/use-with-dotnet-and-functions.md index 3c4b5cce..2adc287e 100644 --- a/docs/preview/03-Guidance/use-with-dotnet-and-functions.md +++ b/docs/preview/03-Guidance/use-with-dotnet-and-functions.md @@ -54,7 +54,6 @@ namespace Arcus.Samples.AzureFunction builder.Services.AddLogging(loggingBuilder => { - loggingBuilder.ClearProvidersExceptFunctionProviders(); loggingBuilder.AddSerilog(logger); }); } @@ -62,8 +61,6 @@ namespace Arcus.Samples.AzureFunction } ``` -> :bulb: Note that we are using `ClearProvidersExceptFunctionProviders` instead of `ClearProviders` given Azure Functions requires some logging providers to be available. - Here is an example of how you can use ILogger to write multi-dimensional metrics with Arcus. If Serilog would not be setup correctly (see above), it would only report the metric without the dimensions. ```csharp diff --git a/docs/versioned_docs/version-v0.1.0/01-index.md b/docs/versioned_docs/version-v0.1.0/01-index.md index efccae13..2b461e08 100644 --- a/docs/versioned_docs/version-v0.1.0/01-index.md +++ b/docs/versioned_docs/version-v0.1.0/01-index.md @@ -19,13 +19,13 @@ For more granular packages we recommend reading the documentation. # Features -- [Writing different telemetry types](/features/writing-different-telemetry-types) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. -- [Correlation](/features/correlation) - A common set of correlation levels. +- [Writing different telemetry types](./02-Features/writing-different-telemetry-types.md) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. +- [Correlation](./02-Features/correlation.md) - A common set of correlation levels. - Telemetry - - [Enrichment](/features/telemetry-enrichment) - A set of enrichers to improve telemetry information. - - [Filters](/features/telemetry-filter) - A set of filters to control telemetry flow with. + - [Enrichment](./02-Features/telemetry-enrichment.md) - A set of enrichers to improve telemetry information. + - [Filters](./02-Features/telemetry-filter.md) - A set of filters to control telemetry flow with. - Sinks - - [Azure Application Insights](/features/sinks/azure-application-insights) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights + - [Azure Application Insights](./02-Features/sinks/azure-application-insights.md) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights # License This is licensed under The MIT License (MIT). Which means that you can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the web application. But you always need to state that Codit is the original author of this web application. diff --git a/docs/versioned_docs/version-v0.1.0/02-Features/correlation.md b/docs/versioned_docs/version-v0.1.0/02-Features/correlation.md index 9c81ffd5..115a426d 100644 --- a/docs/versioned_docs/version-v0.1.0/02-Features/correlation.md +++ b/docs/versioned_docs/version-v0.1.0/02-Features/correlation.md @@ -45,7 +45,7 @@ namespace Application ``` ## Custom Correlation -We register two interfaces during the registration of the correlation: `ICorrealtionInfoAccessor` and `ICorrelationInfoAccessor<>`. +We register two interfaces during the registration of the correlation: `ICorrelationInfoAccessor` and `ICorrelationInfoAccessor<>`. The reason is because some applications require a custom `CorrelationInfo` model, and with using the generic interface `ICorrelationInfoAccessor<>` we can support this. **Example** @@ -191,7 +191,7 @@ namespace Application This custom options model can then be included when registering the correlation: ```csharp -using Microsoft.Excentions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; namespace Application { diff --git a/docs/versioned_docs/version-v0.1.0/02-Features/telemetry-enrichment.md b/docs/versioned_docs/version-v0.1.0/02-Features/telemetry-enrichment.md index 439d8ef7..e3a46587 100644 --- a/docs/versioned_docs/version-v0.1.0/02-Features/telemetry-enrichment.md +++ b/docs/versioned_docs/version-v0.1.0/02-Features/telemetry-enrichment.md @@ -7,10 +7,12 @@ layout: default We provide a variety of enrichers for Serilog: -- [Application Enricher](#application-enricher) -- [Correlation Enricher](#correlation-enricher) -- [Kubernetes Enricher](#kubernetes-enricher) -- [Version Enricher](#version-enricher) +- [Telemetry Enrichment](#telemetry-enrichment) + - [Installation](#installation) + - [Application Enricher](#application-enricher) + - [Correlation Enricher](#correlation-enricher) + - [Kubernetes Enricher](#kubernetes-enricher) + - [Version Enricher](#version-enricher) ## Installation diff --git a/docs/versioned_docs/version-v0.1.0/02-Features/telemetry-filter.md b/docs/versioned_docs/version-v0.1.0/02-Features/telemetry-filter.md index f569c5a2..1ef53a9c 100644 --- a/docs/versioned_docs/version-v0.1.0/02-Features/telemetry-filter.md +++ b/docs/versioned_docs/version-v0.1.0/02-Features/telemetry-filter.md @@ -42,7 +42,7 @@ ILogger logger = new LoggerConfiguration() Alternatively, you can explicitly specify if it should track telemetry or not based on the application configuration has to be tracked or not : ```csharp -var trackDependencies = configuration["telemetry:depenencies:isEnabled"]; +var trackDependencies = configuration["telemetry:dependencies:isEnabled"]; ILogger logger = new LoggerConfiguration() .WriteTo.AzureApplicationInsights("") .Filter.With(TelemetryTypeFilter.On(TelemetryType.Dependency, isTrackingEnabled: bool.Parse(trackDependencies))) diff --git a/docs/versioned_docs/version-v0.1.0/02-Features/writing-different-telemetry-types.md b/docs/versioned_docs/version-v0.1.0/02-Features/writing-different-telemetry-types.md index a48bc2eb..b351b32f 100644 --- a/docs/versioned_docs/version-v0.1.0/02-Features/writing-different-telemetry-types.md +++ b/docs/versioned_docs/version-v0.1.0/02-Features/writing-different-telemetry-types.md @@ -9,12 +9,19 @@ Logs are a great way to gain insights, but sometimes they are not the best appro We provide the capability to track the following telemetry types on top of ILogger with good support on Serilog: -- [Dependencies](#dependencies) -- [Events](#events) -- [Metrics](#metrics) -- [Requests](#requests) - -For most optimal output, we recommend using our [Azure Application Insights sink](/features/sinks/azure-application-insights). +- [Write different telemetry types](#write-different-telemetry-types) + - [Installation](#installation) + - [Dependencies](#dependencies) + - [Measuring Azure Service Bus dependencies](#measuring-azure-service-bus-dependencies) + - [Measuring HTTP dependencies](#measuring-http-dependencies) + - [Measuring SQL dependencies](#measuring-sql-dependencies) + - [Measuring custom dependencies](#measuring-custom-dependencies) + - [Events](#events) + - [Security Events](#security-events) + - [Metrics](#metrics) + - [Requests](#requests) + +For most optimal output, we recommend using our [Azure Application Insights sink](./sinks/azure-application-insights.md). ## Installation @@ -28,13 +35,6 @@ PM > Install-Package Arcus.Observability.Telemetry.Core -Version 0.1.0 Dependencies allow you to track how your external dependencies are doing to give you insights on performance and error rate. -We provide support for the following dependencies: - -- [Azure Service Bus](#measuring-azure-service-bus-dependencies) -- [Custom](#measuring-custom-dependencies) -- [HTTP](#measuring-http-dependencies) -- [SQL](#measuring-sql-dependencies) - ### Measuring Azure Service Bus dependencies We allow you to measure Azure Service Bus dependencies for both queues & topics. @@ -190,7 +190,7 @@ using (var measurement = DependencyMeasurement.Start("get-products")) ### Measuring custom dependencies -Here is how you can areport a custom depenency: +Here is how you can measure a custom dependency: ```csharp using Microsoft.Extensions.Logging; @@ -277,7 +277,7 @@ var telemetryContext = new Dictionary {"OrderId", "OrderId was not in correct format"} }; -loger.LogSecurityEvent("Invalid Order", telemetryContext); +logger.LogSecurityEvent("Invalid Order", telemetryContext); // Output: "Events Invalid Order (Context: [EventType, Security], [OrderId, OrderId was not in correct format])" ``` diff --git a/docs/versioned_docs/version-v0.1.1/01-index.md b/docs/versioned_docs/version-v0.1.1/01-index.md index 715d20d2..22b26c6d 100644 --- a/docs/versioned_docs/version-v0.1.1/01-index.md +++ b/docs/versioned_docs/version-v0.1.1/01-index.md @@ -19,13 +19,13 @@ For more granular packages we recommend reading the documentation. # Features -- [Writing different telemetry types](/features/writing-different-telemetry-types) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. -- [Correlation](/features/correlation) - A common set of correlation levels. +- [Writing different telemetry types](./02-Features/writing-different-telemetry-types.md) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. +- [Correlation](./02-Features/correlation.md) - A common set of correlation levels. - Telemetry - - [Enrichment](/features/telemetry-enrichment) - A set of enrichers to improve telemetry information. - - [Filters](/features/telemetry-filter) - A set of filters to control telemetry flow with. + - [Enrichment](./02-Features/telemetry-enrichment.md) - A set of enrichers to improve telemetry information. + - [Filters](./02-Features/telemetry-filter.md) - A set of filters to control telemetry flow with. - Sinks - - [Azure Application Insights](/features/sinks/azure-application-insights) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights + - [Azure Application Insights](./02-Features/sinks/azure-application-insights.md) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights # License This is licensed under The MIT License (MIT). Which means that you can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the web application. But you always need to state that Codit is the original author of this web application. diff --git a/docs/versioned_docs/version-v0.1.1/02-Features/correlation.md b/docs/versioned_docs/version-v0.1.1/02-Features/correlation.md index c1ecd34d..3806deb7 100644 --- a/docs/versioned_docs/version-v0.1.1/02-Features/correlation.md +++ b/docs/versioned_docs/version-v0.1.1/02-Features/correlation.md @@ -45,7 +45,7 @@ namespace Application ``` ## Custom Correlation -We register two interfaces during the registration of the correlation: `ICorrealtionInfoAccessor` and `ICorrelationInfoAccessor<>`. +We register two interfaces during the registration of the correlation: `ICorrelationInfoAccessor` and `ICorrelationInfoAccessor<>`. The reason is because some applications require a custom `CorrelationInfo` model, and with using the generic interface `ICorrelationInfoAccessor<>` we can support this. **Example** @@ -191,7 +191,7 @@ namespace Application This custom options model can then be included when registering the correlation: ```csharp -using Microsoft.Excentions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; namespace Application { diff --git a/docs/versioned_docs/version-v0.1.1/02-Features/telemetry-enrichment.md b/docs/versioned_docs/version-v0.1.1/02-Features/telemetry-enrichment.md index b4b6fcad..e6532e84 100644 --- a/docs/versioned_docs/version-v0.1.1/02-Features/telemetry-enrichment.md +++ b/docs/versioned_docs/version-v0.1.1/02-Features/telemetry-enrichment.md @@ -7,10 +7,12 @@ layout: default We provide a variety of enrichers for Serilog: -- [Application Enricher](#application-enricher) -- [Correlation Enricher](#correlation-enricher) -- [Kubernetes Enricher](#kubernetes-enricher) -- [Version Enricher](#version-enricher) +- [Telemetry Enrichment](#telemetry-enrichment) + - [Installation](#installation) + - [Application Enricher](#application-enricher) + - [Correlation Enricher](#correlation-enricher) + - [Kubernetes Enricher](#kubernetes-enricher) + - [Version Enricher](#version-enricher) ## Installation diff --git a/docs/versioned_docs/version-v0.1.1/02-Features/telemetry-filter.md b/docs/versioned_docs/version-v0.1.1/02-Features/telemetry-filter.md index 71309ea0..05e1d1f1 100644 --- a/docs/versioned_docs/version-v0.1.1/02-Features/telemetry-filter.md +++ b/docs/versioned_docs/version-v0.1.1/02-Features/telemetry-filter.md @@ -42,7 +42,7 @@ ILogger logger = new LoggerConfiguration() Alternatively, you can explicitly specify if it should track telemetry or not based on the application configuration has to be tracked or not : ```csharp -var trackDependencies = configuration["telemetry:depenencies:isEnabled"]; +var trackDependencies = configuration["telemetry:dependencies:isEnabled"]; ILogger logger = new LoggerConfiguration() .WriteTo.AzureApplicationInsights("") .Filter.With(TelemetryTypeFilter.On(TelemetryType.Dependency, isTrackingEnabled: bool.Parse(trackDependencies))) diff --git a/docs/versioned_docs/version-v0.1.1/02-Features/writing-different-telemetry-types.md b/docs/versioned_docs/version-v0.1.1/02-Features/writing-different-telemetry-types.md index 16f1be04..ce306b7d 100644 --- a/docs/versioned_docs/version-v0.1.1/02-Features/writing-different-telemetry-types.md +++ b/docs/versioned_docs/version-v0.1.1/02-Features/writing-different-telemetry-types.md @@ -9,12 +9,19 @@ Logs are a great way to gain insights, but sometimes they are not the best appro We provide the capability to track the following telemetry types on top of ILogger with good support on Serilog: -- [Dependencies](#dependencies) -- [Events](#events) -- [Metrics](#metrics) -- [Requests](#requests) - -For most optimal output, we recommend using our [Azure Application Insights sink](/features/sinks/azure-application-insights). +- [Write different telemetry types](#write-different-telemetry-types) + - [Installation](#installation) + - [Dependencies](#dependencies) + - [Measuring Azure Service Bus dependencies](#measuring-azure-service-bus-dependencies) + - [Measuring HTTP dependencies](#measuring-http-dependencies) + - [Measuring SQL dependencies](#measuring-sql-dependencies) + - [Measuring custom dependencies](#measuring-custom-dependencies) + - [Events](#events) + - [Security Events](#security-events) + - [Metrics](#metrics) + - [Requests](#requests) + +For most optimal output, we recommend using our [Azure Application Insights sink](./sinks/azure-application-insights.md). ## Installation @@ -28,13 +35,6 @@ PM > Install-Package Arcus.Observability.Telemetry.Core -Version 0.1.0 Dependencies allow you to track how your external dependencies are doing to give you insights on performance and error rate. -We provide support for the following dependencies: - -- [Azure Service Bus](#measuring-azure-service-bus-dependencies) -- [Custom](#measuring-custom-dependencies) -- [HTTP](#measuring-http-dependencies) -- [SQL](#measuring-sql-dependencies) - ### Measuring Azure Service Bus dependencies We allow you to measure Azure Service Bus dependencies for both queues & topics. @@ -189,7 +189,7 @@ using (var measurement = DependencyMeasurement.Start("get-products")) ### Measuring custom dependencies -Here is how you can areport a custom depenency: +Here is how you can measure a custom dependency: ```csharp using Microsoft.Extensions.Logging; @@ -278,7 +278,7 @@ var telemetryContext = new Dictionary {"OrderId", "OrderId was not in correct format"} }; -loger.LogSecurityEvent("Invalid Order", telemetryContext); +logger.LogSecurityEvent("Invalid Order", telemetryContext); // Output: "Events Invalid Order (Context: [EventType, Security], [OrderId, OrderId was not in correct format])" ``` diff --git a/docs/versioned_docs/version-v0.2.0/01-index.md b/docs/versioned_docs/version-v0.2.0/01-index.md index ef9a512d..ce27e9c1 100644 --- a/docs/versioned_docs/version-v0.2.0/01-index.md +++ b/docs/versioned_docs/version-v0.2.0/01-index.md @@ -19,14 +19,14 @@ For more granular packages we recommend reading the documentation. # Features -- [Making telemetry more powerful](/features/making-telemetry-more-powerful) by making it simple to provide contextual information -- [Writing different telemetry types](/features/writing-different-telemetry-types) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. -- [Correlation](/features/correlation) - A common set of correlation levels. +- [Making telemetry more powerful](./02-Features/making-telemetry-more-powerful.md) by making it simple to provide contextual information +- [Writing different telemetry types](./02-Features/writing-different-telemetry-types.md) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. +- [Correlation](./02-Features/correlation.md) - A common set of correlation levels. - Telemetry - - [Enrichment](/features/telemetry-enrichment) - A set of enrichers to improve telemetry information. - - [Filters](/features/telemetry-filter) - A set of filters to control telemetry flow with. + - [Enrichment](./02-Features/telemetry-enrichment.md) - A set of enrichers to improve telemetry information. + - [Filters](./02-Features/telemetry-filter.md) - A set of filters to control telemetry flow with. - Sinks - - [Azure Application Insights](/features/sinks/azure-application-insights) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights + - [Azure Application Insights](./02-Features/sinks/azure-application-insights.md) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights # License This is licensed under The MIT License (MIT). Which means that you can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the web application. But you always need to state that Codit is the original author of this web application. diff --git a/docs/versioned_docs/version-v0.2.0/02-Features/correlation.md b/docs/versioned_docs/version-v0.2.0/02-Features/correlation.md index 485f0ab6..24548f56 100644 --- a/docs/versioned_docs/version-v0.2.0/02-Features/correlation.md +++ b/docs/versioned_docs/version-v0.2.0/02-Features/correlation.md @@ -192,7 +192,7 @@ namespace Application This custom options model can then be included when registering the correlation: ```csharp -using Microsoft.Excentions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; namespace Application { diff --git a/docs/versioned_docs/version-v0.2.0/02-Features/making-telemetry-more-powerful.md b/docs/versioned_docs/version-v0.2.0/02-Features/making-telemetry-more-powerful.md index 56426e68..d169feaa 100644 --- a/docs/versioned_docs/version-v0.2.0/02-Features/making-telemetry-more-powerful.md +++ b/docs/versioned_docs/version-v0.2.0/02-Features/making-telemetry-more-powerful.md @@ -25,7 +25,7 @@ logger.LogEvent("Order Created", telemetryContext); By doing so, you'll be able to interact more efficient with your logs by filtering, searching, ... on it. -We support this for all [telemetry types that you can write](/features/writing-different-telemetry-types). +We support this for all [telemetry types that you can write](./writing-different-telemetry-types.md). ### Seeing the power in action diff --git a/docs/versioned_docs/version-v0.2.0/02-Features/telemetry-enrichment.md b/docs/versioned_docs/version-v0.2.0/02-Features/telemetry-enrichment.md index 0b31adf4..318fd5be 100644 --- a/docs/versioned_docs/version-v0.2.0/02-Features/telemetry-enrichment.md +++ b/docs/versioned_docs/version-v0.2.0/02-Features/telemetry-enrichment.md @@ -7,10 +7,12 @@ layout: default We provide a variety of enrichers for Serilog: -- [Application Enricher](#application-enricher) -- [Correlation Enricher](#correlation-enricher) -- [Kubernetes Enricher](#kubernetes-enricher) -- [Version Enricher](#version-enricher) +- [Telemetry Enrichment](#telemetry-enrichment) + - [Installation](#installation) + - [Application Enricher](#application-enricher) + - [Correlation Enricher](#correlation-enricher) + - [Kubernetes Enricher](#kubernetes-enricher) + - [Version Enricher](#version-enricher) ## Installation diff --git a/docs/versioned_docs/version-v0.2.0/02-Features/telemetry-filter.md b/docs/versioned_docs/version-v0.2.0/02-Features/telemetry-filter.md index 533663e6..e42ac966 100644 --- a/docs/versioned_docs/version-v0.2.0/02-Features/telemetry-filter.md +++ b/docs/versioned_docs/version-v0.2.0/02-Features/telemetry-filter.md @@ -42,7 +42,7 @@ ILogger logger = new LoggerConfiguration() Alternatively, you can explicitly specify if it should track telemetry or not based on the application configuration has to be tracked or not : ```csharp -var trackDependencies = configuration["telemetry:depenencies:isEnabled"]; +var trackDependencies = configuration["telemetry:dependencies:isEnabled"]; ILogger logger = new LoggerConfiguration() .WriteTo.AzureApplicationInsights("") .Filter.With(TelemetryTypeFilter.On(TelemetryType.Dependency, isTrackingEnabled: bool.Parse(trackDependencies))) diff --git a/docs/versioned_docs/version-v0.2.0/02-Features/writing-different-telemetry-types.md b/docs/versioned_docs/version-v0.2.0/02-Features/writing-different-telemetry-types.md index ab65b3fb..1403e010 100644 --- a/docs/versioned_docs/version-v0.2.0/02-Features/writing-different-telemetry-types.md +++ b/docs/versioned_docs/version-v0.2.0/02-Features/writing-different-telemetry-types.md @@ -9,16 +9,29 @@ Logs are a great way to gain insights, but sometimes they are not the best appro We provide the capability to track the following telemetry types on top of ILogger with good support on Serilog: -- [Dependencies](#dependencies) -- [Events](#events) -- [Metrics](#metrics) -- [Requests](#requests) - -For most optimal output, we recommend using our [Azure Application Insights sink](/features/sinks/azure-application-insights). +- [Write different telemetry types](#write-different-telemetry-types) + - [Installation](#installation) + - [Dependencies](#dependencies) + - [Measuring Azure Blob Storage dependencies](#measuring-azure-blob-storage-dependencies) + - [Measuring Azure Cosmos DB dependencies](#measuring-azure-cosmos-db-dependencies) + - [Measuring Azure Event Hubs dependencies](#measuring-azure-event-hubs-dependencies) + - [Measuring Azure IoT Hub dependencies](#measuring-azure-iot-hub-dependencies) + - [Measuring Azure Service Bus dependencies](#measuring-azure-service-bus-dependencies) + - [Measuring Azure Table Storage Dependencies](#measuring-azure-table-storage-dependencies) + - [Measuring HTTP dependencies](#measuring-http-dependencies) + - [Measuring SQL dependencies](#measuring-sql-dependencies) + - [Measuring custom dependencies](#measuring-custom-dependencies) + - [Making it easier to measure dependencies](#making-it-easier-to-measure-dependencies) + - [Events](#events) + - [Security Events](#security-events) + - [Metrics](#metrics) + - [Requests](#requests) + +For most optimal output, we recommend using our [Azure Application Insights sink](./sinks/azure-application-insights.md). **We highly encourage to provide contextual information to all your telemetry** to make it more powerful and support this for all telemetry types. -> :bulb: For sake of simplicity we have not included how to track contextual information, for more information see [our documentation](/features/making-telemetry-more-powerful). +> :bulb: For sake of simplicity we have not included how to track contextual information, for more information see [our documentation](./making-telemetry-more-powerful.md). ## Installation @@ -32,18 +45,6 @@ PM > Install-Package Arcus.Observability.Telemetry.Core -Version 0.2.0 Dependencies allow you to track how your external dependencies are doing to give you insights on performance and error rate. -We provide support for the following dependencies: - -- [Azure Blob Storage](#measuring-azure-blob-storage-dependencies) -- [Azure Cosmos DB](#measuring-azure-cosmos-db-dependencies) -- [Azure Event Hubs](#measuring-azure-event-hubs-dependencies) -- [Azure IoT Hub](#measuring-azure-iot-hub-dependencies) -- [Azure Service Bus](#measuring-azure-service-bus-dependencies) -- [Azure Table Storage](#measuring-azure-table-storage-dependencies) -- [Custom](#measuring-custom-dependencies) -- [HTTP](#measuring-http-dependencies) -- [SQL](#measuring-sql-dependencies) - Since measuring dependencies can add some noise in your code, we've introduced `DependencyMeasurement` to make it simpler. ([docs](#making-it-easier-to-measure-dependencies)) ### Measuring Azure Blob Storage dependencies @@ -102,7 +103,7 @@ durationMeasurement.Start(); var startTime = DateTimeOffset.UtcNow; _logger.LogEventHubsDependency(namespaceName: "be.sensors.contoso", eventHubName: "temperature", isSuccessful: true, startTime: startTime, duration: durationMeasurement.Elapsed); -// Output: "Dependency Azure Event Hubs be.sensors.contoso named temerature in 00:00:00.2521801 at 03/23/2020 09:56:31 +00:00 (Successful: True - Context: )" +// Output: "Dependency Azure Event Hubs be.sensors.contoso named temperature in 00:00:00.2521801 at 03/23/2020 09:56:31 +00:00 (Successful: True - Context: )" ``` ### Measuring Azure IoT Hub dependencies @@ -230,7 +231,7 @@ _logger.LogSqlDependency(connectionString, "my-table", "get-products", isSuccess ### Measuring custom dependencies -Here is how you can areport a custom depenency: +Here is how you can measure a custom dependency: ```csharp using Microsoft.Extensions.Logging; @@ -309,7 +310,7 @@ Here is how an invalid `Order` can be reported: ```csharp using Microsoft.Extensions.Logging; -loger.LogSecurityEvent("Invalid Order"); +logger.LogSecurityEvent("Invalid Order"); // Output: "Events Invalid Order (Context: )" ``` diff --git a/docs/versioned_docs/version-v0.3/01-index.md b/docs/versioned_docs/version-v0.3/01-index.md index 88cb1b63..1b5e1f5f 100644 --- a/docs/versioned_docs/version-v0.3/01-index.md +++ b/docs/versioned_docs/version-v0.3/01-index.md @@ -19,18 +19,18 @@ For more granular packages we recommend reading the documentation. # Features -- [Making telemetry more powerful](/features/making-telemetry-more-powerful) by making it simple to provide contextual information -- [Writing different telemetry types](/features/writing-different-telemetry-types) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. -- [Correlation](/features/correlation) - A common set of correlation levels. +- [Making telemetry more powerful](./02-Features/making-telemetry-more-powerful.md) by making it simple to provide contextual information +- [Writing different telemetry types](./02-Features/writing-different-telemetry-types.md) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. +- [Correlation](./02-Features/correlation.md) - A common set of correlation levels. - Telemetry - - [Enrichment](/features/telemetry-enrichment) - A set of enrichers to improve telemetry information. - - [Filters](/features/telemetry-filter) - A set of filters to control telemetry flow with. + - [Enrichment](./02-Features/telemetry-enrichment.md) - A set of enrichers to improve telemetry information. + - [Filters](./02-Features/telemetry-filter.md) - A set of filters to control telemetry flow with. - Sinks - - [Azure Application Insights](/features/sinks/azure-application-insights) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights + - [Azure Application Insights](./02-Features/sinks/azure-application-insights.md) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights # Guidance -- [Using Arcus & Serilog in .NET Core and/or Azure Functions](/guidance/use-with-dotnet-and-functions) +- [Using Arcus & Serilog in .NET Core and/or Azure Functions](./03-Guidance/use-with-dotnet-and-functions.md) # License This is licensed under The MIT License (MIT). Which means that you can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the web application. But you always need to state that Codit is the original author of this web application. diff --git a/docs/versioned_docs/version-v0.3/02-Features/correlation.md b/docs/versioned_docs/version-v0.3/02-Features/correlation.md index 2f42496c..747a8887 100644 --- a/docs/versioned_docs/version-v0.3/02-Features/correlation.md +++ b/docs/versioned_docs/version-v0.3/02-Features/correlation.md @@ -45,7 +45,7 @@ namespace Application ``` ## Custom Correlation -We register two interfaces during the registration of the correlation: `ICorrealtionInfoAccessor` and `ICorrelationInfoAccessor<>`. +We register two interfaces during the registration of the correlation: `ICorrelationInfoAccessor` and `ICorrelationInfoAccessor<>`. The reason is because some applications require a custom `CorrelationInfo` model, and with using the generic interface `ICorrelationInfoAccessor<>` we can support this. **Example** diff --git a/docs/versioned_docs/version-v0.3/02-Features/making-telemetry-more-powerful.md b/docs/versioned_docs/version-v0.3/02-Features/making-telemetry-more-powerful.md index 56426e68..d169feaa 100644 --- a/docs/versioned_docs/version-v0.3/02-Features/making-telemetry-more-powerful.md +++ b/docs/versioned_docs/version-v0.3/02-Features/making-telemetry-more-powerful.md @@ -25,7 +25,7 @@ logger.LogEvent("Order Created", telemetryContext); By doing so, you'll be able to interact more efficient with your logs by filtering, searching, ... on it. -We support this for all [telemetry types that you can write](/features/writing-different-telemetry-types). +We support this for all [telemetry types that you can write](./writing-different-telemetry-types.md). ### Seeing the power in action diff --git a/docs/versioned_docs/version-v0.3/02-Features/telemetry-enrichment.md b/docs/versioned_docs/version-v0.3/02-Features/telemetry-enrichment.md index df075638..ee3d020f 100644 --- a/docs/versioned_docs/version-v0.3/02-Features/telemetry-enrichment.md +++ b/docs/versioned_docs/version-v0.3/02-Features/telemetry-enrichment.md @@ -7,10 +7,12 @@ layout: default We provide a variety of enrichers for Serilog: -- [Application Enricher](#application-enricher) -- [Correlation Enricher](#correlation-enricher) -- [Kubernetes Enricher](#kubernetes-enricher) -- [Version Enricher](#version-enricher) +- [Telemetry Enrichment](#telemetry-enrichment) + - [Installation](#installation) + - [Application Enricher](#application-enricher) + - [Correlation Enricher](#correlation-enricher) + - [Kubernetes Enricher](#kubernetes-enricher) + - [Version Enricher](#version-enricher) ## Installation @@ -23,7 +25,7 @@ PM > Install-Package Arcus.Observability.Telemetry.Serilog.Enrichers ## Application Enricher The `Arcus.Observability.Telemetry.Serilog.Enrichers` library provides a [Serilog enricher](https://github.com/serilog/serilog/wiki/Enrichment) -that adds the application's component name to the log event as a log property with the name `ComponentName` and gives the opportiunity to choose the location from where the application 'instance' should be retrieved. +that adds the application's component name to the log event as a log property with the name `ComponentName` and gives the opportunity to choose the location from where the application 'instance' should be retrieved. **Example** Name: `ComponentName` diff --git a/docs/versioned_docs/version-v0.3/02-Features/telemetry-filter.md b/docs/versioned_docs/version-v0.3/02-Features/telemetry-filter.md index 533663e6..e42ac966 100644 --- a/docs/versioned_docs/version-v0.3/02-Features/telemetry-filter.md +++ b/docs/versioned_docs/version-v0.3/02-Features/telemetry-filter.md @@ -42,7 +42,7 @@ ILogger logger = new LoggerConfiguration() Alternatively, you can explicitly specify if it should track telemetry or not based on the application configuration has to be tracked or not : ```csharp -var trackDependencies = configuration["telemetry:depenencies:isEnabled"]; +var trackDependencies = configuration["telemetry:dependencies:isEnabled"]; ILogger logger = new LoggerConfiguration() .WriteTo.AzureApplicationInsights("") .Filter.With(TelemetryTypeFilter.On(TelemetryType.Dependency, isTrackingEnabled: bool.Parse(trackDependencies))) diff --git a/docs/versioned_docs/version-v0.3/02-Features/writing-different-telemetry-types.md b/docs/versioned_docs/version-v0.3/02-Features/writing-different-telemetry-types.md index c4643d1e..dddffbfd 100644 --- a/docs/versioned_docs/version-v0.3/02-Features/writing-different-telemetry-types.md +++ b/docs/versioned_docs/version-v0.3/02-Features/writing-different-telemetry-types.md @@ -9,16 +9,29 @@ Logs are a great way to gain insights, but sometimes they are not the best appro We provide the capability to track the following telemetry types on top of ILogger with good support on Serilog: -- [Dependencies](#dependencies) -- [Events](#events) -- [Metrics](#metrics) -- [Requests](#requests) - -For most optimal output, we recommend using our [Azure Application Insights sink](/features/sinks/azure-application-insights). +- [Write different telemetry types](#write-different-telemetry-types) + - [Installation](#installation) + - [Dependencies](#dependencies) + - [Measuring Azure Blob Storage dependencies](#measuring-azure-blob-storage-dependencies) + - [Measuring Azure Cosmos DB dependencies](#measuring-azure-cosmos-db-dependencies) + - [Measuring Azure Event Hubs dependencies](#measuring-azure-event-hubs-dependencies) + - [Measuring Azure IoT Hub dependencies](#measuring-azure-iot-hub-dependencies) + - [Measuring Azure Service Bus dependencies](#measuring-azure-service-bus-dependencies) + - [Measuring Azure Table Storage Dependencies](#measuring-azure-table-storage-dependencies) + - [Measuring HTTP dependencies](#measuring-http-dependencies) + - [Measuring SQL dependencies](#measuring-sql-dependencies) + - [Measuring custom dependencies](#measuring-custom-dependencies) + - [Making it easier to measure dependencies](#making-it-easier-to-measure-dependencies) + - [Events](#events) + - [Security Events](#security-events) + - [Metrics](#metrics) + - [Requests](#requests) + +For most optimal output, we recommend using our [Azure Application Insights sink](./sinks/azure-application-insights.md). **We highly encourage to provide contextual information to all your telemetry** to make it more powerful and support this for all telemetry types. -> :bulb: For sake of simplicity we have not included how to track contextual information, for more information see [our documentation](/features/making-telemetry-more-powerful). +> :bulb: For sake of simplicity we have not included how to track contextual information, for more information see [our documentation](./making-telemetry-more-powerful.md). ## Installation @@ -32,18 +45,6 @@ PM > Install-Package Arcus.Observability.Telemetry.Core Dependencies allow you to track how your external dependencies are doing to give you insights on performance and error rate. -We provide support for the following dependencies: - -- [Azure Blob Storage](#measuring-azure-blob-storage-dependencies) -- [Azure Cosmos DB](#measuring-azure-cosmos-db-dependencies) -- [Azure Event Hubs](#measuring-azure-event-hubs-dependencies) -- [Azure IoT Hub](#measuring-azure-iot-hub-dependencies) -- [Azure Service Bus](#measuring-azure-service-bus-dependencies) -- [Azure Table Storage](#measuring-azure-table-storage-dependencies) -- [Custom](#measuring-custom-dependencies) -- [HTTP](#measuring-http-dependencies) -- [SQL](#measuring-sql-dependencies) - Since measuring dependencies can add some noise in your code, we've introduced `DependencyMeasurement` to make it simpler. ([docs](#making-it-easier-to-measure-dependencies)) ### Measuring Azure Blob Storage dependencies @@ -102,7 +103,7 @@ durationMeasurement.Start(); var startTime = DateTimeOffset.UtcNow; _logger.LogEventHubsDependency(namespaceName: "be.sensors.contoso", eventHubName: "temperature", isSuccessful: true, startTime: startTime, duration: durationMeasurement.Elapsed); -// Output: "Dependency Azure Event Hubs be.sensors.contoso named temerature in 00:00:00.2521801 at 03/23/2020 09:56:31 +00:00 (Successful: True - Context: )" +// Output: "Dependency Azure Event Hubs be.sensors.contoso named temperature in 00:00:00.2521801 at 03/23/2020 09:56:31 +00:00 (Successful: True - Context: )" ``` ### Measuring Azure IoT Hub dependencies @@ -126,7 +127,7 @@ _logger.logger.LogIotHubDependency(iotHubName: "sensors", isSuccessful: true, st // Output: "Dependency Azure IoT Hub named sensors in 00:00:00.2521801 at 03/23/2020 09:56:31 +00:00 (Successful: True - Context: )" ``` -Or, alternatively you can pass allong the IoT connection string itself so the host name will be selected for you. +Or, alternatively you can pass along the IoT connection string itself so the host name will be selected for you. **Installation** @@ -259,7 +260,7 @@ _logger.LogSqlDependency(connectionString, "my-table", "get-products", isSuccess ### Measuring custom dependencies -Here is how you can areport a custom depenency: +Here is how you can measure a custom dependency: ```csharp using Microsoft.Extensions.Logging; @@ -360,7 +361,7 @@ Here is how an invalid `Order` can be reported: ```csharp using Microsoft.Extensions.Logging; -loger.LogSecurityEvent("Invalid Order"); +logger.LogSecurityEvent("Invalid Order"); // Output: "Events Invalid Order (Context: )" ``` diff --git a/docs/versioned_docs/version-v0.4/01-index.md b/docs/versioned_docs/version-v0.4/01-index.md index 913a9619..e34d63f0 100644 --- a/docs/versioned_docs/version-v0.4/01-index.md +++ b/docs/versioned_docs/version-v0.4/01-index.md @@ -19,18 +19,18 @@ For more granular packages we recommend reading the documentation. # Features -- [Making telemetry more powerful](/features/making-telemetry-more-powerful) by making it simple to provide contextual information -- [Writing different telemetry types](/features/writing-different-telemetry-types) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. -- [Correlation](/features/correlation) - A common set of correlation levels. +- [Making telemetry more powerful](./02-Features/making-telemetry-more-powerful.md) by making it simple to provide contextual information +- [Writing different telemetry types](./02-Features/writing-different-telemetry-types.md) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. +- [Correlation](./02-Features/correlation.md) - A common set of correlation levels. - Telemetry - - [Enrichment](/features/telemetry-enrichment) - A set of enrichers to improve telemetry information. - - [Filters](/features/telemetry-filter) - A set of filters to control telemetry flow with. + - [Enrichment](./02-Features/telemetry-enrichment.md) - A set of enrichers to improve telemetry information. + - [Filters](./02-Features/telemetry-filter.md) - A set of filters to control telemetry flow with. - Sinks - - [Azure Application Insights](/features/sinks/azure-application-insights) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights + - [Azure Application Insights](./02-Features/sinks/azure-application-insights.md) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights # Guidance -- [Using Arcus & Serilog in .NET Core and/or Azure Functions](/guidance/use-with-dotnet-and-functions) +- [Using Arcus & Serilog in .NET Core and/or Azure Functions](./03-Guidance/use-with-dotnet-and-functions.md) # License This is licensed under The MIT License (MIT). Which means that you can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the web application. But you always need to state that Codit is the original author of this web application. diff --git a/docs/versioned_docs/version-v0.4/02-Features/correlation.md b/docs/versioned_docs/version-v0.4/02-Features/correlation.md index 637be1d9..5a1b8e1a 100644 --- a/docs/versioned_docs/version-v0.4/02-Features/correlation.md +++ b/docs/versioned_docs/version-v0.4/02-Features/correlation.md @@ -45,7 +45,7 @@ namespace Application ``` ## Custom Correlation -We register two interfaces during the registration of the correlation: `ICorrealtionInfoAccessor` and `ICorrelationInfoAccessor<>`. +We register two interfaces during the registration of the correlation: `ICorrelationInfoAccessor` and `ICorrelationInfoAccessor<>`. The reason is because some applications require a custom `CorrelationInfo` model, and with using the generic interface `ICorrelationInfoAccessor<>` we can support this. **Example** @@ -191,7 +191,7 @@ namespace Application This custom options model can then be included when registering the correlation: ```csharp -using Microsoft.Excentions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; namespace Application { diff --git a/docs/versioned_docs/version-v0.4/02-Features/making-telemetry-more-powerful.md b/docs/versioned_docs/version-v0.4/02-Features/making-telemetry-more-powerful.md index 56426e68..d169feaa 100644 --- a/docs/versioned_docs/version-v0.4/02-Features/making-telemetry-more-powerful.md +++ b/docs/versioned_docs/version-v0.4/02-Features/making-telemetry-more-powerful.md @@ -25,7 +25,7 @@ logger.LogEvent("Order Created", telemetryContext); By doing so, you'll be able to interact more efficient with your logs by filtering, searching, ... on it. -We support this for all [telemetry types that you can write](/features/writing-different-telemetry-types). +We support this for all [telemetry types that you can write](./writing-different-telemetry-types.md). ### Seeing the power in action diff --git a/docs/versioned_docs/version-v0.4/02-Features/telemetry-enrichment.md b/docs/versioned_docs/version-v0.4/02-Features/telemetry-enrichment.md index b083b850..cf71c023 100644 --- a/docs/versioned_docs/version-v0.4/02-Features/telemetry-enrichment.md +++ b/docs/versioned_docs/version-v0.4/02-Features/telemetry-enrichment.md @@ -7,10 +7,17 @@ layout: default We provide a variety of enrichers for Serilog: -- [Application Enricher](#application-enricher) -- [Correlation Enricher](#correlation-enricher) -- [Kubernetes Enricher](#kubernetes-enricher) -- [Version Enricher](#version-enricher) +- [Telemetry Enrichment](#telemetry-enrichment) + - [Installation](#installation) + - [Application Enricher](#application-enricher) + - [Custom Serilog property names](#custom-serilog-property-names) + - [Correlation Enricher](#correlation-enricher) + - [Custom Serilog property names](#custom-serilog-property-names-1) + - [Kubernetes Enricher](#kubernetes-enricher) + - [Custom Serilog property names](#custom-serilog-property-names-2) + - [Version Enricher](#version-enricher) + - [Custom application version](#custom-application-version) + - [Custom Serilog property names](#custom-serilog-property-names-3) ## Installation @@ -23,7 +30,7 @@ PM > Install-Package Arcus.Observability.Telemetry.Serilog.Enrichers ## Application Enricher The `Arcus.Observability.Telemetry.Serilog.Enrichers` library provides a [Serilog enricher](https://github.com/serilog/serilog/wiki/Enrichment) -that adds the application's component name to the log event as a log property with the name `ComponentName` and gives the opportiunity to choose the location from where the application 'instance' should be retrieved. +that adds the application's component name to the log event as a log property with the name `ComponentName` and gives the opportunity to choose the location from where the application 'instance' should be retrieved. **Example** Name: `ComponentName` @@ -42,7 +49,7 @@ logger.Information("Some event"); // Output: Some event {ComponentName: My application component, MachineName: MyComputer} ``` -Or, alternatively one can choose to use the Kubernetes information which our [Application Insights](./sinks/azure-application-insights) sink will prioritize above the `MachineName` when determining the telemetry `Cloud.RoleInstance`. +Or, alternatively one can choose to use the Kubernetes information which our [Application Insights](./sinks/azure-application-insights.md) sink will prioritize above the `MachineName` when determining the telemetry `Cloud.RoleInstance`. ```csharp using Serilog; @@ -250,7 +257,7 @@ logger.Information("Some event"); ### Custom application version -The version enricher allows you to specify an `IAppVersion` instance that retrieves your custom application version, which will be used during enrichement. +The version enricher allows you to specify an `IAppVersion` instance that retrieves your custom application version, which will be used during enrichment. By default this is set to the version of the current executing assembly. ```csharp @@ -268,7 +275,7 @@ logger.Information("Some event"); ### Custom Serilog property names -The version enricher allows you to specify the name of the property that will be added to the log event during enrichement. +The version enricher allows you to specify the name of the property that will be added to the log event during enrichment. By default this is set to `version`. ```csharp diff --git a/docs/versioned_docs/version-v0.4/02-Features/telemetry-filter.md b/docs/versioned_docs/version-v0.4/02-Features/telemetry-filter.md index 533663e6..e42ac966 100644 --- a/docs/versioned_docs/version-v0.4/02-Features/telemetry-filter.md +++ b/docs/versioned_docs/version-v0.4/02-Features/telemetry-filter.md @@ -42,7 +42,7 @@ ILogger logger = new LoggerConfiguration() Alternatively, you can explicitly specify if it should track telemetry or not based on the application configuration has to be tracked or not : ```csharp -var trackDependencies = configuration["telemetry:depenencies:isEnabled"]; +var trackDependencies = configuration["telemetry:dependencies:isEnabled"]; ILogger logger = new LoggerConfiguration() .WriteTo.AzureApplicationInsights("") .Filter.With(TelemetryTypeFilter.On(TelemetryType.Dependency, isTrackingEnabled: bool.Parse(trackDependencies))) diff --git a/docs/versioned_docs/version-v0.4/02-Features/writing-different-telemetry-types.md b/docs/versioned_docs/version-v0.4/02-Features/writing-different-telemetry-types.md index b7c9adf6..019f5d23 100644 --- a/docs/versioned_docs/version-v0.4/02-Features/writing-different-telemetry-types.md +++ b/docs/versioned_docs/version-v0.4/02-Features/writing-different-telemetry-types.md @@ -9,16 +9,29 @@ Logs are a great way to gain insights, but sometimes they are not the best appro We provide the capability to track the following telemetry types on top of ILogger with good support on Serilog: -- [Dependencies](#dependencies) -- [Events](#events) -- [Metrics](#metrics) -- [Requests](#requests) - -For most optimal output, we recommend using our [Azure Application Insights sink](/features/sinks/azure-application-insights). +- [Write different telemetry types](#write-different-telemetry-types) + - [Installation](#installation) + - [Dependencies](#dependencies) + - [Measuring Azure Blob Storage dependencies](#measuring-azure-blob-storage-dependencies) + - [Measuring Azure Cosmos DB dependencies](#measuring-azure-cosmos-db-dependencies) + - [Measuring Azure Event Hubs dependencies](#measuring-azure-event-hubs-dependencies) + - [Measuring Azure IoT Hub dependencies](#measuring-azure-iot-hub-dependencies) + - [Measuring Azure Search dependencies](#measuring-azure-search-dependencies) + - [Measuring Azure Table Storage Dependencies](#measuring-azure-table-storage-dependencies) + - [Measuring HTTP dependencies](#measuring-http-dependencies) + - [Measuring SQL dependencies](#measuring-sql-dependencies) + - [Measuring custom dependencies](#measuring-custom-dependencies) + - [Making it easier to measure dependencies](#making-it-easier-to-measure-dependencies) + - [Events](#events) + - [Security Events](#security-events) + - [Metrics](#metrics) + - [Requests](#requests) + +For most optimal output, we recommend using our [Azure Application Insights sink](./sinks/azure-application-insights.md). **We highly encourage to provide contextual information to all your telemetry** to make it more powerful and support this for all telemetry types. -> :bulb: For sake of simplicity we have not included how to track contextual information, for more information see [our documentation](/features/making-telemetry-more-powerful). +> :bulb: For sake of simplicity we have not included how to track contextual information, for more information see [our documentation](./making-telemetry-more-powerful.md). ## Installation @@ -32,19 +45,6 @@ PM > Install-Package Arcus.Observability.Telemetry.Core Dependencies allow you to track how your external dependencies are doing to give you insights on performance and error rate. -We provide support for the following dependencies: - -- [Azure Blob Storage](#measuring-azure-blob-storage-dependencies) -- [Azure Cosmos DB](#measuring-azure-cosmos-db-dependencies) -- [Azure Event Hubs](#measuring-azure-event-hubs-dependencies) -- [Azure IoT Hub](#measuring-azure-iot-hub-dependencies) -- [Azure Search](#measuring-azure-search-dependencies) -- [Azure Service Bus](#measuring-azure-service-bus-dependencies) -- [Azure Table Storage](#measuring-azure-table-storage-dependencies) -- [Custom](#measuring-custom-dependencies) -- [HTTP](#measuring-http-dependencies) -- [SQL](#measuring-sql-dependencies) - Since measuring dependencies can add some noise in your code, we've introduced `DependencyMeasurement` to make it simpler. ([docs](#making-it-easier-to-measure-dependencies)) ### Measuring Azure Blob Storage dependencies @@ -103,7 +103,7 @@ durationMeasurement.Start(); var startTime = DateTimeOffset.UtcNow; _logger.LogEventHubsDependency(namespaceName: "be.sensors.contoso", eventHubName: "temperature", isSuccessful: true, startTime: startTime, duration: durationMeasurement.Elapsed); -// Output: "Dependency Azure Event Hubs be.sensors.contoso named temerature in 00:00:00.2521801 at 03/23/2020 09:56:31 +00:00 (Successful: True - Context: )" +// Output: "Dependency Azure Event Hubs be.sensors.contoso named temperature in 00:00:00.2521801 at 03/23/2020 09:56:31 +00:00 (Successful: True - Context: )" ``` ### Measuring Azure IoT Hub dependencies @@ -127,7 +127,7 @@ _logger.logger.LogIotHubDependency(iotHubName: "sensors", isSuccessful: true, st // Output: "Dependency Azure IoT Hub named sensors in 00:00:00.2521801 at 03/23/2020 09:56:31 +00:00 (Successful: True - Context: )" ``` -Or, alternatively you can pass allong the IoT connection string itself so the host name will be selected for you. +Or, alternatively you can pass along the IoT connection string itself so the host name will be selected for you. **Installation** @@ -156,7 +156,7 @@ _logger.logger.LogIotHubDependency(iotHubConnectionString: "Hostname=sensors;", ### Measuring Azure Search dependencies -We allow you to measure Azure Search depdendencies for cognetive services. +We allow you to measure Azure Search dependencies for cognitive services. Here is how you can report an Azure Search dependency: @@ -278,7 +278,7 @@ _logger.LogSqlDependency(connectionString, "my-table", "get-products", isSuccess ### Measuring custom dependencies -Here is how you can areport a custom depenency: +Here is how you can measure a custom dependency: ```csharp using Microsoft.Extensions.Logging; @@ -379,7 +379,7 @@ Here is how an invalid `Order` can be reported: ```csharp using Microsoft.Extensions.Logging; -loger.LogSecurityEvent("Invalid Order"); +logger.LogSecurityEvent("Invalid Order"); // Output: "Events Invalid Order (Context: )" ``` diff --git a/docs/versioned_docs/version-v1.0/01-index.md b/docs/versioned_docs/version-v1.0/01-index.md index 30a8b6b6..e41c3633 100644 --- a/docs/versioned_docs/version-v1.0/01-index.md +++ b/docs/versioned_docs/version-v1.0/01-index.md @@ -19,18 +19,18 @@ For more granular packages we recommend reading the documentation. # Features -- [Making telemetry more powerful](/features/making-telemetry-more-powerful) by making it simple to provide contextual information -- [Writing different telemetry types](/features/writing-different-telemetry-types) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. -- [Correlation](/features/correlation) - A common set of correlation levels. +- [Making telemetry more powerful](./02-Features/making-telemetry-more-powerful.md) by making it simple to provide contextual information +- [Writing different telemetry types](./02-Features/writing-different-telemetry-types.md) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. +- [Correlation](./02-Features/correlation.md) - A common set of correlation levels. - Telemetry - - [Enrichment](/features/telemetry-enrichment) - A set of enrichers to improve telemetry information. - - [Filters](/features/telemetry-filter) - A set of filters to control telemetry flow with. + - [Enrichment](./02-Features/telemetry-enrichment.md) - A set of enrichers to improve telemetry information. + - [Filters](./02-Features/telemetry-filter.md) - A set of filters to control telemetry flow with. - Sinks - - [Azure Application Insights](/features/sinks/azure-application-insights) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights + - [Azure Application Insights](./02-Features/sinks/azure-application-insights.md) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights # Guidance -- [Using Arcus & Serilog in .NET Core and/or Azure Functions](/guidance/use-with-dotnet-and-functions) +- [Using Arcus & Serilog in .NET Core and/or Azure Functions](./03-Guidance/use-with-dotnet-and-functions.md) # License This is licensed under The MIT License (MIT). Which means that you can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the web application. But you always need to state that Codit is the original author of this web application. diff --git a/docs/versioned_docs/version-v1.0/02-Features/correlation.md b/docs/versioned_docs/version-v1.0/02-Features/correlation.md index 2f42496c..adbe904c 100644 --- a/docs/versioned_docs/version-v1.0/02-Features/correlation.md +++ b/docs/versioned_docs/version-v1.0/02-Features/correlation.md @@ -45,7 +45,7 @@ namespace Application ``` ## Custom Correlation -We register two interfaces during the registration of the correlation: `ICorrealtionInfoAccessor` and `ICorrelationInfoAccessor<>`. +We register two interfaces during the registration of the correlation: `ICorrelationInfoAccessor` and `ICorrelationInfoAccessor<>`. The reason is because some applications require a custom `CorrelationInfo` model, and with using the generic interface `ICorrelationInfoAccessor<>` we can support this. **Example** @@ -191,7 +191,7 @@ namespace Application This custom options model can then be included when registering the correlation: ```csharp -using Microsoft.Excentions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; namespace Application { diff --git a/docs/versioned_docs/version-v1.0/02-Features/making-telemetry-more-powerful.md b/docs/versioned_docs/version-v1.0/02-Features/making-telemetry-more-powerful.md index 56426e68..d169feaa 100644 --- a/docs/versioned_docs/version-v1.0/02-Features/making-telemetry-more-powerful.md +++ b/docs/versioned_docs/version-v1.0/02-Features/making-telemetry-more-powerful.md @@ -25,7 +25,7 @@ logger.LogEvent("Order Created", telemetryContext); By doing so, you'll be able to interact more efficient with your logs by filtering, searching, ... on it. -We support this for all [telemetry types that you can write](/features/writing-different-telemetry-types). +We support this for all [telemetry types that you can write](./writing-different-telemetry-types.md). ### Seeing the power in action diff --git a/docs/versioned_docs/version-v1.0/02-Features/telemetry-enrichment.md b/docs/versioned_docs/version-v1.0/02-Features/telemetry-enrichment.md index 90e5f777..9e043ece 100644 --- a/docs/versioned_docs/version-v1.0/02-Features/telemetry-enrichment.md +++ b/docs/versioned_docs/version-v1.0/02-Features/telemetry-enrichment.md @@ -7,10 +7,17 @@ layout: default We provide a variety of enrichers for Serilog: -- [Application Enricher](#application-enricher) -- [Correlation Enricher](#correlation-enricher) -- [Kubernetes Enricher](#kubernetes-enricher) -- [Version Enricher](#version-enricher) +- [Telemetry Enrichment](#telemetry-enrichment) + - [Installation](#installation) + - [Application Enricher](#application-enricher) + - [Custom Serilog property names](#custom-serilog-property-names) + - [Correlation Enricher](#correlation-enricher) + - [Custom Serilog property names](#custom-serilog-property-names-1) + - [Kubernetes Enricher](#kubernetes-enricher) + - [Custom Serilog property names](#custom-serilog-property-names-2) + - [Version Enricher](#version-enricher) + - [Custom application version](#custom-application-version) + - [Custom Serilog property names](#custom-serilog-property-names-3) ## Installation @@ -23,7 +30,7 @@ PM > Install-Package Arcus.Observability.Telemetry.Serilog.Enrichers ## Application Enricher The `Arcus.Observability.Telemetry.Serilog.Enrichers` library provides a [Serilog enricher](https://github.com/serilog/serilog/wiki/Enrichment) -that adds the application's component name to the log event as a log property with the name `ComponentName` and gives the opportiunity to choose the location from where the application 'instance' should be retrieved. +that adds the application's component name to the log event as a log property with the name `ComponentName` and gives the opportunity to choose the location from where the application 'instance' should be retrieved. **Example** Name: `ComponentName` @@ -42,7 +49,7 @@ logger.Information("Some event"); // Output: Some event {ComponentName: My application component, MachineName: MyComputer} ``` -Or, alternatively one can choose to use the Kubernetes information which our [Application Insights](./sinks/azure-application-insights) sink will prioritize above the `MachineName` when determining the telemetry `Cloud.RoleInstance`. +Or, alternatively one can choose to use the Kubernetes information which our [Application Insights](./sinks/azure-application-insights.md) sink will prioritize above the `MachineName` when determining the telemetry `Cloud.RoleInstance`. ```csharp using Serilog; @@ -250,7 +257,7 @@ logger.Information("Some event"); ### Custom application version -The version enricher allows you to specify an `IAppVersion` instance that retrieves your custom application version, which will be used during enrichement. +The version enricher allows you to specify an `IAppVersion` instance that retrieves your custom application version, which will be used during enrichment. By default this is set to the version of the current executing assembly. **Assembly version as application version** @@ -319,7 +326,7 @@ ILogger logger = new LoggerConfiguration() ### Custom Serilog property names -The version enricher allows you to specify the name of the property that will be added to the log event during enrichement. +The version enricher allows you to specify the name of the property that will be added to the log event during enrichment. By default this is set to `version`. ```csharp diff --git a/docs/versioned_docs/version-v1.0/02-Features/telemetry-filter.md b/docs/versioned_docs/version-v1.0/02-Features/telemetry-filter.md index 533663e6..e42ac966 100644 --- a/docs/versioned_docs/version-v1.0/02-Features/telemetry-filter.md +++ b/docs/versioned_docs/version-v1.0/02-Features/telemetry-filter.md @@ -42,7 +42,7 @@ ILogger logger = new LoggerConfiguration() Alternatively, you can explicitly specify if it should track telemetry or not based on the application configuration has to be tracked or not : ```csharp -var trackDependencies = configuration["telemetry:depenencies:isEnabled"]; +var trackDependencies = configuration["telemetry:dependencies:isEnabled"]; ILogger logger = new LoggerConfiguration() .WriteTo.AzureApplicationInsights("") .Filter.With(TelemetryTypeFilter.On(TelemetryType.Dependency, isTrackingEnabled: bool.Parse(trackDependencies))) diff --git a/docs/versioned_docs/version-v1.0/02-Features/writing-different-telemetry-types.md b/docs/versioned_docs/version-v1.0/02-Features/writing-different-telemetry-types.md index 32c98aef..7fd12f19 100644 --- a/docs/versioned_docs/version-v1.0/02-Features/writing-different-telemetry-types.md +++ b/docs/versioned_docs/version-v1.0/02-Features/writing-different-telemetry-types.md @@ -9,16 +9,29 @@ Logs are a great way to gain insights, but sometimes they are not the best appro We provide the capability to track the following telemetry types on top of ILogger with good support on Serilog: -- [Dependencies](#dependencies) -- [Events](#events) -- [Metrics](#metrics) -- [Requests](#requests) - -For most optimal output, we recommend using our [Azure Application Insights sink](/features/sinks/azure-application-insights). +- [Write different telemetry types](#write-different-telemetry-types) + - [Installation](#installation) + - [Dependencies](#dependencies) + - [Measuring Azure Blob Storage dependencies](#measuring-azure-blob-storage-dependencies) + - [Measuring Azure Cosmos DB dependencies](#measuring-azure-cosmos-db-dependencies) + - [Measuring Azure Event Hubs dependencies](#measuring-azure-event-hubs-dependencies) + - [Measuring Azure IoT Hub dependencies](#measuring-azure-iot-hub-dependencies) + - [Measuring Azure Search dependencies](#measuring-azure-search-dependencies) + - [Measuring Azure Table Storage Dependencies](#measuring-azure-table-storage-dependencies) + - [Measuring HTTP dependencies](#measuring-http-dependencies) + - [Measuring SQL dependencies](#measuring-sql-dependencies) + - [Measuring custom dependencies](#measuring-custom-dependencies) + - [Making it easier to measure dependencies](#making-it-easier-to-measure-dependencies) + - [Events](#events) + - [Security Events](#security-events) + - [Metrics](#metrics) + - [Requests](#requests) + +For most optimal output, we recommend using our [Azure Application Insights sink](./sinks/azure-application-insights.md). **We highly encourage to provide contextual information to all your telemetry** to make it more powerful and support this for all telemetry types. -> :bulb: For sake of simplicity we have not included how to track contextual information, for more information see [our documentation](/features/making-telemetry-more-powerful). +> :bulb: For sake of simplicity we have not included how to track contextual information, for more information see [our documentation](./making-telemetry-more-powerful.md). ## Installation @@ -32,19 +45,6 @@ PM > Install-Package Arcus.Observability.Telemetry.Core Dependencies allow you to track how your external dependencies are doing to give you insights on performance and error rate. -We provide support for the following dependencies: - -- [Azure Blob Storage](#measuring-azure-blob-storage-dependencies) -- [Azure Cosmos DB](#measuring-azure-cosmos-db-dependencies) -- [Azure Event Hubs](#measuring-azure-event-hubs-dependencies) -- [Azure IoT Hub](#measuring-azure-iot-hub-dependencies) -- [Azure Search](#measuring-azure-search-dependencies) -- [Azure Service Bus](#measuring-azure-service-bus-dependencies) -- [Azure Table Storage](#measuring-azure-table-storage-dependencies) -- [Custom](#measuring-custom-dependencies) -- [HTTP](#measuring-http-dependencies) -- [SQL](#measuring-sql-dependencies) - Since measuring dependencies can add some noise in your code, we've introduced `DependencyMeasurement` to make it simpler. ([docs](#making-it-easier-to-measure-dependencies)) ### Measuring Azure Blob Storage dependencies @@ -97,7 +97,7 @@ durationMeasurement.Start(); var startTime = DateTimeOffset.UtcNow; _logger.LogEventHubsDependency(namespaceName: "be.sensors.contoso", eventHubName: "temperature", isSuccessful: true, startTime: startTime, duration: durationMeasurement.Elapsed); -// Output: "Dependency Azure Event Hubs be.sensors.contoso named temerature in 00:00:00.2521801 at 03/23/2020 09:56:31 +00:00 (Successful: True - Context: )" +// Output: "Dependency Azure Event Hubs be.sensors.contoso named temperature in 00:00:00.2521801 at 03/23/2020 09:56:31 +00:00 (Successful: True - Context: )" ``` ### Measuring Azure IoT Hub dependencies @@ -119,7 +119,7 @@ _logger.logger.LogIotHubDependency(iotHubName: "sensors", isSuccessful: true, st // Output: "Dependency Azure IoT Hub named sensors in 00:00:00.2521801 at 03/23/2020 09:56:31 +00:00 (Successful: True - Context: )" ``` -Or, alternatively you can pass allong the IoT connection string itself so the host name will be selected for you. +Or, alternatively you can pass along the IoT connection string itself so the host name will be selected for you. **Installation** @@ -146,7 +146,7 @@ _logger.logger.LogIotHubDependency(iotHubConnectionString: "Hostname=sensors;", ### Measuring Azure Search dependencies -We allow you to measure Azure Search depdendencies for cognetive services. +We allow you to measure Azure Search dependencies for cognitive services. Here is how you can report an Azure Search dependency: @@ -266,7 +266,7 @@ _logger.LogSqlDependency(connectionString, "my-table", "get-products", isSuccess ### Measuring custom dependencies -Here is how you can areport a custom depenency: +Here is how you can measure a custom dependency: ```csharp var durationMeasurement = new Stopwatch(); @@ -354,7 +354,7 @@ Some events are considered "security events" when they relate to possible malici Here is how an invalid `Order` can be reported: ```csharp -loger.LogSecurityEvent("Invalid Order"); +logger.LogSecurityEvent("Invalid Order"); // Output: "Events Invalid Order (Context: )" ``` diff --git a/docs/versioned_docs/version-v2.0/01-index.md b/docs/versioned_docs/version-v2.0/01-index.md index eead16b7..1d7684e1 100644 --- a/docs/versioned_docs/version-v2.0/01-index.md +++ b/docs/versioned_docs/version-v2.0/01-index.md @@ -19,18 +19,18 @@ For more granular packages we recommend reading the documentation. # Features -- [Making telemetry more powerful](/features/making-telemetry-more-powerful) by making it simple to provide contextual information -- [Writing different telemetry types](/features/writing-different-telemetry-types) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. -- [Correlation](/features/correlation) - A common set of correlation levels. +- [Making telemetry more powerful](./02-Features/making-telemetry-more-powerful.md) by making it simple to provide contextual information +- [Writing different telemetry types](./02-Features/writing-different-telemetry-types.md) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. +- [Correlation](./02-Features/correlation.md) - A common set of correlation levels. - Telemetry - - [Enrichment](/features/telemetry-enrichment) - A set of enrichers to improve telemetry information. - - [Filters](/features/telemetry-filter) - A set of filters to control telemetry flow with. + - [Enrichment](./02-Features/telemetry-enrichment.md) - A set of enrichers to improve telemetry information. + - [Filters](./02-Features/telemetry-filter.md) - A set of filters to control telemetry flow with. - Sinks - - [Azure Application Insights](/features/sinks/azure-application-insights) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights + - [Azure Application Insights](./02-Features/sinks/azure-application-insights.md) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights # Guidance -- [Using Arcus & Serilog in .NET Core and/or Azure Functions](/guidance/use-with-dotnet-and-functions) +- [Using Arcus & Serilog in .NET Core and/or Azure Functions](./03-Guidance/use-with-dotnet-and-functions.md) # License This is licensed under The MIT License (MIT). Which means that you can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the web application. But you always need to state that Codit is the original author of this web application. diff --git a/docs/versioned_docs/version-v2.0/02-Features/correlation.md b/docs/versioned_docs/version-v2.0/02-Features/correlation.md index 2f42496c..adbe904c 100644 --- a/docs/versioned_docs/version-v2.0/02-Features/correlation.md +++ b/docs/versioned_docs/version-v2.0/02-Features/correlation.md @@ -45,7 +45,7 @@ namespace Application ``` ## Custom Correlation -We register two interfaces during the registration of the correlation: `ICorrealtionInfoAccessor` and `ICorrelationInfoAccessor<>`. +We register two interfaces during the registration of the correlation: `ICorrelationInfoAccessor` and `ICorrelationInfoAccessor<>`. The reason is because some applications require a custom `CorrelationInfo` model, and with using the generic interface `ICorrelationInfoAccessor<>` we can support this. **Example** @@ -191,7 +191,7 @@ namespace Application This custom options model can then be included when registering the correlation: ```csharp -using Microsoft.Excentions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; namespace Application { diff --git a/docs/versioned_docs/version-v2.0/02-Features/making-telemetry-more-powerful.md b/docs/versioned_docs/version-v2.0/02-Features/making-telemetry-more-powerful.md index 56426e68..d169feaa 100644 --- a/docs/versioned_docs/version-v2.0/02-Features/making-telemetry-more-powerful.md +++ b/docs/versioned_docs/version-v2.0/02-Features/making-telemetry-more-powerful.md @@ -25,7 +25,7 @@ logger.LogEvent("Order Created", telemetryContext); By doing so, you'll be able to interact more efficient with your logs by filtering, searching, ... on it. -We support this for all [telemetry types that you can write](/features/writing-different-telemetry-types). +We support this for all [telemetry types that you can write](./writing-different-telemetry-types.md). ### Seeing the power in action diff --git a/docs/versioned_docs/version-v2.0/02-Features/telemetry-enrichment.md b/docs/versioned_docs/version-v2.0/02-Features/telemetry-enrichment.md index de7e98ae..ea90ca9e 100644 --- a/docs/versioned_docs/version-v2.0/02-Features/telemetry-enrichment.md +++ b/docs/versioned_docs/version-v2.0/02-Features/telemetry-enrichment.md @@ -7,10 +7,17 @@ layout: default We provide a variety of enrichers for Serilog: -- [Application Enricher](#application-enricher) -- [Correlation Enricher](#correlation-enricher) -- [Kubernetes Enricher](#kubernetes-enricher) -- [Version Enricher](#version-enricher) +- [Telemetry Enrichment](#telemetry-enrichment) + - [Installation](#installation) + - [Application Enricher](#application-enricher) + - [Custom Serilog property names](#custom-serilog-property-names) + - [Correlation Enricher](#correlation-enricher) + - [Custom Serilog property names](#custom-serilog-property-names-1) + - [Kubernetes Enricher](#kubernetes-enricher) + - [Custom Serilog property names](#custom-serilog-property-names-2) + - [Version Enricher](#version-enricher) + - [Custom application version](#custom-application-version) + - [Custom Serilog property names](#custom-serilog-property-names-3) ## Installation @@ -23,7 +30,7 @@ PM > Install-Package Arcus.Observability.Telemetry.Serilog.Enrichers ## Application Enricher The `Arcus.Observability.Telemetry.Serilog.Enrichers` library provides a [Serilog enricher](https://github.com/serilog/serilog/wiki/Enrichment) -that adds the application's component name to the log event as a log property with the name `ComponentName` and gives the opportiunity to choose the location from where the application 'instance' should be retrieved. +that adds the application's component name to the log event as a log property with the name `ComponentName` and gives the opportunity to choose the location from where the application 'instance' should be retrieved. **Example** Name: `ComponentName` @@ -42,7 +49,7 @@ logger.Information("Some event"); // Output: Some event {ComponentName: My application component, MachineName: MyComputer} ``` -Or, alternatively one can choose to use the Kubernetes information which our [Application Insights](./sinks/azure-application-insights) sink will prioritize above the `MachineName` when determining the telemetry `Cloud.RoleInstance`. +Or, alternatively one can choose to use the Kubernetes information which our [Application Insights](./sinks/azure-application-insights.md) sink will prioritize above the `MachineName` when determining the telemetry `Cloud.RoleInstance`. ```csharp using Serilog; @@ -255,7 +262,7 @@ logger.Information("Some event"); ### Custom application version -The version enricher allows you to specify an `IAppVersion` instance that retrieves your custom application version, which will be used during enrichement. +The version enricher allows you to specify an `IAppVersion` instance that retrieves your custom application version, which will be used during enrichment. By default this is set to the version of the current executing assembly. **Assembly version as application version** @@ -320,7 +327,7 @@ ILogger logger = new LoggerConfiguration() ### Custom Serilog property names -The version enricher allows you to specify the name of the property that will be added to the log event during enrichement. +The version enricher allows you to specify the name of the property that will be added to the log event during enrichment. By default this is set to `version`. ```csharp diff --git a/docs/versioned_docs/version-v2.0/02-Features/telemetry-filter.md b/docs/versioned_docs/version-v2.0/02-Features/telemetry-filter.md index 533663e6..e42ac966 100644 --- a/docs/versioned_docs/version-v2.0/02-Features/telemetry-filter.md +++ b/docs/versioned_docs/version-v2.0/02-Features/telemetry-filter.md @@ -42,7 +42,7 @@ ILogger logger = new LoggerConfiguration() Alternatively, you can explicitly specify if it should track telemetry or not based on the application configuration has to be tracked or not : ```csharp -var trackDependencies = configuration["telemetry:depenencies:isEnabled"]; +var trackDependencies = configuration["telemetry:dependencies:isEnabled"]; ILogger logger = new LoggerConfiguration() .WriteTo.AzureApplicationInsights("") .Filter.With(TelemetryTypeFilter.On(TelemetryType.Dependency, isTrackingEnabled: bool.Parse(trackDependencies))) diff --git a/docs/versioned_docs/version-v2.0/02-Features/writing-different-telemetry-types.md b/docs/versioned_docs/version-v2.0/02-Features/writing-different-telemetry-types.md index 2ae50c6b..89734921 100644 --- a/docs/versioned_docs/version-v2.0/02-Features/writing-different-telemetry-types.md +++ b/docs/versioned_docs/version-v2.0/02-Features/writing-different-telemetry-types.md @@ -9,16 +9,31 @@ Logs are a great way to gain insights, but sometimes they are not the best appro We provide the capability to track the following telemetry types on top of ILogger with good support on Serilog: -- [Dependencies](#dependencies) -- [Events](#events) -- [Metrics](#metrics) -- [Requests](#requests) - -For most optimal output, we recommend using our [Azure Application Insights sink](/features/sinks/azure-application-insights). +- [Write different telemetry types](#write-different-telemetry-types) + - [Installation](#installation) + - [Dependencies](#dependencies) + - [Measuring Azure Blob Storage dependencies](#measuring-azure-blob-storage-dependencies) + - [Measuring Azure Cosmos DB dependencies](#measuring-azure-cosmos-db-dependencies) + - [Measuring Azure Event Hubs dependencies](#measuring-azure-event-hubs-dependencies) + - [Measuring Azure IoT Hub dependencies](#measuring-azure-iot-hub-dependencies) + - [Measuring Azure Key Vault dependencies](#measuring-azure-key-vault-dependencies) + - [Measuring Azure Search dependencies](#measuring-azure-search-dependencies) + - [Measuring Azure Service Bus dependencies](#measuring-azure-service-bus-dependencies) + - [Measuring Azure Table Storage Dependencies](#measuring-azure-table-storage-dependencies) + - [Measuring HTTP dependencies](#measuring-http-dependencies) + - [Measuring SQL dependencies](#measuring-sql-dependencies) + - [Measuring custom dependencies](#measuring-custom-dependencies) + - [Making it easier to measure dependencies](#making-it-easier-to-measure-dependencies) + - [Events](#events) + - [Security Events](#security-events) + - [Metrics](#metrics) + - [Requests](#requests) + +For most optimal output, we recommend using our [Azure Application Insights sink](./sinks/azure-application-insights.md). **We highly encourage to provide contextual information to all your telemetry** to make it more powerful and support this for all telemetry types. -> :bulb: For sake of simplicity we have not included how to track contextual information, for more information see [our documentation](/features/making-telemetry-more-powerful). +> :bulb: For sake of simplicity we have not included how to track contextual information, for more information see [our documentation](./making-telemetry-more-powerful.md). ## Installation @@ -32,20 +47,6 @@ PM > Install-Package Arcus.Observability.Telemetry.Core Dependencies allow you to track how your external dependencies are doing to give you insights on performance and error rate. -We provide support for the following dependencies: - -- [Azure Blob Storage](#measuring-azure-blob-storage-dependencies) -- [Azure Cosmos DB](#measuring-azure-cosmos-db-dependencies) -- [Azure Event Hubs](#measuring-azure-event-hubs-dependencies) -- [Azure IoT Hub](#measuring-azure-iot-hub-dependencies) -- [Azure Key Vault](#measuring-azure-key-vault-dependencies) -- [Azure Search](#measuring-azure-search-dependencies) -- [Azure Service Bus](#measuring-azure-service-bus-dependencies) -- [Azure Table Storage](#measuring-azure-table-storage-dependencies) -- [Custom](#measuring-custom-dependencies) -- [HTTP](#measuring-http-dependencies) -- [SQL](#measuring-sql-dependencies) - Since measuring dependencies can add some noise in your code, we've introduced `DependencyMeasurement` to make it simpler. ([docs](#making-it-easier-to-measure-dependencies)) ### Measuring Azure Blob Storage dependencies @@ -104,7 +105,7 @@ durationMeasurement.Start(); var startTime = DateTimeOffset.UtcNow; logger.LogEventHubsDependency(namespaceName: "be.sensors.contoso", eventHubName: "temperature", isSuccessful: true, startTime: startTime, duration: durationMeasurement.Elapsed); -// Output: "Dependency Azure Event Hubs be.sensors.contoso named temerature in 00:00:00.2521801 at 03/23/2020 09:56:31 +00:00 (Successful: True - Context: )" +// Output: "Dependency Azure Event Hubs be.sensors.contoso named temperature in 00:00:00.2521801 at 03/23/2020 09:56:31 +00:00 (Successful: True - Context: )" ``` ### Measuring Azure IoT Hub dependencies @@ -128,7 +129,7 @@ logger.LogIotHubDependency(iotHubName: "sensors", isSuccessful: true, startTime: // Output: "Dependency Azure IoT Hub named sensors in 00:00:00.2521801 at 03/23/2020 09:56:31 +00:00 (Successful: True - Context: )" ``` -Or, alternatively you can pass allong the IoT connection string itself so the host name will be selected for you. +Or, alternatively you can pass along the IoT connection string itself so the host name will be selected for you. **Installation** @@ -178,7 +179,7 @@ logger.AzureKeyVaultDependency(vaultUri: "https://my-secret-store.vault.azure.ne ### Measuring Azure Search dependencies -We allow you to measure Azure Search depdendencies for cognetive services. +We allow you to measure Azure Search dependencies for cognitive services. Here is how you can report an Azure Search dependency: @@ -311,7 +312,7 @@ logger.LogSqlDependency(connectionString, "my-table", "get-products", isSuccessf ### Measuring custom dependencies -Here is how you can areport a custom depenency: +Here is how you can measure a custom dependency: ```csharp using Microsoft.Extensions.Logging; diff --git a/docs/versioned_docs/version-v2.1/01-index.md b/docs/versioned_docs/version-v2.1/01-index.md index 395fd045..7c816abc 100644 --- a/docs/versioned_docs/version-v2.1/01-index.md +++ b/docs/versioned_docs/version-v2.1/01-index.md @@ -19,18 +19,18 @@ For more granular packages we recommend reading the documentation. # Features -- [Making telemetry more powerful](/features/making-telemetry-more-powerful) by making it simple to provide contextual information -- [Writing different telemetry types](/features/writing-different-telemetry-types) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. -- [Correlation](/features/correlation) - A common set of correlation levels. +- [Making telemetry more powerful](./02-Features/making-telemetry-more-powerful.md) by making it simple to provide contextual information +- [Writing different telemetry types](./02-Features/writing-different-telemetry-types.md) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. +- [Correlation](./02-Features/correlation.md) - A common set of correlation levels. - Telemetry - - [Enrichment](/features/telemetry-enrichment) - A set of enrichers to improve telemetry information. - - [Filters](/features/telemetry-filter) - A set of filters to control telemetry flow with. + - [Enrichment](./02-Features/telemetry-enrichment.md) - A set of enrichers to improve telemetry information. + - [Filters](./02-Features/telemetry-filter.md) - A set of filters to control telemetry flow with. - Sinks - - [Azure Application Insights](/features/sinks/azure-application-insights) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights + - [Azure Application Insights](./02-Features/sinks/azure-application-insights.md) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights # Guidance -- [Using Arcus & Serilog in .NET Core and/or Azure Functions](/guidance/use-with-dotnet-and-functions) +- [Using Arcus & Serilog in .NET Core and/or Azure Functions](./03-Guidance/use-with-dotnet-and-functions.md) # License This is licensed under The MIT License (MIT). Which means that you can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the web application. But you always need to state that Codit is the original author of this web application. diff --git a/docs/versioned_docs/version-v2.1/02-Features/correlation.md b/docs/versioned_docs/version-v2.1/02-Features/correlation.md index 2f42496c..adbe904c 100644 --- a/docs/versioned_docs/version-v2.1/02-Features/correlation.md +++ b/docs/versioned_docs/version-v2.1/02-Features/correlation.md @@ -45,7 +45,7 @@ namespace Application ``` ## Custom Correlation -We register two interfaces during the registration of the correlation: `ICorrealtionInfoAccessor` and `ICorrelationInfoAccessor<>`. +We register two interfaces during the registration of the correlation: `ICorrelationInfoAccessor` and `ICorrelationInfoAccessor<>`. The reason is because some applications require a custom `CorrelationInfo` model, and with using the generic interface `ICorrelationInfoAccessor<>` we can support this. **Example** @@ -191,7 +191,7 @@ namespace Application This custom options model can then be included when registering the correlation: ```csharp -using Microsoft.Excentions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; namespace Application { diff --git a/docs/versioned_docs/version-v2.1/02-Features/making-telemetry-more-powerful.md b/docs/versioned_docs/version-v2.1/02-Features/making-telemetry-more-powerful.md index 56426e68..d169feaa 100644 --- a/docs/versioned_docs/version-v2.1/02-Features/making-telemetry-more-powerful.md +++ b/docs/versioned_docs/version-v2.1/02-Features/making-telemetry-more-powerful.md @@ -25,7 +25,7 @@ logger.LogEvent("Order Created", telemetryContext); By doing so, you'll be able to interact more efficient with your logs by filtering, searching, ... on it. -We support this for all [telemetry types that you can write](/features/writing-different-telemetry-types). +We support this for all [telemetry types that you can write](./writing-different-telemetry-types.md). ### Seeing the power in action diff --git a/docs/versioned_docs/version-v2.1/02-Features/sinks/azure-application-insights.md b/docs/versioned_docs/version-v2.1/02-Features/sinks/azure-application-insights.md index 2b066c2d..0b030339 100644 --- a/docs/versioned_docs/version-v2.1/02-Features/sinks/azure-application-insights.md +++ b/docs/versioned_docs/version-v2.1/02-Features/sinks/azure-application-insights.md @@ -153,7 +153,8 @@ using Arcus.Security.Core; var host = Host.CreateDefaultBuilder() .ConfigureSecretStore((context, config, builder) => { - // Configure the secretstore here + // Configure the secret store here + // https://security.arcus-azure.net/features/secret-store/ }) .UseSerilog((context, serviceProvider, loggerConfig) => { diff --git a/docs/versioned_docs/version-v2.1/02-Features/telemetry-enrichment.md b/docs/versioned_docs/version-v2.1/02-Features/telemetry-enrichment.md index b8ec690c..e2453d7d 100644 --- a/docs/versioned_docs/version-v2.1/02-Features/telemetry-enrichment.md +++ b/docs/versioned_docs/version-v2.1/02-Features/telemetry-enrichment.md @@ -7,10 +7,17 @@ layout: default We provide a variety of enrichers for Serilog: -- [Application Enricher](#application-enricher) -- [Correlation Enricher](#correlation-enricher) -- [Kubernetes Enricher](#kubernetes-enricher) -- [Version Enricher](#version-enricher) +- [Telemetry Enrichment](#telemetry-enrichment) + - [Installation](#installation) + - [Application Enricher](#application-enricher) + - [Custom Serilog property names](#custom-serilog-property-names) + - [Correlation Enricher](#correlation-enricher) + - [Custom Serilog property names](#custom-serilog-property-names-1) + - [Kubernetes Enricher](#kubernetes-enricher) + - [Custom Serilog property names](#custom-serilog-property-names-2) + - [Version Enricher](#version-enricher) + - [Custom application version](#custom-application-version) + - [Custom Serilog property names](#custom-serilog-property-names-3) ## Installation @@ -23,7 +30,7 @@ PM > Install-Package Arcus.Observability.Telemetry.Serilog.Enrichers ## Application Enricher The `Arcus.Observability.Telemetry.Serilog.Enrichers` library provides a [Serilog enricher](https://github.com/serilog/serilog/wiki/Enrichment) -that adds the application's component name to the log event as a log property with the name `ComponentName` and gives the opportiunity to choose the location from where the application 'instance' should be retrieved. +that adds the application's component name to the log event as a log property with the name `ComponentName` and gives the opportunity to choose the location from where the application 'instance' should be retrieved. **Example** Name: `ComponentName` @@ -42,7 +49,7 @@ logger.Information("Some event"); // Output: Some event {ComponentName: My application component, MachineName: MyComputer} ``` -Or, alternatively one can choose to use the Kubernetes information which our [Application Insights](./sinks/azure-application-insights) sink will prioritize above the `MachineName` when determining the telemetry `Cloud.RoleInstance`. +Or, alternatively one can choose to use the Kubernetes information which our [Application Insights](./sinks/azure-application-insights.md) sink will prioritize above the `MachineName` when determining the telemetry `Cloud.RoleInstance`. ```csharp using Serilog; @@ -255,7 +262,7 @@ logger.Information("Some event"); ### Custom application version -The version enricher allows you to specify an `IAppVersion` instance that retrieves your custom application version, which will be used during enrichement. +The version enricher allows you to specify an `IAppVersion` instance that retrieves your custom application version, which will be used during enrichment. By default this is set to the version of the current executing assembly. **Assembly version as application version** @@ -325,7 +332,7 @@ ILogger logger = new LoggerConfiguration() ### Custom Serilog property names -The version enricher allows you to specify the name of the property that will be added to the log event during enrichement. +The version enricher allows you to specify the name of the property that will be added to the log event during enrichment. By default this is set to `version`. ```csharp diff --git a/docs/versioned_docs/version-v2.1/02-Features/telemetry-filter.md b/docs/versioned_docs/version-v2.1/02-Features/telemetry-filter.md index 533663e6..e42ac966 100644 --- a/docs/versioned_docs/version-v2.1/02-Features/telemetry-filter.md +++ b/docs/versioned_docs/version-v2.1/02-Features/telemetry-filter.md @@ -42,7 +42,7 @@ ILogger logger = new LoggerConfiguration() Alternatively, you can explicitly specify if it should track telemetry or not based on the application configuration has to be tracked or not : ```csharp -var trackDependencies = configuration["telemetry:depenencies:isEnabled"]; +var trackDependencies = configuration["telemetry:dependencies:isEnabled"]; ILogger logger = new LoggerConfiguration() .WriteTo.AzureApplicationInsights("") .Filter.With(TelemetryTypeFilter.On(TelemetryType.Dependency, isTrackingEnabled: bool.Parse(trackDependencies))) diff --git a/docs/versioned_docs/version-v2.1/02-Features/writing-different-telemetry-types.md b/docs/versioned_docs/version-v2.1/02-Features/writing-different-telemetry-types.md index ad3fc3f7..efb7cb5e 100644 --- a/docs/versioned_docs/version-v2.1/02-Features/writing-different-telemetry-types.md +++ b/docs/versioned_docs/version-v2.1/02-Features/writing-different-telemetry-types.md @@ -9,16 +9,31 @@ Logs are a great way to gain insights, but sometimes they are not the best appro We provide the capability to track the following telemetry types on top of ILogger with good support on Serilog: -- [Dependencies](#dependencies) -- [Events](#events) -- [Metrics](#metrics) -- [Requests](#requests) - -For most optimal output, we recommend using our [Azure Application Insights sink](/features/sinks/azure-application-insights). +- [Write different telemetry types](#write-different-telemetry-types) + - [Installation](#installation) + - [Dependencies](#dependencies) + - [Measuring Azure Blob Storage dependencies](#measuring-azure-blob-storage-dependencies) + - [Measuring Azure Cosmos DB dependencies](#measuring-azure-cosmos-db-dependencies) + - [Measuring Azure Event Hubs dependencies](#measuring-azure-event-hubs-dependencies) + - [Measuring Azure IoT Hub dependencies](#measuring-azure-iot-hub-dependencies) + - [Measuring Azure Key Vault dependencies](#measuring-azure-key-vault-dependencies) + - [Measuring Azure Search dependencies](#measuring-azure-search-dependencies) + - [Measuring Azure Service Bus dependencies](#measuring-azure-service-bus-dependencies) + - [Measuring Azure Table Storage Dependencies](#measuring-azure-table-storage-dependencies) + - [Measuring HTTP dependencies](#measuring-http-dependencies) + - [Measuring SQL dependencies](#measuring-sql-dependencies) + - [Measuring custom dependencies](#measuring-custom-dependencies) + - [Making it easier to measure dependencies](#making-it-easier-to-measure-dependencies) + - [Events](#events) + - [Security Events](#security-events) + - [Metrics](#metrics) + - [Requests](#requests) + +For most optimal output, we recommend using our [Azure Application Insights sink](./sinks/azure-application-insights.md). **We highly encourage to provide contextual information to all your telemetry** to make it more powerful and support this for all telemetry types. -> :bulb: For sake of simplicity we have not included how to track contextual information, for more information see [our documentation](/features/making-telemetry-more-powerful). +> :bulb: For sake of simplicity we have not included how to track contextual information, for more information see [our documentation](./making-telemetry-more-powerful.md). ## Installation @@ -32,20 +47,6 @@ PM > Install-Package Arcus.Observability.Telemetry.Core Dependencies allow you to track how your external dependencies are doing to give you insights on performance and error rate. -We provide support for the following dependencies: - -- [Azure Blob Storage](#measuring-azure-blob-storage-dependencies) -- [Azure Cosmos DB](#measuring-azure-cosmos-db-dependencies) -- [Azure Event Hubs](#measuring-azure-event-hubs-dependencies) -- [Azure IoT Hub](#measuring-azure-iot-hub-dependencies) -- [Azure Key Vault](#measuring-azure-key-vault-dependencies) -- [Azure Search](#measuring-azure-search-dependencies) -- [Azure Service Bus](#measuring-azure-service-bus-dependencies) -- [Azure Table Storage](#measuring-azure-table-storage-dependencies) -- [Custom](#measuring-custom-dependencies) -- [HTTP](#measuring-http-dependencies) -- [SQL](#measuring-sql-dependencies) - Since measuring dependencies can add some noise in your code, we've introduced `DependencyMeasurement` to make it simpler. ([docs](#making-it-easier-to-measure-dependencies)) ### Measuring Azure Blob Storage dependencies @@ -104,7 +105,7 @@ durationMeasurement.Start(); var startTime = DateTimeOffset.UtcNow; logger.LogEventHubsDependency(namespaceName: "be.sensors.contoso", eventHubName: "temperature", isSuccessful: true, startTime: startTime, duration: durationMeasurement.Elapsed); -// Output: "Dependency Azure Event Hubs be.sensors.contoso named temerature in 00:00:00.2521801 at 03/23/2020 09:56:31 +00:00 (Successful: True - Context: )" +// Output: "Dependency Azure Event Hubs be.sensors.contoso named temperature in 00:00:00.2521801 at 03/23/2020 09:56:31 +00:00 (Successful: True - Context: )" ``` ### Measuring Azure IoT Hub dependencies @@ -178,7 +179,7 @@ logger.AzureKeyVaultDependency(vaultUri: "https://my-secret-store.vault.azure.ne ### Measuring Azure Search dependencies -We allow you to measure Azure Search depdendencies for cognetive services. +We allow you to measure Azure Search dependencies for cognitive services. Here is how you can report an Azure Search dependency: @@ -311,7 +312,7 @@ logger.LogSqlDependency(connectionString, "my-table", "get-products", isSuccessf ### Measuring custom dependencies -Here is how you can areport a custom depenency: +Here is how you can measure a custom dependency: ```csharp using Microsoft.Extensions.Logging; @@ -410,7 +411,7 @@ Here is how an invalid `Order` can be reported: ```csharp using Microsoft.Extensions.Logging; -loger.LogSecurityEvent("Invalid Order"); +logger.LogSecurityEvent("Invalid Order"); // Output: "Events Invalid Order (Context: )" ``` diff --git a/docs/versioned_docs/version-v2.2/01-index.md b/docs/versioned_docs/version-v2.2/01-index.md index 039cc26f..6d6e38f3 100644 --- a/docs/versioned_docs/version-v2.2/01-index.md +++ b/docs/versioned_docs/version-v2.2/01-index.md @@ -19,18 +19,18 @@ For more granular packages we recommend reading the documentation. # Features -- [Making telemetry more powerful](/features/making-telemetry-more-powerful) by making it simple to provide contextual information -- [Writing different telemetry types](/features/writing-different-telemetry-types) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. -- [Correlation](/features/correlation) - A common set of correlation levels. +- [Making telemetry more powerful](./02-Features/making-telemetry-more-powerful.md) by making it simple to provide contextual information +- [Writing different telemetry types](./02-Features/writing-different-telemetry-types.md) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. +- [Correlation](./02-Features/correlation.md) - A common set of correlation levels. - Telemetry - - [Enrichment](/features/telemetry-enrichment) - A set of enrichers to improve telemetry information. - - [Filters](/features/telemetry-filter) - A set of filters to control telemetry flow with. + - [Enrichment](./02-Features/telemetry-enrichment.md) - A set of enrichers to improve telemetry information. + - [Filters](./02-Features/telemetry-filter.md) - A set of filters to control telemetry flow with. - Sinks - - [Azure Application Insights](/features/sinks/azure-application-insights) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights + - [Azure Application Insights](./02-Features/sinks/azure-application-insights.md) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights # Guidance -- [Using Arcus & Serilog in .NET Core and/or Azure Functions](/guidance/use-with-dotnet-and-functions) +- [Using Arcus & Serilog in .NET Core and/or Azure Functions](./03-Guidance/use-with-dotnet-and-functions.md) # License This is licensed under The MIT License (MIT). Which means that you can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the web application. But you always need to state that Codit is the original author of this web application. diff --git a/docs/versioned_docs/version-v2.2/02-Features/making-telemetry-more-powerful.md b/docs/versioned_docs/version-v2.2/02-Features/making-telemetry-more-powerful.md index 56426e68..d169feaa 100644 --- a/docs/versioned_docs/version-v2.2/02-Features/making-telemetry-more-powerful.md +++ b/docs/versioned_docs/version-v2.2/02-Features/making-telemetry-more-powerful.md @@ -25,7 +25,7 @@ logger.LogEvent("Order Created", telemetryContext); By doing so, you'll be able to interact more efficient with your logs by filtering, searching, ... on it. -We support this for all [telemetry types that you can write](/features/writing-different-telemetry-types). +We support this for all [telemetry types that you can write](./writing-different-telemetry-types.md). ### Seeing the power in action diff --git a/docs/versioned_docs/version-v2.2/02-Features/sinks/azure-application-insights.md b/docs/versioned_docs/version-v2.2/02-Features/sinks/azure-application-insights.md index 2b066c2d..0b030339 100644 --- a/docs/versioned_docs/version-v2.2/02-Features/sinks/azure-application-insights.md +++ b/docs/versioned_docs/version-v2.2/02-Features/sinks/azure-application-insights.md @@ -153,7 +153,8 @@ using Arcus.Security.Core; var host = Host.CreateDefaultBuilder() .ConfigureSecretStore((context, config, builder) => { - // Configure the secretstore here + // Configure the secret store here + // https://security.arcus-azure.net/features/secret-store/ }) .UseSerilog((context, serviceProvider, loggerConfig) => { diff --git a/docs/versioned_docs/version-v2.2/02-Features/telemetry-enrichment.md b/docs/versioned_docs/version-v2.2/02-Features/telemetry-enrichment.md index b8ec690c..d3414ab7 100644 --- a/docs/versioned_docs/version-v2.2/02-Features/telemetry-enrichment.md +++ b/docs/versioned_docs/version-v2.2/02-Features/telemetry-enrichment.md @@ -7,10 +7,17 @@ layout: default We provide a variety of enrichers for Serilog: -- [Application Enricher](#application-enricher) -- [Correlation Enricher](#correlation-enricher) -- [Kubernetes Enricher](#kubernetes-enricher) -- [Version Enricher](#version-enricher) +- [Telemetry Enrichment](#telemetry-enrichment) + - [Installation](#installation) + - [Application Enricher](#application-enricher) + - [Custom Serilog property names](#custom-serilog-property-names) + - [Correlation Enricher](#correlation-enricher) + - [Custom Serilog property names](#custom-serilog-property-names-1) + - [Kubernetes Enricher](#kubernetes-enricher) + - [Custom Serilog property names](#custom-serilog-property-names-2) + - [Version Enricher](#version-enricher) + - [Custom application version](#custom-application-version) + - [Custom Serilog property names](#custom-serilog-property-names-3) ## Installation @@ -23,7 +30,7 @@ PM > Install-Package Arcus.Observability.Telemetry.Serilog.Enrichers ## Application Enricher The `Arcus.Observability.Telemetry.Serilog.Enrichers` library provides a [Serilog enricher](https://github.com/serilog/serilog/wiki/Enrichment) -that adds the application's component name to the log event as a log property with the name `ComponentName` and gives the opportiunity to choose the location from where the application 'instance' should be retrieved. +that adds the application's component name to the log event as a log property with the name `ComponentName` and gives the opportunity to choose the location from where the application 'instance' should be retrieved. **Example** Name: `ComponentName` @@ -42,7 +49,7 @@ logger.Information("Some event"); // Output: Some event {ComponentName: My application component, MachineName: MyComputer} ``` -Or, alternatively one can choose to use the Kubernetes information which our [Application Insights](./sinks/azure-application-insights) sink will prioritize above the `MachineName` when determining the telemetry `Cloud.RoleInstance`. +Or, alternatively one can choose to use the Kubernetes information which our [Application Insights](./sinks/azure-application-insights.md) sink will prioritize above the `MachineName` when determining the telemetry `Cloud.RoleInstance`. ```csharp using Serilog; @@ -255,7 +262,7 @@ logger.Information("Some event"); ### Custom application version -The version enricher allows you to specify an `IAppVersion` instance that retrieves your custom application version, which will be used during enrichement. +The version enricher allows you to specify an `IAppVersion` instance that retrieves your custom application version, which will be used during enrichment. By default this is set to the version of the current executing assembly. **Assembly version as application version** @@ -296,7 +303,7 @@ using Microsoft.Extensions.Logging; public class Startup { - public void ConfigureServivces(IServiceCollection services) + public void ConfigureServices(IServiceCollection services) { // Register the `MyApplicationVersion` instance to the registered services (using empty constructor). services.AddAppVersion(); @@ -325,7 +332,7 @@ ILogger logger = new LoggerConfiguration() ### Custom Serilog property names -The version enricher allows you to specify the name of the property that will be added to the log event during enrichement. +The version enricher allows you to specify the name of the property that will be added to the log event during enrichment. By default this is set to `version`. ```csharp diff --git a/docs/versioned_docs/version-v2.2/02-Features/telemetry-filter.md b/docs/versioned_docs/version-v2.2/02-Features/telemetry-filter.md index 533663e6..e42ac966 100644 --- a/docs/versioned_docs/version-v2.2/02-Features/telemetry-filter.md +++ b/docs/versioned_docs/version-v2.2/02-Features/telemetry-filter.md @@ -42,7 +42,7 @@ ILogger logger = new LoggerConfiguration() Alternatively, you can explicitly specify if it should track telemetry or not based on the application configuration has to be tracked or not : ```csharp -var trackDependencies = configuration["telemetry:depenencies:isEnabled"]; +var trackDependencies = configuration["telemetry:dependencies:isEnabled"]; ILogger logger = new LoggerConfiguration() .WriteTo.AzureApplicationInsights("") .Filter.With(TelemetryTypeFilter.On(TelemetryType.Dependency, isTrackingEnabled: bool.Parse(trackDependencies))) diff --git a/docs/versioned_docs/version-v2.2/02-Features/writing-different-telemetry-types.md b/docs/versioned_docs/version-v2.2/02-Features/writing-different-telemetry-types.md index 9a84c007..c5f3bc8d 100644 --- a/docs/versioned_docs/version-v2.2/02-Features/writing-different-telemetry-types.md +++ b/docs/versioned_docs/version-v2.2/02-Features/writing-different-telemetry-types.md @@ -9,16 +9,31 @@ Logs are a great way to gain insights, but sometimes they are not the best appro We provide the capability to track the following telemetry types on top of ILogger with good support on Serilog: -- [Dependencies](#dependencies) -- [Events](#events) -- [Metrics](#metrics) -- [Requests](#requests) - -For most optimal output, we recommend using our [Azure Application Insights sink](/features/sinks/azure-application-insights). +- [Write different telemetry types](#write-different-telemetry-types) + - [Installation](#installation) + - [Dependencies](#dependencies) + - [Measuring Azure Blob Storage dependencies](#measuring-azure-blob-storage-dependencies) + - [Measuring Azure Cosmos DB dependencies](#measuring-azure-cosmos-db-dependencies) + - [Measuring Azure Event Hubs dependencies](#measuring-azure-event-hubs-dependencies) + - [Measuring Azure IoT Hub dependencies](#measuring-azure-iot-hub-dependencies) + - [Measuring Azure Key Vault dependencies](#measuring-azure-key-vault-dependencies) + - [Measuring Azure Search dependencies](#measuring-azure-search-dependencies) + - [Measuring Azure Service Bus dependencies](#measuring-azure-service-bus-dependencies) + - [Measuring Azure Table Storage Dependencies](#measuring-azure-table-storage-dependencies) + - [Measuring HTTP dependencies](#measuring-http-dependencies) + - [Measuring SQL dependencies](#measuring-sql-dependencies) + - [Measuring custom dependencies](#measuring-custom-dependencies) + - [Making it easier to measure dependencies](#making-it-easier-to-measure-dependencies) + - [Events](#events) + - [Security Events](#security-events) + - [Metrics](#metrics) + - [Requests](#requests) + +For most optimal output, we recommend using our [Azure Application Insights sink](./sinks/azure-application-insights.md). **We highly encourage to provide contextual information to all your telemetry** to make it more powerful and support this for all telemetry types. -> :bulb: For sake of simplicity we have not included how to track contextual information, for more information see [our documentation](/features/making-telemetry-more-powerful). +> :bulb: For sake of simplicity we have not included how to track contextual information, for more information see [our documentation](./making-telemetry-more-powerful.md). ## Installation @@ -32,20 +47,6 @@ PM > Install-Package Arcus.Observability.Telemetry.Core Dependencies allow you to track how your external dependencies are doing to give you insights on performance and error rate. -We provide support for the following dependencies: - -- [Azure Blob Storage](#measuring-azure-blob-storage-dependencies) -- [Azure Cosmos DB](#measuring-azure-cosmos-db-dependencies) -- [Azure Event Hubs](#measuring-azure-event-hubs-dependencies) -- [Azure IoT Hub](#measuring-azure-iot-hub-dependencies) -- [Azure Key Vault](#measuring-azure-key-vault-dependencies) -- [Azure Search](#measuring-azure-search-dependencies) -- [Azure Service Bus](#measuring-azure-service-bus-dependencies) -- [Azure Table Storage](#measuring-azure-table-storage-dependencies) -- [Custom](#measuring-custom-dependencies) -- [HTTP](#measuring-http-dependencies) -- [SQL](#measuring-sql-dependencies) - Since measuring dependencies can add some noise in your code, we've introduced `DependencyMeasurement` to make it simpler. ([docs](#making-it-easier-to-measure-dependencies)) ### Measuring Azure Blob Storage dependencies @@ -128,7 +129,7 @@ logger.LogIotHubDependency(iotHubName: "sensors", isSuccessful: true, startTime: // Output: {"DependencyType": "Azure IoT Hub", "TargetName": "sensors", "Duration": "00:00:00.2521801", "StartTime": "03/23/2020 09:56:31 +00:00", "IsSuccessful": true, "Context": {}} ``` -Or, alternatively you can pass allong the IoT connection string itself so the host name will be selected for you. +Or, alternatively you can pass along the IoT connection string itself so the host name will be selected for you. **Installation** @@ -178,7 +179,7 @@ logger.AzureKeyVaultDependency(vaultUri: "https://my-secret-store.vault.azure.ne ### Measuring Azure Search dependencies -We allow you to measure Azure Search depdendencies for cognetive services. +We allow you to measure Azure Search dependencies for cognitive services. Here is how you can report an Azure Search dependency: @@ -311,7 +312,7 @@ logger.LogSqlDependency(connectionString, "my-table", "get-products", isSuccessf ### Measuring custom dependencies -Here is how you can areport a custom depenency: +Here is how you can measure a custom dependency: ```csharp using Microsoft.Extensions.Logging; @@ -410,7 +411,7 @@ Here is how an invalid `Order` can be reported: ```csharp using Microsoft.Extensions.Logging; -loger.LogSecurityEvent("Invalid Order"); +logger.LogSecurityEvent("Invalid Order"); // Output: {"EventName": "Invalid Order", "Context": {"EventType": "Security"}} ``` diff --git a/docs/versioned_docs/version-v2.3/01-index.md b/docs/versioned_docs/version-v2.3/01-index.md index 0c76778a..acdf05eb 100644 --- a/docs/versioned_docs/version-v2.3/01-index.md +++ b/docs/versioned_docs/version-v2.3/01-index.md @@ -19,18 +19,18 @@ For more granular packages we recommend reading the documentation. # Features -- [Making telemetry more powerful](/features/making-telemetry-more-powerful) by making it simple to provide contextual information -- [Writing different telemetry types](/features/writing-different-telemetry-types) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. -- [Correlation](/features/correlation) - A common set of correlation levels. +- [Making telemetry more powerful](./02-Features/making-telemetry-more-powerful.md) by making it simple to provide contextual information +- [Writing different telemetry types](./02-Features/writing-different-telemetry-types.md) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. +- [Correlation](./02-Features/correlation.md) - A common set of correlation levels. - Telemetry - - [Enrichment](/features/telemetry-enrichment) - A set of enrichers to improve telemetry information. - - [Filters](/features/telemetry-filter) - A set of filters to control telemetry flow with. + - [Enrichment](./02-Features/telemetry-enrichment.md) - A set of enrichers to improve telemetry information. + - [Filters](./02-Features/telemetry-filter.md) - A set of filters to control telemetry flow with. - Sinks - - [Azure Application Insights](/features/sinks/azure-application-insights) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights + - [Azure Application Insights](./02-Features/sinks/azure-application-insights.md) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights # Guidance -- [Using Arcus & Serilog in .NET Core and/or Azure Functions](/guidance/use-with-dotnet-and-functions) +- [Using Arcus & Serilog in .NET Core and/or Azure Functions](./03-Guidance/use-with-dotnet-and-functions.md) # License This is licensed under The MIT License (MIT). Which means that you can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the web application. But you always need to state that Codit is the original author of this web application. diff --git a/docs/versioned_docs/version-v2.3/02-Features/correlation.md b/docs/versioned_docs/version-v2.3/02-Features/correlation.md index e0fb69e0..3634b27a 100644 --- a/docs/versioned_docs/version-v2.3/02-Features/correlation.md +++ b/docs/versioned_docs/version-v2.3/02-Features/correlation.md @@ -46,7 +46,7 @@ namespace Application ``` ## Custom Correlation -We register two interfaces during the registration of the correlation: `ICorrealtionInfoAccessor` and `ICorrelationInfoAccessor<>`. +We register two interfaces during the registration of the correlation: `ICorrelationInfoAccessor` and `ICorrelationInfoAccessor<>`. The reason is because some applications require a custom `CorrelationInfo` model, and with using the generic interface `ICorrelationInfoAccessor<>` we can support this. **Example** @@ -192,7 +192,7 @@ namespace Application This custom options model can then be included when registering the correlation: ```csharp -using Microsoft.Excentions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; namespace Application { diff --git a/docs/versioned_docs/version-v2.3/02-Features/making-telemetry-more-powerful.md b/docs/versioned_docs/version-v2.3/02-Features/making-telemetry-more-powerful.md index b0679f41..d2934f61 100644 --- a/docs/versioned_docs/version-v2.3/02-Features/making-telemetry-more-powerful.md +++ b/docs/versioned_docs/version-v2.3/02-Features/making-telemetry-more-powerful.md @@ -25,7 +25,7 @@ logger.LogEvent("Order Created", telemetryContext); By doing so, you'll be able to interact more efficient with your logs by filtering, searching, ... on it. -We support this for all [telemetry types that you can write](/features/writing-different-telemetry-types). +We support this for all [telemetry types that you can write](./writing-different-telemetry-types.md). ### Seeing the power in action diff --git a/docs/versioned_docs/version-v2.3/02-Features/sinks/azure-application-insights.md b/docs/versioned_docs/version-v2.3/02-Features/sinks/azure-application-insights.md index 2b066c2d..0b030339 100644 --- a/docs/versioned_docs/version-v2.3/02-Features/sinks/azure-application-insights.md +++ b/docs/versioned_docs/version-v2.3/02-Features/sinks/azure-application-insights.md @@ -153,7 +153,8 @@ using Arcus.Security.Core; var host = Host.CreateDefaultBuilder() .ConfigureSecretStore((context, config, builder) => { - // Configure the secretstore here + // Configure the secret store here + // https://security.arcus-azure.net/features/secret-store/ }) .UseSerilog((context, serviceProvider, loggerConfig) => { diff --git a/docs/versioned_docs/version-v2.3/02-Features/telemetry-enrichment.md b/docs/versioned_docs/version-v2.3/02-Features/telemetry-enrichment.md index b8ec690c..e2453d7d 100644 --- a/docs/versioned_docs/version-v2.3/02-Features/telemetry-enrichment.md +++ b/docs/versioned_docs/version-v2.3/02-Features/telemetry-enrichment.md @@ -7,10 +7,17 @@ layout: default We provide a variety of enrichers for Serilog: -- [Application Enricher](#application-enricher) -- [Correlation Enricher](#correlation-enricher) -- [Kubernetes Enricher](#kubernetes-enricher) -- [Version Enricher](#version-enricher) +- [Telemetry Enrichment](#telemetry-enrichment) + - [Installation](#installation) + - [Application Enricher](#application-enricher) + - [Custom Serilog property names](#custom-serilog-property-names) + - [Correlation Enricher](#correlation-enricher) + - [Custom Serilog property names](#custom-serilog-property-names-1) + - [Kubernetes Enricher](#kubernetes-enricher) + - [Custom Serilog property names](#custom-serilog-property-names-2) + - [Version Enricher](#version-enricher) + - [Custom application version](#custom-application-version) + - [Custom Serilog property names](#custom-serilog-property-names-3) ## Installation @@ -23,7 +30,7 @@ PM > Install-Package Arcus.Observability.Telemetry.Serilog.Enrichers ## Application Enricher The `Arcus.Observability.Telemetry.Serilog.Enrichers` library provides a [Serilog enricher](https://github.com/serilog/serilog/wiki/Enrichment) -that adds the application's component name to the log event as a log property with the name `ComponentName` and gives the opportiunity to choose the location from where the application 'instance' should be retrieved. +that adds the application's component name to the log event as a log property with the name `ComponentName` and gives the opportunity to choose the location from where the application 'instance' should be retrieved. **Example** Name: `ComponentName` @@ -42,7 +49,7 @@ logger.Information("Some event"); // Output: Some event {ComponentName: My application component, MachineName: MyComputer} ``` -Or, alternatively one can choose to use the Kubernetes information which our [Application Insights](./sinks/azure-application-insights) sink will prioritize above the `MachineName` when determining the telemetry `Cloud.RoleInstance`. +Or, alternatively one can choose to use the Kubernetes information which our [Application Insights](./sinks/azure-application-insights.md) sink will prioritize above the `MachineName` when determining the telemetry `Cloud.RoleInstance`. ```csharp using Serilog; @@ -255,7 +262,7 @@ logger.Information("Some event"); ### Custom application version -The version enricher allows you to specify an `IAppVersion` instance that retrieves your custom application version, which will be used during enrichement. +The version enricher allows you to specify an `IAppVersion` instance that retrieves your custom application version, which will be used during enrichment. By default this is set to the version of the current executing assembly. **Assembly version as application version** @@ -325,7 +332,7 @@ ILogger logger = new LoggerConfiguration() ### Custom Serilog property names -The version enricher allows you to specify the name of the property that will be added to the log event during enrichement. +The version enricher allows you to specify the name of the property that will be added to the log event during enrichment. By default this is set to `version`. ```csharp diff --git a/docs/versioned_docs/version-v2.3/02-Features/telemetry-filter.md b/docs/versioned_docs/version-v2.3/02-Features/telemetry-filter.md index 533663e6..e42ac966 100644 --- a/docs/versioned_docs/version-v2.3/02-Features/telemetry-filter.md +++ b/docs/versioned_docs/version-v2.3/02-Features/telemetry-filter.md @@ -42,7 +42,7 @@ ILogger logger = new LoggerConfiguration() Alternatively, you can explicitly specify if it should track telemetry or not based on the application configuration has to be tracked or not : ```csharp -var trackDependencies = configuration["telemetry:depenencies:isEnabled"]; +var trackDependencies = configuration["telemetry:dependencies:isEnabled"]; ILogger logger = new LoggerConfiguration() .WriteTo.AzureApplicationInsights("") .Filter.With(TelemetryTypeFilter.On(TelemetryType.Dependency, isTrackingEnabled: bool.Parse(trackDependencies))) diff --git a/docs/versioned_docs/version-v2.3/02-Features/writing-different-telemetry-types.md b/docs/versioned_docs/version-v2.3/02-Features/writing-different-telemetry-types.md index a4b6ab4c..3e05b1de 100644 --- a/docs/versioned_docs/version-v2.3/02-Features/writing-different-telemetry-types.md +++ b/docs/versioned_docs/version-v2.3/02-Features/writing-different-telemetry-types.md @@ -9,10 +9,25 @@ Logs are a great way to gain insights, but sometimes they are not the best appro We provide the capability to track the following telemetry types on top of ILogger with good support on Serilog: -- [Dependencies](#dependencies) -- [Events](#events) -- [Metrics](#metrics) -- [Requests](#requests) +- [Write different telemetry types](#write-different-telemetry-types) + - [Installation](#installation) + - [Dependencies](#dependencies) + - [Measuring Azure Blob Storage dependencies](#measuring-azure-blob-storage-dependencies) + - [Measuring Azure Cosmos DB dependencies](#measuring-azure-cosmos-db-dependencies) + - [Measuring Azure Event Hubs dependencies](#measuring-azure-event-hubs-dependencies) + - [Measuring Azure IoT Hub dependencies](#measuring-azure-iot-hub-dependencies) + - [Measuring Azure Key Vault dependencies](#measuring-azure-key-vault-dependencies) + - [Measuring Azure Search dependencies](#measuring-azure-search-dependencies) + - [Measuring Azure Service Bus dependencies](#measuring-azure-service-bus-dependencies) + - [Measuring Azure Table Storage Dependencies](#measuring-azure-table-storage-dependencies) + - [Measuring HTTP dependencies](#measuring-http-dependencies) + - [Measuring SQL dependencies](#measuring-sql-dependencies) + - [Measuring custom dependencies](#measuring-custom-dependencies) + - [Making it easier to measure dependencies](#making-it-easier-to-measure-dependencies) + - [Events](#events) + - [Security Events](#security-events) + - [Metrics](#metrics) + - [Requests](#requests) For most optimal output, we recommend using our [Azure Application Insights sink](/features/sinks/azure-application-insights). @@ -32,20 +47,6 @@ PM > Install-Package Arcus.Observability.Telemetry.Core Dependencies allow you to track how your external dependencies are doing to give you insights on performance and error rate. -We provide support for the following dependencies: - -- [Azure Blob Storage](#measuring-azure-blob-storage-dependencies) -- [Azure Cosmos DB](#measuring-azure-cosmos-db-dependencies) -- [Azure Event Hubs](#measuring-azure-event-hubs-dependencies) -- [Azure IoT Hub](#measuring-azure-iot-hub-dependencies) -- [Azure Key Vault](#measuring-azure-key-vault-dependencies) -- [Azure Search](#measuring-azure-search-dependencies) -- [Azure Service Bus](#measuring-azure-service-bus-dependencies) -- [Azure Table Storage](#measuring-azure-table-storage-dependencies) -- [Custom](#measuring-custom-dependencies) -- [HTTP](#measuring-http-dependencies) -- [SQL](#measuring-sql-dependencies) - Since measuring dependencies can add some noise in your code, we've introduced `DependencyMeasurement` to make it simpler. ([docs](#making-it-easier-to-measure-dependencies)) ### Measuring Azure Blob Storage dependencies @@ -128,7 +129,7 @@ logger.LogIotHubDependency(iotHubName: "sensors", isSuccessful: true, startTime: // Output: {"DependencyType": "Azure IoT Hub", "TargetName": "sensors", "Duration": "00:00:00.2521801", "StartTime": "03/23/2020 09:56:31 +00:00", "IsSuccessful": true, "Context": {}} ``` -Or, alternatively you can pass allong the IoT connection string itself so the host name will be selected for you. +Or, alternatively you can pass along the IoT connection string itself so the host name will be selected for you. **Installation** @@ -178,7 +179,7 @@ logger.AzureKeyVaultDependency(vaultUri: "https://my-secret-store.vault.azure.ne ### Measuring Azure Search dependencies -We allow you to measure Azure Search depdendencies for cognetive services. +We allow you to measure Azure Search dependencies for cognitive services. Here is how you can report an Azure Search dependency: @@ -311,7 +312,7 @@ logger.LogSqlDependency(connectionString, "my-table", "get-products", isSuccessf ### Measuring custom dependencies -Here is how you can areport a custom depenency: +Here is how you can measure a custom dependency: ```csharp using Microsoft.Extensions.Logging; @@ -410,7 +411,7 @@ Here is how an invalid `Order` can be reported: ```csharp using Microsoft.Extensions.Logging; -loger.LogSecurityEvent("Invalid Order"); +logger.LogSecurityEvent("Invalid Order"); // Output: {"EventName": "Invalid Order", "Context": {"EventType": "Security"}} ``` diff --git a/docs/versioned_docs/version-v2.4/01-index.md b/docs/versioned_docs/version-v2.4/01-index.md index 9f29d4b9..2ce4815f 100644 --- a/docs/versioned_docs/version-v2.4/01-index.md +++ b/docs/versioned_docs/version-v2.4/01-index.md @@ -19,18 +19,18 @@ For more granular packages we recommend reading the documentation. # Features -- [Making telemetry more powerful](/features/making-telemetry-more-powerful) by making it simple to provide contextual information -- [Writing different telemetry types](/features/writing-different-telemetry-types) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. -- [Correlation](/features/correlation) - A common set of correlation levels. +- [Making telemetry more powerful](./02-Features/making-telemetry-more-powerful.md) by making it simple to provide contextual information +- [Writing different telemetry types](./02-Features/writing-different-telemetry-types.md) - Go beyond logs with our `ILogger` extensions for Dependencies, Events, Requests & Metrics. +- [Correlation](./02-Features/correlation.md) - A common set of correlation levels. - Telemetry - - [Enrichment](/features/telemetry-enrichment) - A set of enrichers to improve telemetry information. - - [Filters](/features/telemetry-filter) - A set of filters to control telemetry flow with. + - [Enrichment](./02-Features/telemetry-enrichment.md) - A set of enrichers to improve telemetry information. + - [Filters](./02-Features/telemetry-filter.md) - A set of filters to control telemetry flow with. - Sinks - - [Azure Application Insights](/features/sinks/azure-application-insights) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights + - [Azure Application Insights](./02-Features/sinks/azure-application-insights.md) - Flow Traces, Dependencies, Events, Requests & Metrics information to Azure Application Insights # Guidance -- [Using Arcus & Serilog in Azure Functions](/guidance/use-with-dotnet-and-functions) +- [Using Arcus & Serilog in Azure Functions](./03-Guidance/use-with-dotnet-and-functions.md) # License This is licensed under The MIT License (MIT). Which means that you can use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the web application. But you always need to state that Codit is the original author of this web application. diff --git a/docs/versioned_docs/version-v2.4/02-Features/correlation.md b/docs/versioned_docs/version-v2.4/02-Features/correlation.md index 765315b6..5161d2bb 100644 --- a/docs/versioned_docs/version-v2.4/02-Features/correlation.md +++ b/docs/versioned_docs/version-v2.4/02-Features/correlation.md @@ -46,7 +46,7 @@ namespace Application ``` ## Custom Correlation -We register two interfaces during the registration of the correlation: `ICorrealtionInfoAccessor` and `ICorrelationInfoAccessor<>`. +We register two interfaces during the registration of the correlation: `ICorrelationInfoAccessor` and `ICorrelationInfoAccessor<>`. The reason is because some applications require a custom `CorrelationInfo` model, and with using the generic interface `ICorrelationInfoAccessor<>` we can support this. **Example** @@ -192,7 +192,7 @@ namespace Application This custom options model can then be included when registering the correlation: ```csharp -using Microsoft.Excentions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection; namespace Application { diff --git a/docs/versioned_docs/version-v2.4/02-Features/making-telemetry-more-powerful.md b/docs/versioned_docs/version-v2.4/02-Features/making-telemetry-more-powerful.md index b0679f41..d2934f61 100644 --- a/docs/versioned_docs/version-v2.4/02-Features/making-telemetry-more-powerful.md +++ b/docs/versioned_docs/version-v2.4/02-Features/making-telemetry-more-powerful.md @@ -25,7 +25,7 @@ logger.LogEvent("Order Created", telemetryContext); By doing so, you'll be able to interact more efficient with your logs by filtering, searching, ... on it. -We support this for all [telemetry types that you can write](/features/writing-different-telemetry-types). +We support this for all [telemetry types that you can write](./writing-different-telemetry-types.md). ### Seeing the power in action diff --git a/docs/versioned_docs/version-v2.4/02-Features/sinks/azure-application-insights.md b/docs/versioned_docs/version-v2.4/02-Features/sinks/azure-application-insights.md index 722eb8d9..10d52285 100644 --- a/docs/versioned_docs/version-v2.4/02-Features/sinks/azure-application-insights.md +++ b/docs/versioned_docs/version-v2.4/02-Features/sinks/azure-application-insights.md @@ -153,7 +153,7 @@ var host = Host.CreateDefaultBuilder() string instrumentationKey = context.Configuration["ApplicationInsights:InstrumentationKey"]; - if (!String.IsNullOrWhiteSpace(instrumentationKey)) + if (!string.IsNullOrWhiteSpace(instrumentationKey)) { loggerConfiguration.WriteTo.AzureApplicationInsights(instrumentationKey, LogEventLevel.Information); } @@ -172,7 +172,8 @@ using Arcus.Security.Core; var host = Host.CreateDefaultBuilder() .ConfigureSecretStore((context, config, builder) => { - // Configure the secretstore here + // Configure the secret store here + // https://security.arcus-azure.net/features/secret-store/ }) .UseSerilog((context, serviceProvider, loggerConfig) => { @@ -183,7 +184,7 @@ var host = Host.CreateDefaultBuilder() var instrumentationKey = secretProvider.GetRawSecretAsync("ApplicationInsights:InstrumentationKey").GetAwaiter().GetResult(); - if (!String.IsNullOrWhiteSpace(instrumentationKey)) + if (!string.IsNullOrWhiteSpace(instrumentationKey)) { loggerConfiguration.WriteTo.AzureApplicationInsights(instrumentationKey, LogEventLevel.Information); } diff --git a/docs/versioned_docs/version-v2.4/02-Features/telemetry-enrichment.md b/docs/versioned_docs/version-v2.4/02-Features/telemetry-enrichment.md index b8ec690c..e2453d7d 100644 --- a/docs/versioned_docs/version-v2.4/02-Features/telemetry-enrichment.md +++ b/docs/versioned_docs/version-v2.4/02-Features/telemetry-enrichment.md @@ -7,10 +7,17 @@ layout: default We provide a variety of enrichers for Serilog: -- [Application Enricher](#application-enricher) -- [Correlation Enricher](#correlation-enricher) -- [Kubernetes Enricher](#kubernetes-enricher) -- [Version Enricher](#version-enricher) +- [Telemetry Enrichment](#telemetry-enrichment) + - [Installation](#installation) + - [Application Enricher](#application-enricher) + - [Custom Serilog property names](#custom-serilog-property-names) + - [Correlation Enricher](#correlation-enricher) + - [Custom Serilog property names](#custom-serilog-property-names-1) + - [Kubernetes Enricher](#kubernetes-enricher) + - [Custom Serilog property names](#custom-serilog-property-names-2) + - [Version Enricher](#version-enricher) + - [Custom application version](#custom-application-version) + - [Custom Serilog property names](#custom-serilog-property-names-3) ## Installation @@ -23,7 +30,7 @@ PM > Install-Package Arcus.Observability.Telemetry.Serilog.Enrichers ## Application Enricher The `Arcus.Observability.Telemetry.Serilog.Enrichers` library provides a [Serilog enricher](https://github.com/serilog/serilog/wiki/Enrichment) -that adds the application's component name to the log event as a log property with the name `ComponentName` and gives the opportiunity to choose the location from where the application 'instance' should be retrieved. +that adds the application's component name to the log event as a log property with the name `ComponentName` and gives the opportunity to choose the location from where the application 'instance' should be retrieved. **Example** Name: `ComponentName` @@ -42,7 +49,7 @@ logger.Information("Some event"); // Output: Some event {ComponentName: My application component, MachineName: MyComputer} ``` -Or, alternatively one can choose to use the Kubernetes information which our [Application Insights](./sinks/azure-application-insights) sink will prioritize above the `MachineName` when determining the telemetry `Cloud.RoleInstance`. +Or, alternatively one can choose to use the Kubernetes information which our [Application Insights](./sinks/azure-application-insights.md) sink will prioritize above the `MachineName` when determining the telemetry `Cloud.RoleInstance`. ```csharp using Serilog; @@ -255,7 +262,7 @@ logger.Information("Some event"); ### Custom application version -The version enricher allows you to specify an `IAppVersion` instance that retrieves your custom application version, which will be used during enrichement. +The version enricher allows you to specify an `IAppVersion` instance that retrieves your custom application version, which will be used during enrichment. By default this is set to the version of the current executing assembly. **Assembly version as application version** @@ -325,7 +332,7 @@ ILogger logger = new LoggerConfiguration() ### Custom Serilog property names -The version enricher allows you to specify the name of the property that will be added to the log event during enrichement. +The version enricher allows you to specify the name of the property that will be added to the log event during enrichment. By default this is set to `version`. ```csharp diff --git a/docs/versioned_docs/version-v2.4/02-Features/telemetry-filter.md b/docs/versioned_docs/version-v2.4/02-Features/telemetry-filter.md index 533663e6..e42ac966 100644 --- a/docs/versioned_docs/version-v2.4/02-Features/telemetry-filter.md +++ b/docs/versioned_docs/version-v2.4/02-Features/telemetry-filter.md @@ -42,7 +42,7 @@ ILogger logger = new LoggerConfiguration() Alternatively, you can explicitly specify if it should track telemetry or not based on the application configuration has to be tracked or not : ```csharp -var trackDependencies = configuration["telemetry:depenencies:isEnabled"]; +var trackDependencies = configuration["telemetry:dependencies:isEnabled"]; ILogger logger = new LoggerConfiguration() .WriteTo.AzureApplicationInsights("") .Filter.With(TelemetryTypeFilter.On(TelemetryType.Dependency, isTrackingEnabled: bool.Parse(trackDependencies))) diff --git a/docs/versioned_docs/version-v2.4/02-Features/writing-different-telemetry-types.md b/docs/versioned_docs/version-v2.4/02-Features/writing-different-telemetry-types.md index a3724c04..4be1190c 100644 --- a/docs/versioned_docs/version-v2.4/02-Features/writing-different-telemetry-types.md +++ b/docs/versioned_docs/version-v2.4/02-Features/writing-different-telemetry-types.md @@ -9,10 +9,30 @@ Logs are a great way to gain insights, but sometimes they are not the best appro We provide the capability to track the following telemetry types on top of ILogger with good support on Serilog: -- [Dependencies](#dependencies) -- [Events](#events) -- [Metrics](#metrics) -- [Requests](#requests) +- [Write different telemetry types](#write-different-telemetry-types) + - [Installation](#installation) + - [Dependencies](#dependencies) + - [Measuring Azure Blob Storage dependencies](#measuring-azure-blob-storage-dependencies) + - [Measuring Azure Cosmos DB dependencies](#measuring-azure-cosmos-db-dependencies) + - [Measuring Azure Event Hubs dependencies](#measuring-azure-event-hubs-dependencies) + - [Measuring Azure IoT Hub dependencies](#measuring-azure-iot-hub-dependencies) + - [Measuring Azure Key Vault dependencies](#measuring-azure-key-vault-dependencies) + - [Measuring Azure Search dependencies](#measuring-azure-search-dependencies) + - [Measuring Azure Service Bus dependencies](#measuring-azure-service-bus-dependencies) + - [Measuring Azure Table Storage Dependencies](#measuring-azure-table-storage-dependencies) + - [Measuring HTTP dependencies](#measuring-http-dependencies) + - [Measuring SQL dependencies](#measuring-sql-dependencies) + - [Measuring custom dependencies](#measuring-custom-dependencies) + - [Making it easier to measure telemetry](#making-it-easier-to-measure-telemetry) + - [Making it easier to measure dependencies](#making-it-easier-to-measure-dependencies) + - [Making it easier to measure requests](#making-it-easier-to-measure-requests) + - [Making it easier to link services](#making-it-easier-to-link-services) + - [Events](#events) + - [Security Events](#security-events) + - [Metrics](#metrics) + - [Requests](#requests) + - [Incoming Azure Service Bus requests](#incoming-azure-service-bus-requests) + - [Incoming HTTP requests](#incoming-http-requests) For most optimal output, we recommend using our [Azure Application Insights sink](/features/sinks/azure-application-insights). @@ -32,20 +52,6 @@ PM > Install-Package Arcus.Observability.Telemetry.Core Dependencies allow you to track how your external dependencies are doing to give you insights on performance and error rate. -We provide support for the following dependencies: - -- [Azure Blob Storage](#measuring-azure-blob-storage-dependencies) -- [Azure Cosmos DB](#measuring-azure-cosmos-db-dependencies) -- [Azure Event Hubs](#measuring-azure-event-hubs-dependencies) -- [Azure IoT Hub](#measuring-azure-iot-hub-dependencies) -- [Azure Key Vault](#measuring-azure-key-vault-dependencies) -- [Azure Search](#measuring-azure-search-dependencies) -- [Azure Service Bus](#measuring-azure-service-bus-dependencies) -- [Azure Table Storage](#measuring-azure-table-storage-dependencies) -- [HTTP](#measuring-http-dependencies) -- [SQL](#measuring-sql-dependencies) -- [Custom](#measuring-custom-dependencies) - Since measuring dependencies can add some noise in your code, we've introduced `DependencyMeasurement` to make it simpler. ([docs](#making-it-easier-to-measure-dependencies)) Linking service-to-service correlation can be hard, this can be made easier with including dependency ID's. ([docs](#making-it-easier-to-link-services)) @@ -129,7 +135,7 @@ logger.LogIotHubDependency(iotHubName: "sensors", isSuccessful: true, startTime: // Output: {"DependencyType": "Azure IoT Hub", "TargetName": "sensors", "Duration": "00:00:00.2521801", "StartTime": "03/23/2020 09:56:31 +00:00", "IsSuccessful": true, "Context": {}} ``` -Or, alternatively you can pass allong the IoT connection string itself so the host name will be selected for you. +Or, alternatively you can pass along the IoT connection string itself so the host name will be selected for you. **Installation** @@ -179,7 +185,7 @@ logger.AzureKeyVaultDependency(vaultUri: "https://my-secret-store.vault.azure.ne ### Measuring Azure Search dependencies -We allow you to measure Azure Search depdendencies for cognetive services. +We allow you to measure Azure Search dependencies for cognitive services. Here is how you can report an Azure Search dependency: @@ -312,7 +318,7 @@ logger.LogSqlDependency(connectionString, "my-table", "get-products", isSuccessf ### Measuring custom dependencies -Here is how you can areport a custom depenency: +Here is how you can measure a custom dependency: ```csharp using Microsoft.Extensions.Logging; @@ -469,7 +475,7 @@ Here is how an invalid `Order` can be reported: ```csharp using Microsoft.Extensions.Logging; -loger.LogSecurityEvent("Invalid Order"); +logger.LogSecurityEvent("Invalid Order"); // Output: {"EventName": "Invalid Order", "Context": {"EventType": "Security"}} ``` @@ -518,7 +524,7 @@ using (var measurement = RequestMeasurement.Start()) ``` We provide support for all Azure Service Bus entity types such as queues, topics and subscriptions. -All these types can be tracked by passing allong the full Azure Service namespace, or with providing the namespace name and the Azure cloud separately. +All these types can be tracked by passing along the full Azure Service namespace, or with providing the namespace name and the Azure cloud separately. ```csharp