Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use file paths io url routes #347

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/preview/01-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions docs/preview/02-Features/correlation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**
Expand Down Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion docs/preview/02-Features/making-telemetry-more-powerful.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 4 additions & 3 deletions docs/preview/02-Features/sinks/azure-application-insights.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ var host = Host.CreateDefaultBuilder()

string instrumentationKey = context.Configuration["ApplicationInsights:InstrumentationKey"];

if (!String.IsNullOrWhiteSpace(instrumentationKey))
if (!string.IsNullOrWhiteSpace(instrumentationKey))
fgheysels marked this conversation as resolved.
Show resolved Hide resolved
{
loggerConfiguration.WriteTo.AzureApplicationInsights(instrumentationKey, LogEventLevel.Information);
}
Expand All @@ -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) =>
{
Expand All @@ -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);
}
Expand Down
23 changes: 15 additions & 8 deletions docs/preview/02-Features/telemetry-enrichment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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`
Expand All @@ -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;
Expand Down Expand Up @@ -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**
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/preview/02-Features/telemetry-filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -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("<key>")
.Filter.With(TelemetryTypeFilter.On(TelemetryType.Dependency, isTrackingEnabled: bool.Parse(trackDependencies)))
Expand Down
58 changes: 32 additions & 26 deletions docs/preview/02-Features/writing-different-telemetry-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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))

Expand Down Expand Up @@ -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
Expand All @@ -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**

Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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

Expand Down
3 changes: 0 additions & 3 deletions docs/preview/03-Guidance/use-with-dotnet-and-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,13 @@ namespace Arcus.Samples.AzureFunction

builder.Services.AddLogging(loggingBuilder =>
{
loggingBuilder.ClearProvidersExceptFunctionProviders();
fgheysels marked this conversation as resolved.
Show resolved Hide resolved
loggingBuilder.AddSerilog(logger);
});
}
}
}
```

> :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
Expand Down
10 changes: 5 additions & 5 deletions docs/versioned_docs/version-v0.1.0/01-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions docs/versioned_docs/version-v0.1.0/02-Features/correlation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**
Expand Down Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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("<key>")
.Filter.With(TelemetryTypeFilter.On(TelemetryType.Dependency, isTrackingEnabled: bool.Parse(trackDependencies)))
Expand Down
Loading