TelemetryOption
Defines the settings used by TelemetryTrace to capture and publish Telemetry data.
Properties
| Name | Description |
|---|---|
| Application | The name of the application that produces the telemetry. Set via the constructor. |
| Group | The group the application is categorized under. Defaults to "Default". |
| Host | The collector endpoint to publish to. Defaults to http://localhost:5000. |
| ApiKey | The API key sent via the X-API-Key header. Leave null if the collector does not require one. |
| Frequency | How often the buffered telemetry is flushed. Defaults to 5 seconds. |
Creating an Instance
var option = new TelemetryOption("MyApp")
{
Host = "https://your-collector-host",
ApiKey = "YOUR_API_KEY",
Group = "Default",
Frequency = TimeSpan.FromSeconds(5)
};
RepoDb.Telemetry.Default uses DefaultTelemetryOption, a subclass of this class.