Skip to main content
Install the Foveus .NET SDK to capture executions from your API or worker service. The SDK connects your service to Foveus and sends execution telemetry to your workspace.

Install the package

Add the SDK package to your service.
During private beta, your package name or package source may be different. Use the package name and feed URL provided during onboarding.

Configure the SDK

You can configure Foveus in two ways.

Minimal setup

Use this for local testing or quick validation.
Do not hardcode API keys in production code. Use this only for quick local testing.

Configuration-based setup

For most applications, configure Foveus from appsettings.json, environment variables, or your secret manager.
Add a Foveus section to your configuration.
If the API key is missing, empty or malformed, or a setting is out of range, Foveus disables itself and writes Foveus is disabled: <reason> to the console and to your application’s log. Your application keeps running without Foveus telemetry. Requires Foveus.SDK 1.1.0-beta.18 or later; earlier versions throw at startup.

Add the middleware

For ASP.NET Core APIs, add the Foveus middleware after building the app.
The middleware captures HTTP executions and sends telemetry to Foveus. UseFoveus() is available on .NET 6 and later.
Place Foveus after middleware that establishes request context, authentication, or correlation IDs if your service depends on those values.

Choose a service name

Use a stable service name that identifies the logical service. Avoid embedding the deployment environment in the service name:
Prefer a stable service name plus Environment:
This keeps your service data easier to search and compare across environments.

Set the environment

Use Environment as a free-text label for the deployment. When you do not set it, it is test or live, taken from the API key. It is not the ASP.NET Core environment. Examples:

Test and Live mode

The API key decides the mode. There is no separate mode setting. Use your test key while validating your setup. Use a live key when your service is ready to send production telemetry. During private beta, live keys are issued by the Foveus team.

Store your API key safely

Do not commit API keys to source control. For local development, use user secrets:
For deployed services, use your hosting provider’s secret manager. Examples:
  • Azure App Configuration or Key Vault
  • AWS Secrets Manager
  • Google Secret Manager
  • Kubernetes secrets
  • Render environment variables

Verify installation

Start your service and call an endpoint.
Open Foveus and go to Executions. Search by service:
If the SDK is configured correctly, you should see recent executions from your service.

Troubleshooting

No executions appear

Check that:
  • your API key is valid
  • the startup log does not contain Foveus is disabled: — if it does, fix the reason it gives
  • your service can reach Foveus
  • you are searching by the right service name (the project assembly name if you did not set ServiceName)
  • the dashboard mode you are viewing matches your key (fov_test_ or fov_live_)
  • your request reached the middleware
  • your selected time range includes the request time

The service name looks wrong

If you see service names like orders-api-production, update your configuration:

Context search does not find a value

Execution Context Search uses indexed execution context. It does not scan arbitrary raw request bodies. By default, context is captured for every failed request and for 1% of successful requests (ContextSamplingRate is 0.01), and response bodies are not captured. See FoveusOptions. If you recently enabled context indexing, trigger a new request. Newly indexed context applies to new ingested executions.

Next steps