Override these values only when you need more control.
Configuration methods
You can configure Foveus in three common 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.
Mode to live.
Options-based setup
Use options-based setup when you want to configure the SDK directly in code.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 describes where your service is running.
If you do not set it, Foveus uses the current app environment.
Mode
Mode controls the Foveus telemetry boundary.
Foveus defaults to Test mode.
You only need to set Mode when sending live telemetry.
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.
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.
Common profiles include:
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.
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
Foveus applies safety controls before storing or indexing context. You can add domain-specific fields to the redaction list.Production setup
For production, use:- a live API key
Mode: "live"- 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- 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
Foveus defaults to Test mode. If you are sending production telemetry, setMode to live.
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