Skip to content

Commit e1f46c7

Browse files
authored
Add note about constructor dependency injection
1 parent d8a9c8a commit e1f46c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

articles/azure-monitor/app/api-filtering-sampling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ public void Initialize(ITelemetry telemetry)
494494

495495
#### Add information from HttpContext
496496

497-
The following sample initializer reads data from the [`HttpContext`](https://docs.microsoft.com/aspnet/core/fundamentals/http-context?view=aspnetcore-3.1) and appends it to a `RequestTelemetry` instance.
497+
The following sample initializer reads data from the [`HttpContext`](https://docs.microsoft.com/aspnet/core/fundamentals/http-context?view=aspnetcore-3.1) and appends it to a `RequestTelemetry` instance. The `IHttpContextAccessor` is automatically provided through constructor dependency injection.
498498

499499
```csharp
500500
public class HttpContextRequestTelemetryInitializer : ITelemetryInitializer

0 commit comments

Comments
 (0)