The key decides the mode: a
fov_test_ key sends to Test mode and a fov_live_ key sends to Live mode. There is no separate mode setting.
Override these values only when you need more control.
Some behaviour on this page requires Foveus.SDK 1.1.0-beta.18 or later: disabling Foveus on invalid configuration (earlier versions throw at startup), reading
Source, HttpTimeout, MaxRetryAttempts, RetryBaseDelay and MaxBodyCaptureSizeBytes from configuration (earlier versions ignore them), and masking redacted query-string parameters.Configuration methods
You can configure Foveus in two ways:Minimal setup
Use minimal setup for local development, sandbox testing, or quick validation.Configuration-based setup
For most applications, configure Foveus fromappsettings.json, environment variables, or your secret manager.
Foveus section to your configuration.
Invalid configuration
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. It writes Foveus is disabled: <reason> to the console and to your application’s log, and your application keeps running without Foveus telemetry.
A key that is revoked later is not a startup failure: ingestion requests fail with HTTP 401 at runtime.
Core options
Service name
ServiceName identifies the service producing telemetry.
If you do not set it, Foveus uses your project assembly name.
ServiceName only when the default is not what you want to see in the dashboard.
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
The mode is the Foveus telemetry boundary. The API key decides it: afov_test_ key sends to Test mode and a fov_live_ key sends to Live mode. There is no Mode setting.
To send live telemetry, use a live key:
Middleware
For ASP.NET Core APIs, add the Foveus middleware.Advanced options
Most SDK options can also be configured fromappsettings.json under the Foveus section. Source, HttpTimeout, MaxRetryAttempts, RetryBaseDelay and MaxBodyCaptureSizeBytes are read from configuration only by the SDK version noted at the top of this page.
Use this when you want to tune capture behavior, performance, redaction, batching, or path filtering without constructing options manually in code.
You do not need to construct
FoveusOptions directly for most services. Use appsettings.json or environment variables when you want configuration outside code.Capture profiles
CaptureProfile lets you quickly tune how much telemetry Foveus captures.
Profiles:
Example:
Debug only when you need deeper local troubleshooting. It can capture more context than you usually want in production.
Capture behavior
The SDK can capture telemetry such as:- HTTP executions
- request metadata
- response metadata
- request query values
- request body context
- response body context
- logs, if logging integration is configured
- outcome and failure evidence
Request and response bodies
You can control whether Foveus captures request and response body context.Sampling
UseContextSamplingRate to control how often successful context snapshots are captured. Failed requests always capture context.
0.01 means 1%.
Use a higher sampling rate while debugging. Use a lower rate for high-volume production services.
Path filtering
Use path filters to reduce noise or exclude endpoints you do not want to capture.Redaction
The SDK redacts these headers by default:Authorization, Cookie, Set-Cookie, X-API-Key, X-Auth-Token and Authentication.
In captured JSON request and response bodies, it redacts fields with these names by default: 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 and otp.
You can add domain-specific fields to the redaction list.
password is redacted, userPassword is not. A string, number, boolean or null value is replaced with "***"; an object or array under a redacted key is not masked. Query-string parameters whose name is a redacted field are 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. Avoid sending sensitive data when possible.
See Redaction for details.
Production setup
For production, use:- a live API key
- a service name your team recognizes
- a production environment label
- a secret manager for API keys
- conservative capture and redaction settings
Troubleshooting
No executions appear
Check that:ApiKeyis set- the startup log does not contain
Foveus is disabled:— if it does, fix the reason it gives - your service can reach Foveus
app.UseFoveus()is registered- you are viewing the right mode in the dashboard
- your time range includes the request
- your service name matches your search
Service name looks wrong
If the service name appears as your project assembly name and you want a different name, setServiceName.
Telemetry appears in Test mode
The service is using afov_test_ key. A test key always sends to Test mode, whatever Environment is set to.
If you are sending production telemetry, use a live key.
Context search does not find a field
Check that:- the field was captured in request, response, query, or custom context
- the value is scalar
- the value was ingested after context indexing was enabled
- the key is not blocked by safety policy
- the field is within capture and indexing limits
Next steps
- Install the .NET SDK: Install the .NET SDK
- Learn about services and environments: Services and environments
- Search by context: Execution Context Search
- Review FoveusOptions: FoveusOptions
- Review redaction: Redaction