> ## Documentation Index
> Fetch the complete documentation index at: https://docs.foveus.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Execution context search

An execution is one run of work in your application.

For an API service, an execution is usually one HTTP request. For a worker, it may be one job, message, scheduled task, or background operation.

Foveus uses executions to show what happened, when it happened, how long it took, and what evidence was captured.

## Why executions matter

Logs tell you what was written.

Metrics tell you what changed.

Traces show request flow.

Executions show the actual unit of work you need to inspect.

An execution can include:

* service name
* endpoint or operation
* request context
* response context
* duration
* outcome
* logs
* failure details
* linked issue, if Foveus grouped it into one

## Execution examples

An HTTP API request:

```text theme={null}
GET /orders/ord_12345
```

Each one can be represented as an execution.

## What Foveus captures

The exact data depends on your SDK configuration and service type.

A typical HTTP execution can include:

| Field         | Description                                                                    |
| ------------- | ------------------------------------------------------------------------------ |
| `service`     | The service that produced the execution.                                       |
| `environment` | The deployment environment, such as `development`, `staging`, or `production`. |
| `mode`        | The Foveus data mode: `test` or `live`.                                        |
| `endpoint`    | The HTTP path or operation name.                                               |
| `method`      | The HTTP method, such as `GET` or `POST`.                                      |
| `duration`    | How long the execution took.                                                   |
| `outcome`     | Whether the execution succeeded, failed, or is unknown.                        |
| `context`     | Safe request, response, query, or custom context fields.                       |
| `logs`        | Logs correlated to the execution, if configured.                               |
| `issue`       | The issue linked to the execution, if Foveus grouped it.                       |

## Service name

Foveus uses the service name to group executions by logical service.

If you do not set `ServiceName`, Foveus uses your project assembly name.

You can override it:

```csharp theme={null}
builder.Services.AddFoveus(options =>
{
    options.ApiKey = builder.Configuration["Foveus:ApiKey"];
    options.ServiceName = "orders-api";
});
```

Use a stable logical service name.

```text theme={null}
orders-api
payments-api
identity-api
```

Avoid putting the environment inside the service name.

```text theme={null}
orders-api-production
orders-api-staging
orders-api-dev
```

Instead, keep the service name stable and use `Environment`.

```json theme={null}
{
  "Foveus": {
    "ApiKey": "fov_live_...",
    "ServiceName": "orders-api",
    "Environment": "production",
    "Mode": "live"
  }
}
```

## Environment

Use `Environment` to describe where the service is running.

Examples:

```text theme={null}
development
test
staging
production
```

This helps you separate the same service across deployments.

```text theme={null}
service:orders-api environment:production
```

## Mode

Foveus has two modes:

| Mode   | Use for                                  |
| ------ | ---------------------------------------- |
| `test` | Sandbox, development, QA, and onboarding |
| `live` | Production telemetry                     |

Foveus defaults to `test`.

Set `Mode` only when sending live telemetry.

```json theme={null}
{
  "Foveus": {
    "ApiKey": "fov_live_...",
    "ServiceName": "orders-api",
    "Environment": "production",
    "Mode": "live"
  }
}
```

## Outcomes

An execution can have an outcome such as:

| Outcome   | Meaning                                              |
| --------- | ---------------------------------------------------- |
| `success` | The execution completed successfully.                |
| `failed`  | The execution failed or returned a failure response. |
| `unknown` | Foveus could not confidently classify the outcome.   |

Foveus can use HTTP status codes, response fields, exception data, and configured outcome semantics to determine the outcome.

## Context

Execution context is structured data captured from the request, response, query string, or custom context.

For example:

```json theme={null}
{
  "customerId": "cus_12345",
  "orderStatus": {
    "value": 1,
    "label": "Confirmed"
  }
}
```

You can search indexed context fields:

```text theme={null}
service:orders-api context:customerId="cus_12345"
```

Search nested fields with dotted paths:

```text theme={null}
service:orders-api context:orderStatus.value=1
```

Strings should use quotes. Numbers and booleans do not need quotes.

<Note>
  Execution Context Search uses indexed execution context. It does not scan arbitrary raw request bodies.
</Note>

## Linked logs

If logging is configured, Foveus can show logs related to an execution.

This helps you inspect the log lines that occurred during the same unit of work instead of searching through unrelated log streams.

## Linked issues

Foveus can group failed executions into issues.

An issue is a repeated or meaningful failure pattern.

For example, several failed executions on the same endpoint may become one issue.

```text theme={null}
HTTP 500 in orders-api
```

Open the issue to see:

* failure pattern
* representative execution
* linked executions
* recent activity
* lifecycle
* comments and activity history

## Search executions

The Executions page is query-first because execution data can be high-volume.

Common searches:

```text theme={null}
service:orders-api
```

```text theme={null}
service:orders-api method:POST endpoint:/orders
```

```text theme={null}
service:orders-api status:failed
```

```text theme={null}
service:orders-api context:customerId="cus_12345"
```

```text theme={null}
service:orders-api context:orderStatus.value=1
```

For best performance and precision, start with a service filter when searching by context.

## When to use executions

Use executions when you need to:

* investigate a support complaint
* find a request by customer ID or request ID
* inspect request and response context
* understand why a request failed
* move from an issue to the exact failed execution
* correlate logs with a unit of work

## What to do next

* View your first execution: [View your first execution](/get-started/view-your-first-execution)
* Search by context: [Execution Context Search](/concepts/execution-context-search)
* Learn about issues: [Issues](/concepts/issues)
* Investigate a user complaint: [Investigate a user complaint](/guides/investigate-user-complaint)
