> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/traceable/agent-docs/dotnet.md).

# Traceable .NET Agent Documentation

The Traceable .NET agent is an in-app tracing agent that collects telemetry data from your .NET application and forwards it to the Traceable Platform Agent (TPA). The TPA processes and sends this data to the Traceable platform for security analysis, observability, and runtime protection.

## Before You Begin

Ensure the following requirements before installing the .NET agent:

* Using .NET Core versions 6, 7, 8, or 9.
* Applications built on .NET Framework are not supported.
* Access to modify environment variables or update application startup files.
* Access to the deployed Traceable Platform Agent endpoint (e.g., `http://agent.traceableai:5442` or `https://agent.traceableai:5443` for TLS).
* Permission to install NuGet packages (for manual instrumentation).
* Supported underlying OS for blocking or sampling features.

***

## Support Matrix

| Feature      | Supported Versions         | Notes                                                                                                                 |
| ------------ | -------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| ASP.NET Core | 6, 7, 8, 9                 | Full tracing and blocking support                                                                                     |
| gRPC (Core)  | 2.53.0 and later           | Supports gRPC server instrumentation                                                                                  |
| HttpClient   | All .NET Core 6-9 versions | Headers/metadata when enabled; bodies follow `http_body` + content-type allowlist. Client body capture from >= 1.6.0. |
| RestSharp    | Same as HttpClient         | Wrapper over HttpClient                                                                                               |

### Request Blocking / Sampling Supported OS

Request blocking works on these OS versions:

* Debian 10+
* Ubuntu 18.04+
* Amazon Linux 2+
* CentOS 7+

Request blocking / sampling is not supported on Azure Functions and other OS versions.

***

## Installation Options and Steps

The agent supports various deployments such as VM, Docker and Kubernetes. Please refer to the appropriate guide for installation instructions. It also supports azure services such as Azure App Service and Azure Functions.

## Configuration

Configuration details can be found here: [Configuration](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/Configuration.md)

## Troubleshooting

If no data appears in Traceable platform after setup:

* Check if logs are generated (written to application logs or stdout).
* Confirm the platform agent endpoint is reachable.
* Look for startup logs confirming agent initialization.

### Common issues

| Issue                                | Possible Cause                                                                                                                                                                    |
| ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| No response/request body captured    | `http_body` off; content-type not in `allowed_content_types`; body truncated at `body_max_size_bytes`; app never sets a body; missing Content-Length on some server request paths |
| No outbound (client) body captured   | Same as above; or `TA_INSTRUMENTATION_CLIENT_HTTP_ENABLED=false`; or streaming / large payload (outbound capture buffers full content in memory)                                  |
| No outbound spans at all             | Client HTTP instrumentation disabled (`TA_INSTRUMENTATION_CLIENT_HTTP_ENABLED=false`)                                                                                             |
| Status code not reported             | App must return an explicit HTTP status code                                                                                                                                      |
| Environment variables not persistent | Add them to system profile or service config                                                                                                                                      |

## Quick Links

* [Configuration](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/Configuration.md)
* [Install Options](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/install-options/README.md)
  * [Automatic Instrumentation](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/install-options/automatic-instrumentation/README.md)
    * [Troubleshooting](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/install-options/automatic-instrumentation/Troubleshooting.md)
    * [Docker](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/install-options/automatic-instrumentation/Docker/README.md)
      * [Installation](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/install-options/automatic-instrumentation/Docker/Installation.md)
    * [VM](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/install-options/automatic-instrumentation/VM/README.md)
      * [Installation](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/install-options/automatic-instrumentation/VM/Installation.md)
  * [Azure App Service](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/install-options/azure-app-service/README.md)
    * [Linux](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/install-options/azure-app-service/linux/README.md)
      * [Installation](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/install-options/azure-app-service/linux/Installation.md)
      * [Troubleshooting](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/install-options/azure-app-service/linux/Troubleshooting.md)
    * [Windows](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/install-options/azure-app-service/windows/README.md)
      * [Installation](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/install-options/azure-app-service/windows/Installation.md)
      * [Troubleshooting](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/install-options/azure-app-service/windows/Troubleshooting.md)
  * [Azure Functions](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/install-options/azure-functions/README.md)
    * [Installation](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/install-options/azure-functions/Installation.md)
  * [SDK](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/install-options/sdk/README.md)
    * [Installation](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/install-options/sdk/Installation.md)
    * [Troubleshooting](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/install-options/sdk/Troubleshooting.md)
* [Troubleshooting](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/Troubleshooting.md)
* [Images](https://github.com/harness/harness-developer-hub/tree/main/traceable-dc-agent/agent-docs/dotnet/images/README.md)
