Skip to main content
Connect a .NET service to Foveus and view your first execution. In this guide, you’ll:
  1. Copy your test API key from onboarding
  2. Install the Foveus .NET SDK
  3. Configure your service
  4. Trigger a request or worker log
  5. View telemetry in Foveus

Before you start

You need:
  • A Foveus account
  • Access to your Foveus onboarding screen
  • A .NET API or worker service
  • Access to your app configuration
Your workspace is created automatically when you sign up. Your API key decides the mode. A fov_test_ key sends telemetry to Test mode and a fov_live_ key sends it to Live mode. There is no separate mode setting.
Use your test key while setting up Foveus. Switch to a live key only when you are ready to send production telemetry.

1. Copy your test API key

After signing in, Foveus guides you through onboarding. The first onboarding step shows your test API key. Your key should look similar to:
Copy the key from the onboarding screen. Keep your API key private. Do not commit it to source control.
During private beta, test keys are created automatically during onboarding. Live keys are not self-serve: the Foveus team issues them when you are ready to send production telemetry.

2. Install the .NET SDK

Install the Foveus .NET SDK in your service.
If your package name or package source is different during private beta, use the values shown in your onboarding screen or provided by the Foveus team.

3. Configure Foveus

Choose the setup style that matches your service.

Minimal setup

Use this when you want to connect quickly with your test API key.
With this setup, Foveus automatically uses: Because the key starts with fov_test_, telemetry goes to Test mode.
Do not hardcode API keys in production code. Use this only for local testing or quick validation.

Configure from appsettings.json

For most applications, configure Foveus from appsettings.json, environment variables, or your secret manager.
Add a Foveus section to your configuration file:
You can override the service name or environment when needed:
Environment is a free-text label for the deployment, such as staging or production. When you do not set it, it is test or live, taken from the key. It is not the ASP.NET Core environment.
If the API key is missing, empty or malformed, 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.

Production configuration

For production telemetry, use a live key. A fov_live_ key sends telemetry to Live mode.

ASP.NET Core APIs

For ASP.NET Core APIs, add the Foveus middleware.
The middleware captures HTTP executions. UseFoveus() is available on .NET 6 and later. A typical setup looks like this:

Worker services

For .NET Worker Service or BackgroundService apps, use AddFoveus(...), but do not call app.UseFoveus(). Workers do not have an ASP.NET HTTP middleware pipeline.
Worker support covers logs, logged exceptions, outbound HTTP telemetry, metrics, and trace propagation. Workers have no automatic execution boundary: wrap each unit of work in BeginExecution to record it as one execution. See Worker services.

4. Store your API key safely

Use environment variables or your platform’s secret manager. For local development, you can use .NET user secrets:
For production, use your hosting provider’s secret manager.
Never commit live API keys to source control.

5. Trigger telemetry

For an ASP.NET Core API, start your service and call one of your endpoints.
Foveus captures the execution and sends it to your workspace. Depending on your SDK configuration, Foveus can capture:
  • request context
  • response context
  • execution timing
  • logs
  • outcome and failure evidence
For a worker service, write a log or trigger an outbound operation.

6. View your first execution

Open the Foveus dashboard and go to Executions. Search by service:
If you did not set ServiceName, search using your project assembly name. Open an execution to inspect:
  • request and response context
  • execution timeline
  • logs
  • duration
  • outcome
  • failure details, if available
For worker services, logs and outbound calls are grouped into an execution only inside a BeginExecution scope. Without one, logs have no execution and each outbound call is recorded as its own execution.

7. Search by execution context

If your service captures business context, you can search for executions using indexed context fields. For example, if your request or response contains a customer ID:
You can search for it:
By default, Foveus captures context for every failed request and for 1% of successful requests (ContextSamplingRate is 0.01), and response bodies are not captured (CaptureResponseBodies is false). See FoveusOptions to change this. You can also search nested response fields with dotted paths.
Search the nested field:
Or search by label:
Foveus searches indexed execution context. It does not scan arbitrary raw request or response bodies.

Test and Live mode

Foveus has two modes: The API key decides the mode: a fov_test_ key sends to Test mode and a fov_live_ key sends to Live mode. Use the Test/Live toggle in the dashboard to view each. Use Live mode only when your service is ready to send production telemetry with a live key.

Service names and environments

Foveus works with the service names your team already uses. If you are starting fresh, a stable service name plus an explicit environment can make analysis easier.
This is a recommendation, not a requirement.

What to do next