What OpenTelemetry .NET automatic instrumentation covers and when teams need it
Teams need OpenTelemetry .NET automatic instrumentation when they must collect distributed traces across a fleet of .NET services but the owners of those services cannot take on a broad SDK change. Automatic instrumentation adds telemetry to an application without editing its source code. According to the OpenTelemetry documentation, it works by attaching to the application at runtime and instrumenting supported libraries and frameworks, so requests entering ASP.NET Core or a supported .NET Framework host, and the outbound calls they make, can produce spans with little or no code change. OpenTelemetry is vendor-agnostic. The application exports data to a Collector or to a backend that you choose, so the instrumentation decision does not lock you into one monitoring product. Start by inventorying which services have code owners who can accept a change, which cannot, and which sit on runtimes you need to confirm are supported.
OpenTelemetry's What is OpenTelemetry? page explains the framework's role, and the OpenTelemetry status page lists the trace APIs and SDKs as stable in .NET. That stability applies to traces. Log SDK maturity varies by language, and the status page is the place to check the current state for .NET logs before you plan a log pipeline around it. Metrics coverage from automatic instrumentation is a separate question: confirm which metric instruments the agent emits for your frameworks, and which you must add through code or a Collector. Do not assume that a trace rollout also delivers logs and metrics.
Before you commit, confirm three things with your own environment: the exact .NET versions and hosting models in use, whether each service runs on Windows or Linux, and whether IIS hosts any workload. The automatic instrumentation approach depends on those answers, and the install steps differ between them. Also decide who owns the Collector that receives the spans, because that component controls batching, retries and where data is sent. A short proof of concept on one representative service, with a named owner for the Collector, gives you the evidence to decide whether the fleet rollout can proceed as planned.
Which install path fits each .NET service
This table compares the install paths a team weighs for .NET services: ASP.NET Core versus .NET Framework, IIS-hosted sites versus self-hosted processes, and Windows versus Linux hosts. Read each row as a question to answer for one service, then check the confirm column against the current .NET instrumentation documentation before choosing.
| Decision point | What it changes on the host | What stays manual code | What to confirm before choosing |
|---|---|---|---|
| ASP.NET Core or .NET Framework | The zero-code path differs by framework, so the runtime and hosting model decide which agent setup applies | Business spans, custom attributes and any spans outside framework request handling | Confirm in the current .NET instrumentation docs that your framework and target runtime are supported for automatic instrumentation |
| IIS-hosted site | Agent settings must reach the worker process that IIS starts, which usually means environment settings applied to the application pool or site | Trace context across background jobs or queues hosted outside the web worker process | Confirm how IIS passes environment variables to your app pool and whether your IIS version is covered in the current docs |
| Self-hosted process (Kestrel or a service) | Environment variables or a startup configuration are set on the process or service definition, without IIS involvement | Custom spans for work the framework does not see, such as scheduled jobs inside the same process | Confirm the startup method your service manager supports and how the process is launched in production |
| Windows host | Installer or script based setup, with the agent files placed on the host and environment variables set at machine or service scope | Any Windows-specific resource detection you want added beyond default attributes | Confirm the installer package and script names in the current docs and who has rights to change machine-level settings |
| Linux host | Agent files and environment variables are set for the service unit or container image, with paths that follow Linux conventions | Resource attributes for container or orchestrator metadata, which may need separate detectors | Confirm the supported Linux distributions and architectures in the current docs before building images |
| Mixed estate with both Windows and Linux | Two install procedures to maintain, which raises the chance of version drift between hosts | Shared conventions for service names, attribute keys and sampling settings across both platforms | Confirm that one configuration standard can be applied to both host types and who owns updates to each |
How the agent, application and Collector connect in a .NET service
The flow starts in the .NET host process, where the automatic instrumentation and any manual spans from application code both produce telemetry. The OpenTelemetry exporter sends that data across a trust boundary to a Collector, which runs either beside the service as an agent or centrally as a gateway. Authentication sits on the Collector receiver and redaction runs in a processor before export. Check that the Collector accepts only authenticated connections, that sensitive attributes are removed before they leave the Collector, and that the backend your team selected receives the expected traces, metrics and logs.
Telemetry flows from the .NET host through the Collector to the client's chosen backend.
Windows, Linux and IIS install paths compared
On Linux, the agent is usually applied to services that run under a process manager such as systemd or inside a container image. Confirm which .NET runtime versions and CPU architectures your services use, because the instrumentation supports a defined set of combinations and your build pipeline may produce a different one than your production hosts. Most of the work is in how environment variables reach the process, since changes made in a shell profile do not reach services started by a supervisor.
- Runtime and architecture check: Confirm the target framework and CPU architecture for each service against the support matrix in the current official .NET instrumentation documentation.
- Environment variables: Settings are typically delivered through the service unit file, an override file or the container definition. Plan where they live so they are reviewed like any other production config.
- Process restarts: Each affected service must restart before instrumentation takes effect, so plan restarts per service rather than per host.
- Container images: If services ship as images, the agent is added at build or deploy time, which changes the image digest and the rollout record.
- Verification: Check that spans appear for an inbound request and an outbound call, and that the service name matches what your backend expects.
Before rollout, ask your platform team to confirm where the Collector endpoint is reachable from each Linux host and which service accounts can read the configuration.
On Windows Server, self-hosted .NET services usually run as Windows services or scheduled task processes, and each one reads its environment from the service definition rather than from user session settings. Confirm the Windows Server version and the .NET runtime each service targets, then check whether the host has a policy that restricts installing components or changing machine-level environment variables. Plan for a change window because services must be stopped and started to pick up the new configuration.
- Prerequisites: Verify the supported Windows Server versions, runtime versions and CPU architecture in the current official .NET instrumentation documentation before scheduling work.
- Machine versus service scope: Decide whether settings apply to the whole machine or to specific services, and record which approach your change process requires.
- Service restarts: Stop and start each Windows service in dependency order so that upstream and downstream instances are not restarted at the same time.
- Permissions: Confirm which administrative account performs the install and which account the service runs as, since the service account needs network access to the Collector.
- Verification: Confirm traces from each service in your backend, then review the Windows event log for startup errors.
Ask for a written rollback step for each service, including how to remove the variables and restart the service without rebuilding the host.
.NET Framework services run on the older runtime and are often long-lived, custom-hosted applications that have not been migrated. Confirm that the instrumentation supports the specific .NET Framework version and the hosting process in use, because support for older runtimes differs from support for modern .NET. Expect more variation in how these applications load configuration, and plan extra verification for services that run under unusual accounts or with custom startup code.
- Version confirmation: Check the exact .NET Framework version in production, not the version in the project file, and compare it with the support statement in the current official documentation.
- Application configuration: Some older applications read settings from their own configuration files, so confirm whether environment-based settings reach the process in your environment.
- Restart plan: Schedule restarts for each application process, and note any scheduled jobs or long-running batch work that a restart would interrupt.
- Dependency review: Check which libraries the application already uses for logging or tracing, since overlapping tools can produce duplicate or conflicting data.
- Verification: Compare span counts and service names with a known request to confirm the agent instruments the application before you rely on it for incident work.
Ask the application owner to confirm whether the service has a documented maintenance window before the change is planned.
IIS hosts ASP.NET applications inside worker processes that belong to application pools, so changes to environment or configuration take effect when the pool recycles, not when a single site is restarted. Recycling affects every site sharing that pool, and warm-up behavior can change response times during the first requests after a recycle. Confirm which sites share each pool before you change anything, and treat pool recycling as the unit of the rollout.
- Pool inventory: List each application pool, the sites it hosts, the .NET runtime it uses and the identity it runs under.
- Recycle behavior: Recycle pools in a planned order, and confirm load balancer health checks handle the drain without errors.
- Configuration location: Confirm whether settings are applied at machine level, pool level or in the application configuration, and keep the chosen approach consistent across servers.
- Identity and network: Verify that the pool identity can reach the Collector endpoint and can write any local logs the agent uses.
- Verification: After recycle, send a request to each site, confirm spans for both the inbound request and any outbound call, and check that no site lost its sessions unexpectedly.
Before the first production change, ask your Windows administrator to confirm the recycle schedule and the monitoring you will use to detect warm-up problems.
Set up automatic instrumentation step by step
This sequence takes a .NET service from an unconfirmed starting point to telemetry that arrives at a Collector with the expected service identity, then expands the same setup across the estate with a clear way back. Each step ends with a check you can run before moving on.
Confirm runtime and hosting model support
Before touching a service, record the .NET runtime version, the framework (ASP.NET Core or .NET Framework), the operating system, the process architecture and how the app is hosted, whether as a Windows service, under IIS, in a container or under systemd on Linux. Check each of these against the official support notes for the OpenTelemetry .NET automatic instrumentation release you plan to use, and confirm which libraries it instruments in your version. Done means you have a written matrix for the target service, and any mismatch is either resolved or escalated to a different approach before work continues.
Deploy a Collector endpoint the service can reach
Stand up an OpenTelemetry Collector in a location the service can reach over the network, with an OTLP receiver enabled and an exporter to your chosen backend or a debug exporter for this test. Keep the receiver bound to an address your network design allows, because server components bind to localhost by default in recent Collector releases and a service on another host will not connect unless you change that deliberately. Done means a test span or a Collector health check responds from the service host, confirmed with a simple network connection test on the OTLP port.
Install automatic instrumentation on one non-production service
Choose one non-production service that represents your typical hosting model and install the OpenTelemetry .NET automatic instrumentation package for its platform, using the installation method that matches the host: the Windows installer or the Linux install script for the process, or the instrumentation files placed in the application's runtime environment. Keep a record of exactly which files changed and which version was installed. Done means the installer reports success and the files are present in the locations the install documentation lists for your platform.
Set exporter endpoint and service name
Configure the exporter endpoint and the service name through environment settings, not code, so the same mechanism works for every service later. Set the OTLP endpoint to the Collector from the previous step and set the service name to a stable value that follows your naming standard, and add resource attributes such as deployment environment if your standard requires them. Confirm the variable names against the configuration reference for your version. Done means the settings are visible to the process at its configured scope, such as the service definition, the IIS application pool environment or the container spec.
Restart the process or application pool
Restart the service, or recycle the IIS application pool if that is how the app runs, so the runtime loads the instrumentation and the new environment settings. Restarting the Collector is not sufficient on its own, because the instrumented process must start with the profiler or instrumentation attached. Watch the application's startup logs for instrumentation initialization messages and for any errors about missing libraries or version conflicts. Done means the service starts, serves its normal traffic, and shows no new errors in its logs.
Confirm spans and resource attributes arrive
Send a few requests to the service, then check the Collector output or your backend for server spans from the framework's automatic instrumentation. Verify that the service name, environment and host resource attributes match what you configured, and that route or endpoint names appear on the spans. Also confirm that any outbound calls to databases or HTTP dependencies produce client spans with the expected peer information. Done means you can show these spans with the correct identity, and if they are missing, you have traced the gap to the Collector, the exporter settings or the instrumentation itself.
Roll out in stages and keep a rollback path
Extend the setup to other services in groups, starting with a small set of non-production services that use the same hosting model, then moving to production in waves that reflect your change process and risk tolerance. Use the same environment-based configuration each time and record the instrumentation version per service so upgrades are traceable. Before each wave, document how to roll back: remove the instrumentation files or the environment variables and restart the process or application pool, and confirm that the service returns to its previous behavior in a test. Done means each wave has a verified span check and a tested rollback, and the owners of each service have signed off.
Combining automatic and manual spans in one .NET service
Automatic instrumentation should own the edges of a .NET service, and manual spans should own what happens inside the business logic. The automatic instrumentation covers the inbound HTTP request in ASP.NET Core and the common outbound client calls, so every service gets a consistent server span and client spans without code changes. What it cannot know is your domain: which order was placed, which tenant the request belongs to, whether a payment was retried, or why a queue message was rejected. Those facts need the .NET API, which lets your code start spans, set attributes and record events on the current activity. Decide early which signals belong to each layer, and write that decision down so reviewers can check it against the code.
Nesting and context propagation are what make the two layers useful together. When a manual span starts while an automatic server span is current, it becomes a child of that span and inherits its trace ID, so a single request reads as one tree in the backend. The failure mode is a manual span started on a new thread, in a background task or after a context break, which produces a detached root trace that nobody can join to the request. Test this with a single request through the full call path and confirm that every custom span shows the expected parent. Confirm the exact activity and context-propagation behavior for your .NET version and your hosting model in the OpenTelemetry .NET documentation before you standardize a pattern.
The larger risk is duplication and naming drift across teams. If a team wraps an HTTP client call in a manual client span while automatic instrumentation already records that call, the trace shows two spans for one operation and inflates latency and error counts. Agree a rule for which library calls teams may wrap, and review changes to automatic spans during code review. Naming drift is quieter but costs more over time: one team names a span ProcessOrder, another order.process, and a third uses the customer identifier in the span name, which also creates high-cardinality names. Publish a naming convention for span names and custom attribute keys, check it in a shared code review checklist, and plan who owns updates when the OpenTelemetry semantic conventions change.
Security settings to review before a .NET rollout reaches production
Automatic instrumentation captures a lot of request detail by default, and the Collector and exporters that carry it become new places where data and credentials can leak. The cards below cover the settings that connect those risks: what goes into spans, how configuration and credentials are stored, how exporter traffic is authenticated, where Collector endpoints listen, and who can change instrumentation on production hosts.
Keep sensitive values out of spans
Automatic instrumentation records HTTP details such as query strings, request headers and user identifiers in span attributes. Those values can carry tokens, personal data or session identifiers that then sit in your backend. Review which attributes your ASP.NET Core and HttpClient spans include in a staging run, then drop or hash the sensitive ones. Where a Collector is in the path, use the redaction processor to remove attributes before export, and confirm the rules by inspecting exported data.
Collector security practicesStore Collector configuration securely
The Collector configuration names exporter endpoints, and it may hold API keys or tokens for your backend. Treat that file as a secret: restrict read access to the service account, keep credentials in an environment or secrets store rather than in plain files checked into source control, and encrypt the storage where the file lives. Check file permissions on every host and container image that ships the configuration.
Authenticate exporter traffic
Exporter traffic that crosses a network should prove who is sending it. Collector authenticator extensions can add credentials to outgoing exporter requests, and the oauth2client extension is one option for that. Confirm the token source, the scope it grants and the rotation schedule with your identity team before rollout. Also verify that the receiving end rejects requests that lack valid credentials.
Collector configuration docsKeep server components on localhost
Since Collector v0.110.0, server components bind to localhost by default instead of 0.0.0.0. Check that your deployed version keeps that default, and that any override to a wider address is deliberate and limited to a restricted network segment. Confirm with a port scan from outside the host that OTLP receiver ports are not reachable from networks that should not reach them, and record the exception if a gateway needs wider access.
Control who changes instrumentation
Environment variables and agent settings on IIS application pools, Windows services or Linux units decide what is instrumented and where data goes. Anyone who can edit them can turn on verbose capture or redirect telemetry to another endpoint. Limit write access to the people who own deployments, log every change through your deployment pipeline, and review the effective settings on each production host after patching or redeploying.
Build only needed Collector components
The Collector contrib distribution includes many receivers, processors and exporters, and each one adds code you must review and patch. Use the Collector Builder to produce a custom build with only the components your .NET pipeline uses, then keep the build manifest under version control. Ask your team to confirm that release artifacts are checked against their published checksums and SBOM before deployment.
What does a .NET instrumentation rollout cost and take?
What drives the cost of a .NET OpenTelemetry rollout?
The main cost drivers are the number of services, whether they run under IIS or as self-hosted processes, whether the hosts are Windows or Linux, how much manual OpenTelemetry code already exists, and how the Collector and backend are designed. Each service needs its own runtime check, configuration and verification, so the count matters more than the code size. Services on IIS add application pool and hosting steps. Existing manual spans need review so they do not duplicate automatic ones. Collector design and backend choice add work that is separate from the agent install itself. Ask the partner to break the written scope down by these factors so you can see what each one adds.
Can our own team run a .NET automatic instrumentation rollout alone?
Often yes, if your team has access to the hosts, knows how each service is deployed, and can test changes outside production. Zero-code instrumentation does not require changes to application source, which keeps the first pass small. The harder parts are usually operational: agreeing on naming and resource attributes, sending data through a Collector, controlling volume, and getting every service owner to validate their traces. A partner can take on part or all of that work under a fixed scope, or review a plan your team writes. Decide early which parts you want to keep in-house so the written scope matches your capacity.
What do we need to provide for a .NET instrumentation engagement?
Plan for the following before work starts:
How long does a .NET instrumentation pilot usually take?
The duration depends on the inputs above, not on the framework alone. A pilot covering a small number of services on one platform moves faster than one spanning IIS and self-hosted Windows and Linux services with several owners. Access approvals, change windows and the time service owners need to validate results often set the pace more than the install steps do. No duration is given here because the answer depends on your environment. Ask the partner to show the dependencies they see in your environment and the milestones they tie to each one in the written plan.
What should a written scope for .NET instrumentation include?
A useful written scope names the exact services in and out of scope, the runtimes and hosting models for each, and the Windows and Linux hosts involved. It should state whether IIS is included and how application pools will be handled. It should list the Collector topology, the backend that receives data, and who operates each part after handover. Acceptance checks should be defined, such as confirming that each in-scope service emits traces with expected resource attributes. Ask for the list of assumptions, the client responsibilities, the change process, and what happens if a dependency slips. Request the quote as a line-item breakdown tied to this scope.
Does .NET automatic instrumentation send data outside our network?
Not by itself. The agent sends telemetry to the endpoint you configure, which is usually a Collector inside your network. Whether data leaves your environment depends on the Collector pipeline and the backend you choose. Confirm the exporter destinations and the network paths before rollout. Review what attributes and payloads are captured, because traces can include request details that you may need to filter. The OpenTelemetry security guidance recommends encrypting and authenticating Collector connections and using the redaction processor to remove sensitive attributes, so plan those controls in the scope.
What ongoing work follows a .NET instrumentation rollout?
After the initial rollout, recurring work includes keeping the agent and Collector current, reviewing new services as they are deployed, checking telemetry volume, and maintaining the Collector configuration. Upgrades bring new releases and sometimes changes to defaults, so budget time for regression checks on each service owner's side. Ask whether the written scope includes handover documentation and whether ongoing support or a retainer is needed. DeployOpen offers ongoing support, upgrades and continuous testing as retainers, which you can quote separately from the initial scope.
Limits to confirm in your environment before you commit
Automatic instrumentation looks simple on a slide and gets complicated on a real host. The cards below cover six points to test in your own environment, each with the place to confirm it, so the decision rests on your runtimes, libraries and pipeline rather than on general claims.
Runtimes and hosting models
Confirm which .NET runtime versions, ASP.NET Core hosting models and operating systems the current automatic instrumentation supports before you plan the rollout. Check the release notes for the exact version you intend to install, and test on the same OS build, container base image and architecture your services run on, including ARM64 if you use it. Treat support for .NET Framework, IIS-hosted apps and self-contained deployments as separate questions to verify.
OpenTelemetry statusCovered and uncovered libraries
Automatic instrumentation covers a fixed set of client and server libraries, and each one has its own maturity. List the database drivers, message brokers, HTTP clients and caches your services call, then check each against the instrumentation list for the version you pin. Anything uncovered needs manual spans or a custom instrumentation plan, and that effort belongs in the scope.
Maturity of the .NET log signal
The status page shows that trace APIs and SDKs are stable for .NET, but log SDK maturity varies more across languages. Confirm the current stability of the .NET logs signal and of the bridge you plan to use to attach trace and span IDs to existing logs. If logs are a requirement, decide whether to export through the SDK or keep collecting log files, and document that choice.
OpenTelemetry statusCoexisting APM agents
Running an existing APM agent alongside the OpenTelemetry instrumentation can cause duplicate spans, double-patched libraries or startup conflicts. Test both agents together in a non-production environment that mirrors your hosts, and check which one owns context propagation and which one exports to which backend. Ask your APM vendor and your platform team to confirm the supported combination before you enable both.
Overhead on production hosts
Automatic instrumentation adds CPU, memory and latency cost on every request and call it patches. Measure this with a load test that matches production traffic, comparing latency, throughput and memory with instrumentation enabled and disabled. Also check exporter buffering and the impact of sampling settings, since these decide how much work each host does during peaks.
Collector component stability
Each Collector component has its own stability level, and the level is documented in that component's README. Before you build a pipeline, list every receiver, processor and exporter it needs and record their stability levels. A component marked as development or alpha may change between releases, so pin versions in your Collector build and plan upgrades around those components.
Collector on GitHubHow DeployOpen scopes and delivers .NET instrumentation
DeployOpen plans, implements and hands over OpenTelemetry .NET automatic instrumentation inside your own infrastructure, from runtime and host decisions through Collector connection and operator training. Work follows a written scope agreed before any change reaches a production service, so your team knows what is covered, what is tested and what they will own afterward.
How we scope
- Inventory ASP.NET Core and .NET Framework services, their hosting model (Windows, Linux, IIS or containers) and their current monitoring agents
- Confirm the .NET runtime versions and architectures each service runs before choosing an install path
- Agree in writing which services, environments and telemetry signals are in scope, and which manual spans are out of scope
How we build
- Install and configure the automatic instrumentation in a non-production environment first, then record the telemetry each service produces
- Define how manual spans and attributes are added alongside automatic spans, with naming reviewed against your conventions
- Connect exports to your OpenTelemetry Collector and test sampling, resource attributes and sensitive-data filtering before rollout
How we hand over
- Deliver the install scripts or deployment manifests, environment variable configuration and documented service-by-service rollout steps
- Provide test results showing traces and metrics received at the Collector for each in-scope service
- Train your platform and application teams on rollback, upgrading the instrumentation and diagnosing missing spans
How we support
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts
- Ongoing support, upgrades and continuous testing are available as a retainer once the initial rollout is complete
- Ask any partner to confirm how they will test each in-scope .NET version and host type before quoting

