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. Test mode is used by default, so you do not need to set Mode while validating your setup.
Use Test mode while setting up Foveus. Set Mode to live only when you are ready to send production telemetry with a live key.

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:
fov_test_...
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 created manually from Settings when you are ready to send production telemetry.

2. Install the .NET SDK

Install the Foveus .NET SDK in your service.
dotnet add package Foveus.SDK
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.
builder.Services.AddFoveus("fov_test_...");
With this setup, Foveus automatically uses:
OptionDefault
ServiceNameProject assembly name
EnvironmentCurrent app environment
Modetest
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.
builder.Services.AddFoveus(builder.Configuration);
Add a Foveus section to your configuration file:
{
  "Foveus": {
    "ApiKey": "fov_test_..."
  }
}
You can override the service name or environment when needed:
{
  "Foveus": {
    "ApiKey": "fov_test_...",
    "ServiceName": "orders-api",
    "Environment": "staging"
  }
}
You do not need to set Mode to test. Test mode is the default.

Configure with options

Use options when you want to configure Foveus directly in code.
builder.Services.AddFoveus(options =>
{
    options.ApiKey = builder.Configuration["Foveus:ApiKey"];
    options.ServiceName = "orders-api";
    options.Environment = "staging";
});
For production telemetry, use a live key and set Mode to live.
{
  "Foveus": {
    "ApiKey": "fov_live_...",
    "ServiceName": "orders-api",
    "Environment": "production",
    "Mode": "live"
  }
}

ASP.NET Core APIs

For ASP.NET Core APIs, add the Foveus middleware.
app.UseFoveus();
The middleware captures HTTP executions. A typical setup looks like this:
var builder = WebApplication.CreateBuilder(args);

builder.Services.AddFoveus(builder.Configuration);

var app = builder.Build();

app.UseFoveus();

app.MapGet("/orders", () =>
{
    return Results.Ok(new
    {
        orderStatus = new
        {
            value = 1,
            label = "Confirmed"
        }
    });
});

app.Run();

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.
var builder = Host.CreateApplicationBuilder(args);

builder.Services.AddFoveus(builder.Configuration);

builder.Services.AddHostedService<Worker>();

var host = builder.Build();

await host.RunAsync();
Worker support currently covers logs, logged exceptions, outbound HTTP telemetry, metrics, and trace propagation. Full automatic per-job execution capture for arbitrary worker loops is still evolving.

4. Store your API key safely

Use environment variables or your platform’s secret manager. For local development, you can use .NET user secrets:
dotnet user-secrets set "Foveus:ApiKey" "fov_test_..."
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.
curl http://localhost:5000/orders
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.
_logger.LogInformation("Billing worker processed invoice {InvoiceId}", invoiceId);

6. View your first execution

Open the Foveus dashboard and go to Executions. Search by service:
service:orders-api
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 telemetry may appear before full job-level execution boundaries are available.

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:
{
  "customerId": "cus_12345"
}
You can search for it:
service:orders-api context:customerId="cus_12345"
You can also search nested response fields with dotted paths.
{
  "orderStatus": {
    "value": 1,
    "label": "Confirmed"
  }
}
Search the nested field:
service:orders-api context:orderStatus.value=1
Or search by label:
service:orders-api context:orderStatus.label="Confirmed"
Foveus searches indexed execution context. It does not scan arbitrary raw request or response bodies.

Test and Live mode

Foveus has two modes:
ModeUse for
testSandbox, development, QA, and onboarding
liveProduction telemetry
Foveus uses Test mode by default. 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.
{
  "Foveus": {
    "ApiKey": "fov_live_...",
    "ServiceName": "orders-api",
    "Environment": "production",
    "Mode": "live"
  }
}
This is a recommendation, not a requirement.

What to do next