Skip to content

Commit

Permalink
Add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
glucaci committed Mar 8, 2021
1 parent 956bcd8 commit cc269fd
Showing 1 changed file with 44 additions and 3 deletions.
47 changes: 44 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,50 @@
Work in Progress
Elastic APM extensions for multiple .NET libraries.
## Features

## Getting Started
- Messaging
- [X] [MassTransit](#masstrasit)
- [ ] Azure Service Bus

## Features
- GraphQL
- [X] [HotChocolate](#hotchocolate)

- Storage
- [ ] Azure Blob Storage

### MassTransit
```csharp
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
})
.UseElasticApm(
// Add additional diagnostic subscribers e.g. AspNetCore, Http, etc
new MassTransitDiagnosticsSubscriber());
```

The following events from the [MassTransit DiagnosticSource](https://masstransit-project.com/advanced/monitoring/diagnostic-source.html) are instrumented:
- `Transport.Send`
- `Transport.Receive`

### HotChocolate
HotChocolate by default is not emitting diagnostic events, but has the infrastructure to instrument each request.
```csharp
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
// Add your services
// Add HotChocolate GraphQL Server
services
.AddGraphQLServer()
.AddQueryType<Query>()
.AddObservability(); // Register instrumentation for Elastic APM
}
}
```
## Community

This project has adopted the code of conduct defined by the [Contributor Covenant](https://contributor-covenant.org/)
Expand Down

0 comments on commit cc269fd

Please sign in to comment.