Reolving TracerFactory is not required when use Opentelemetry.hosting (#333)

This commit is contained in:
Sergey Kanzhelev 2019-11-09 12:46:56 -08:00 committed by GitHub
parent 9223282da8
commit 7a6efc651a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 12 deletions

View File

@ -270,17 +270,6 @@ Configuration is done by user application: it should configure exporter and may
}); });
``` ```
3. Start auto-collectors
To start collection or just to create tracers to creates spans manually, `TracerFactory` needs to be resolved.
```csharp
public void Configure(IApplicationBuilder app, TracerFactory factory)
{
// ...
}
```
### Using StackExchange.Redis collector ### Using StackExchange.Redis collector
Outgoing http calls to Redis made using StackExchange.Redis library can be automatically tracked. Outgoing http calls to Redis made using StackExchange.Redis library can be automatically tracked.
@ -308,7 +297,7 @@ Outgoing http calls to Redis made using StackExchange.Redis library can be autom
} }
``` ```
You can combine it with dependency injection as shown in previous example, in this case, do not forget to resolve `TracerFactory`. You can combine it with dependency injection as shown in previous example.
### Custom samplers ### Custom samplers