Skip to content

Commit eb4a2ca

Browse files
committed
Add a paragraph on Asp.Net Core
1 parent bcfbb28 commit eb4a2ca

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,26 @@ And check that the status is "running".
5454

5555
The logs are available at the path you configured in `trace.config` `log_file` above.
5656

57+
### Automatic Instrumentation
58+
59+
#### ASP.NET Core
60+
61+
To instrument you ASP.NET Core application install the
62+
`Datadog.Trace.AspNetCore` NuGet package and the following line to your
63+
`ConfigureServices` method:
64+
65+
```csharp
66+
public void ConfigureServices(IServiceCollection services)
67+
{
68+
services
69+
.AddDatadogTrace()
70+
}
71+
```
72+
73+
Once your application is configured this way all the requests to your
74+
application will be traced and the active span will automatically be set to the
75+
currently executing request.
76+
5777
### Manual Instrumentation
5878

5979
#### Introduction

0 commit comments

Comments
 (0)