Document StackExchange.Redis instrumentation options (#1256)

* Document StackExchange.Redis instrumentation options

* Fix markdown
This commit is contained in:
Alan West 2020-09-10 09:30:30 -07:00 committed by GitHub
parent e78dcae1e2
commit 8b8731c3c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 1 deletions

View File

@ -61,8 +61,25 @@ For an ASP.NET application, adding instrumentation is typically done in the
This instrumentation can be configured to change the default behavior by using
`StackExchangeRedisCallsInstrumentationOptions`.
TODO - describe options
### FlushInterval
StackExchange.Redis has its own internal profiler. OpenTelmetry converts each
profiled command from the internal profiler to an Activity for collection. By
default, this conversion process flushes profiled commands on a 10 second
interval. The `FlushInterval` option can be used to adjust this internval.
The following example shows how to use `FlushInterval`.
```csharp
using Sdk.CreateTracerProviderBuilder()
.AddRedisInstrumentation(
connection,
options => options.FlushInterval = TimeSpan.FromSeconds(5))
.AddConsoleExporter()
.Build();
```
## References
* [OpenTelemetry Project](https://opentelemetry.io/)
* [StackExchange.Redis Profiling](https://stackexchange.github.io/StackExchange.Redis/Profiling_v1.html)