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.
Core options
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 describes where your service is running.
If you do not set it, Foveus uses the current app environment.
Mode
Mode controls the Foveus data boundary.
Foveus defaults to Test mode.
Set Mode only when sending live telemetry.
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.
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.
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.
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
Options-based configuration
You can also configure Foveus directly in code.appsettings.json or environment variables.
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
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