Class TracingHookBuilder
TracingHookBuilder creates a TracingHook. The hook can be passed into the SDK's Hook configuration builder Hooks(HookConfigurationBuilder). To create a TracingHook from a builder, call Build().
Inherited Members
Namespace: LaunchDarkly.Sdk.Server.Telemetry
Assembly: LaunchDarkly.ServerSdk.Telemetry.dll
Syntax
public class TracingHookBuilder
Methods
| Edit this page View SourceBuild()
Builds the TracingHook with the configured options.
The hook may be passed into Hooks(HookConfigurationBuilder).
Declaration
public TracingHook Build()
Returns
Type | Description |
---|---|
TracingHook | the new hook |
CreateActivities(bool)
The TracingHook will create Activitys for flag evaluations. The activities will be children of the current activity, if one exists, or root activities. Disabled by default.
NOTE: This is an experimental option; it may be removed and behavior is subject to change within minor versions.
Declaration
public TracingHookBuilder CreateActivities(bool createActivities = true)
Parameters
Type | Name | Description |
---|---|---|
bool | createActivities | true to create activities, false otherwise |
Returns
Type | Description |
---|---|
TracingHookBuilder | this builder |
EnvironmentId(string)
The environment ID associated with the SDK configuration. In typical usage the environment ID should not be specified. The environment ID only needs to be manually specified if it cannot be retrieved from the SDK.
This is not the same as the SDK key. The environment ID is equivalent to the client-side ID in the LaunchDarkly UI and documentation.
Declaration
public TracingHookBuilder EnvironmentId(string environmentId)
Parameters
Type | Name | Description |
---|---|---|
string | environmentId | The environment the SDK is configured to connect to. |
Returns
Type | Description |
---|---|
TracingHookBuilder | this builder |
IncludeVariant(bool)
The TracingHook will include the flag variant in the current activity, if one exists. The variant representation is a JSON string. Disabled by default.
Declaration
public TracingHookBuilder IncludeVariant(bool includeVariant = true)
Parameters
Type | Name | Description |
---|---|---|
bool | includeVariant | true to include variants, false otherwise |
Returns
Type | Description |
---|---|
TracingHookBuilder | this builder |