Skip to main content
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.
Then add a Foveus section to your configuration.
You do not need to construct 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.
Test keys are created automatically during onboarding. Live keys are not self-serve during private beta. They are issued by the Foveus team.

ServiceName

ServiceName identifies the service producing telemetry. If you do not set it, Foveus uses your project assembly name.
Override this when your assembly name is not the name your team wants to see in Foveus.

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 no Mode 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:
Do not use a live key in local development.

Capture profiles

CaptureProfile lets you quickly tune capture behavior. Example:
Use 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.
Request body capture is useful for debugging API behavior, but you should still avoid sending sensitive data.

Response body capture

Response body capture helps you inspect business outcomes and provider responses.
Response bodies often contain sensitive data. Enable this intentionally and review redaction settings first.

Context sampling

ContextSamplingRate controls how often successful context snapshots are captured. Failed requests always capture context.
A value of 0.01 means 1%. Increase it when debugging. Lower it for high-volume services.

Path filtering

Use path filters to reduce noise.
Use this for endpoints such as:
Use 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:
Redaction is a safety layer, not a reason to intentionally send secrets. Avoid capturing sensitive data whenever possible.

Performance options

Performance options help tune the SDK for high-volume services. Example:
Use HighThroughput profile for busy services where low overhead matters.

Debugging options

Debugging options help you troubleshoot SDK behavior. Example:
Use debug logging temporarily. Turn it off when you are done troubleshooting.

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.

Local development

Normal production service

High-volume service

Sensitive API

Configuring options

Set options in the Foveus configuration section, not in code:
Any configuration source works, including environment variables such as Foveus__ApiKey and your secret manager.

Troubleshooting

I changed an option but behavior did not change

Check that:
  • the Foveus section 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:
  • CaptureResponseBodies is 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
  • ExcludedPathPrefixes
  • CaptureRequestBodies: false
  • CaptureResponseBodies: false

Next steps