FoveusOptions controls how the Foveus SDK identifies your service, captures telemetry, sends data, protects sensitive values, and tunes performance.
Most applications should configure these options from appsettings.json.
Foveus section to your configuration.
FoveusOptions manually for most services.
Reading
Source, HttpTimeout, MaxRetryAttempts, RetryBaseDelay and MaxBodyCaptureSizeBytes from configuration, masking redacted query-string parameters, and disabling Foveus with a diagnostic when configuration is invalid all require Foveus.SDK 1.1.0-beta.18 or later. Earlier versions ignore those five keys and use the defaults, store query strings as sent, and throw at startup on invalid configuration.Core options
There is no
Mode option. The API key decides the mode.
If the API key is missing, empty or malformed, has an unknown prefix, ApiEndpoint is not an http or https URL, or a value is out of range, Foveus disables itself, writes Foveus is disabled: <reason> to the console and to your application’s log, and your application keeps running without Foveus telemetry.
API key
ApiKey is required.
ServiceName
ServiceName identifies the service producing telemetry.
If you do not set it, Foveus uses your project assembly name.
Environment
Environment is a free-text label that describes where your service is running.
If you do not set it, it is test or live, taken from the API key. It is not read from the ASP.NET Core environment.
Mode
There is noMode option. The API key decides the Foveus data boundary: a fov_test_ key sends to Test mode and a fov_live_ key sends to Live mode.
To send live telemetry, use a live key:
Capture profiles
CaptureProfile lets you quickly tune capture behavior.
Example:
Debug carefully. It can capture more context than you usually want in production.
Transport options
Transport options control how the SDK batches and sends telemetry to Foveus.HttpTimeout, MaxRetryAttempts and RetryBaseDelay are read from configuration only by the SDK version in the note at the top of this page. See Performance overhead for what happens when Foveus is unreachable.
Example:
Data capture options
Data capture options control what context the SDK captures.
Example:
Request body capture
Request body capture helps you understand what the client sent.Response body capture
Response body capture helps you inspect business outcomes and provider responses.Context sampling
ContextSamplingRate controls how often successful context snapshots are captured. Failed requests always capture context.
0.01 means 1%.
Increase it when debugging. Lower it for high-volume services.
Path filtering
Use path filters to reduce noise.IncludedPathPrefixes when you want allow-list behavior.
Privacy options
Privacy options control what Foveus masks or avoids storing.
Default redacted headers:
Authorization, Cookie, Set-Cookie, X-API-Key, X-Auth-Token, Authentication.
Default redacted fields: password, token, secret, key, creditCard, ssn, email, phone, address, accessToken, access_token, refreshToken, refresh_token, idToken, id_token, apiKey, api_key, clientSecret, client_secret, authorization, cardNumber, cvv, cvc, pin, otp.
Field names match exactly, ignoring case: password is redacted, userPassword is not. In captured JSON bodies, a string, number, boolean or null value is replaced with "***"; an object or array under a redacted key is not masked. A query-string parameter whose name is a redacted field is stored as ***; other parameters are stored as sent. Earlier SDK versions store the whole query string as sent. Log messages and exception messages are not redacted.
Example:
Performance options
Performance options help tune the SDK for high-volume services.
Example:
HighThroughput profile for busy services where low overhead matters.
Debugging options
Debugging options help you troubleshoot SDK behavior.
Example:
Outcome semantics options
Outcome semantics help Foveus understand whether an execution succeeded, failed, or returned a business-level failure.
Use outcome semantics when HTTP status alone is not enough.
For example, a provider may return HTTP 200 with a response body that means the operation failed. Outcome semantics can help Foveus classify that execution correctly.
Recommended setups
Local development
Normal production service
High-volume service
Sensitive API
Configuring options
Set options in theFoveus configuration section, not in code:
Foveus__ApiKey and your secret manager.
Troubleshooting
I changed an option but behavior did not change
Check that:- the
Foveussection is correctly named - the app is loading the expected configuration file
- environment variables are not overriding your values
- the service was restarted after config changes
- the option name matches the SDK property name
- the option is read from configuration by your SDK version (see the note at the top of this page)
- the startup log does not contain
Foveus is disabled:
Response body context is missing
Check that:CaptureResponseBodiesis enabled- the response body size is within
MaxBodyCaptureSizeBytes - the response content type is supported
- the path is not excluded
- sampling did not skip the context snapshot
- redaction did not remove the value
Too much telemetry is being sent
Use one or more of:CaptureProfile: "HighThroughput"- lower
ContextSamplingRate ExcludedPathPrefixesCaptureRequestBodies: falseCaptureResponseBodies: false
Next steps
- Configure the SDK: SDK configuration
- Review redaction: Redaction
- Review performance overhead: Performance overhead
- Learn about Execution Context Search: Execution Context Search