Skip to content

Commit

Permalink
docs: update README's and add to nuspec (fixes 'Your package is missi…
Browse files Browse the repository at this point in the history
…ng a README.' on nuget.org)
  • Loading branch information
skwasjer committed Dec 17, 2024
1 parent 696a689 commit 8443128
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 15 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Correlate

Correlate provides flexible .NET Core support for correlation ID in ASP.NET Core and HttpClient.
Correlate provides flexible .NET support (ASP.NET Core/HttpClient) to correlate activities between decoupled components (eg. microservices) using a correlation ID.

## Installation

Expand Down Expand Up @@ -31,7 +31,7 @@ dotnet add package Correlate.AspNetCore

## Usage

In an ASP.NET Core (MVC) application, register Correlate to handle incoming requests with a correlation id. Correlate will create a request scoped async context holding the correlation id, which can then propagate down the request pipeline.
In an ASP.NET Core application, register Correlate to handle incoming requests with a correlation id. Correlate will create a request scoped async context holding the correlation id, which can then propagate down the request pipeline.

When using `HttpClient` to call other services, you can use `HttpClientFactory` to attach a delegating handler to any `HttpClient` which will propagate the correlation id header to the outgoing request for cross service correlation. Further more, there are other integration packages that also propagate the correlation id to other transports (see down below).

Expand All @@ -51,12 +51,11 @@ public class Startup
{
// Register services.
services.AddCorrelate(options =>
options.RequestHeaders = new []
{
options.RequestHeaders = [
// List of incoming headers possible. First that is set on given request is used and also returned in the response.
"X-Correlation-ID",
"My-Correlation-ID"
}
]
);

// Register a typed client that will include the correlation id in outgoing request.
Expand Down Expand Up @@ -171,7 +170,7 @@ await _correlationManager.CorrelateAsync(orderId, () => {
- `ICorrelationManager`
- `IAsyncCorrelationManager`

> Note that the Correlate internals are intrinsically asynchronous as it relies on [`AsyncLocal<T>`](https://docs.microsoft.com/en-us/dotnet/api/system.threading.asynclocal-1) to save the correlation context. The synchronous implementation is useful for integrations that have a synchronous API surface but are still used in asynchronous context, but should only be used as such.
> Note that the Correlate internals are intrinsically asynchronous as it relies on [`AsyncLocal<T>`](https://docs.microsoft.com/en-us/dotnet/api/system.threading.asynclocal-1) to save the correlation context. The synchronous implementation is useful for integrations that have a synchronous API surface but are still used in asynchronous context, and thus Correlate should only be used as such.
## ICorrelationIdFactory

Expand Down Expand Up @@ -212,7 +211,7 @@ Please consider that since .NET Core 3.1 and up there is built-in support for [W
- Visual Studio 2022
- .NET 9 SDK
- .NET 8 SDK
- .NET 3.1 SDK
- .NET 6.0 SDK

#### Contributions
PR's are welcome. Please rebase before submitting, provide test coverage, and ensure the AppVeyor build passes. I will not consider PR's otherwise.
Expand Down
1 change: 1 addition & 0 deletions src/Correlate.Abstractions/Correlate.Abstractions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<Description>Provides abstractions to correlate requests between microservices.</Description>
<PackageProjectUrl>https://github.com/skwasjer/Correlate</PackageProjectUrl>
<PackageTags>correlationid, correlation, correlate, causation, aspnet, middleware, httpclient, httpclientfactory</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Correlate.Abstractions/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ASP.NET Core middleware component to correlate requests between microservices using correlation ID request headers.
Abstractions to correlate activities between decoupled components (eg. microservices).

### Useful links

Expand Down
1 change: 1 addition & 0 deletions src/Correlate.AspNetCore/Correlate.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<Description>ASP.NET Core middleware component to correlate requests between microservices using correlation ID request headers.</Description>
<PackageProjectUrl>https://github.com/skwasjer/Correlate</PackageProjectUrl>
<PackageTags>correlationid, correlation, correlate, causation, aspnet, middleware, httpclient, httpclientfactory</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 1 addition & 5 deletions src/Correlate.AspNetCore/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
Provides abstractions to correlate requests between microservices.

### Migration from v4.x to 5.0.0

- Replace `Correlate.AspNetCore.Middleware` namespace with `Correlate.AspNetCore`.
An ASP.NET Core implementation to correlate activities between decoupled components (eg. microservices) via a HTTP header.

### Useful links

Expand Down
1 change: 1 addition & 0 deletions src/Correlate.Core/Correlate.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<Description>Correlate requests between microservices using a correlation ID.</Description>
<PackageProjectUrl>https://github.com/skwasjer/Correlate</PackageProjectUrl>
<PackageTags>correlationid, correlation, correlate, causation, aspnet, middleware, httpclient, httpclientfactory</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Correlate.Core/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Correlate requests between microservices using a correlation ID.
The core implementation to correlate activities between decoupled components (eg. microservices) using a correlation ID.

### Useful links

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<Description>Dependency injection extensions for Correlate.</Description>
<PackageProjectUrl>https://github.com/skwasjer/Correlate</PackageProjectUrl>
<PackageTags>correlationid, correlation, correlate, causation, aspnet, middleware, httpclient, httpclientfactory</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Correlate.DependencyInjection/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Dependency injection extensions for Correlate.
Dependency injection extensions to register the Correlate services.

### Dependency registration example

Expand Down

0 comments on commit 8443128

Please sign in to comment.