From 82d9dae96ff74ca5cff188976a9d630afa894bbd Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Thu, 4 Dec 2025 16:12:08 +0000 Subject: [PATCH 1/4] Add important not for windows services --- .../configuration-for-windows-services.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/reference/configuration-for-windows-services.md b/docs/reference/configuration-for-windows-services.md index 4da8ab608..348301929 100644 --- a/docs/reference/configuration-for-windows-services.md +++ b/docs/reference/configuration-for-windows-services.md @@ -9,7 +9,21 @@ applies_to: apm_agent_dotnet: ga --- -# Configuration for Windows Services [configuration-for-windows-services] +# Configuration for Windows services [configuration-for-windows-services] + +::::{important} +While the APM agent supports transaction auto-creation for web frameworks such as ASP.NET and ASP.NET Core, it +doesn't know where the "unit of work" starts for bespoke services. Therefore, it cannot start a transaction +automatically. As a result, spans, such as those for outbound HTTP requests, are also not captured, as they expect +a running transaction. Therefore, no trace data will be generated or exported out of the box. + +You will need to manually instrument the code for the service to manually create a transaction around the appropriate +unit of work for your scenario. A custom transaction can be started via the [Public API](/reference/public-api.md). + +Alternatively, consider using the [Elastic Distribution of OpenTelemetry for .NET](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/dotnet) +where any spans, including those for outbound HTTP requests, are automatically captured. The first span without a +parent will be considered a transaction when ingested into Elastic Observability. +:::: Configuration for Windows services can be provided by setting environment variables for the specific Windows service in the Windows registry. With PowerShell @@ -26,10 +40,8 @@ Set-ItemProperty HKLM:SYSTEM\CurrentControlSet\Services\ -Name Env 1. define the environment variables to use for the Windows service 2. `` is the name of the Windows service. - The service must then be restarted for the change to take effect ```powershell Restart-Service ``` - From 21285d91f75a464e6979c71fb12856ec4e4522c4 Mon Sep 17 00:00:00 2001 From: Fabrizio Ferri-Benedetti Date: Fri, 5 Dec 2025 09:44:11 +0100 Subject: [PATCH 2/4] Update docs/reference/configuration-for-windows-services.md --- docs/reference/configuration-for-windows-services.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/docs/reference/configuration-for-windows-services.md b/docs/reference/configuration-for-windows-services.md index 348301929..18c275579 100644 --- a/docs/reference/configuration-for-windows-services.md +++ b/docs/reference/configuration-for-windows-services.md @@ -12,17 +12,9 @@ applies_to: # Configuration for Windows services [configuration-for-windows-services] ::::{important} -While the APM agent supports transaction auto-creation for web frameworks such as ASP.NET and ASP.NET Core, it -doesn't know where the "unit of work" starts for bespoke services. Therefore, it cannot start a transaction -automatically. As a result, spans, such as those for outbound HTTP requests, are also not captured, as they expect -a running transaction. Therefore, no trace data will be generated or exported out of the box. +While the APM agent supports automatic transaction creation for web frameworks such as ASP.NET and ASP.NET Core, it doesn't know where the "unit of work" starts for bespoke services. Therefore, it cannot start a transaction automatically. As a result, spans, such as those for outbound HTTP requests, aren't captured, as they expect a running transaction, and no trace data is generated or exported by default. -You will need to manually instrument the code for the service to manually create a transaction around the appropriate -unit of work for your scenario. A custom transaction can be started via the [Public API](/reference/public-api.md). - -Alternatively, consider using the [Elastic Distribution of OpenTelemetry for .NET](https://www.elastic.co/docs/reference/opentelemetry/edot-sdks/dotnet) -where any spans, including those for outbound HTTP requests, are automatically captured. The first span without a -parent will be considered a transaction when ingested into Elastic Observability. +To manually create a transaction around the appropriate unit of work for your scenario, instrument your code manually. You can start a custom transaction using the [Public API](/reference/public-api.md). Alternatively, consider using the [Elastic Distribution of OpenTelemetry for .NET](elastic-otel-dotnet://reference/index.md), which captures all spans automatically, including those for outbound HTTP requests. The first span without a parent is considered a transaction when ingested into Elastic Observability. :::: Configuration for Windows services can be provided by setting environment variables for the specific Windows service in the Windows registry. With PowerShell From 9e90089d16cb7f587575568b4940b540c201cd54 Mon Sep 17 00:00:00 2001 From: Fabrizio Ferri-Benedetti Date: Fri, 5 Dec 2025 10:06:13 +0100 Subject: [PATCH 3/4] Update docs/reference/configuration-for-windows-services.md --- docs/reference/configuration-for-windows-services.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/configuration-for-windows-services.md b/docs/reference/configuration-for-windows-services.md index 18c275579..5dcf7a0cb 100644 --- a/docs/reference/configuration-for-windows-services.md +++ b/docs/reference/configuration-for-windows-services.md @@ -14,7 +14,7 @@ applies_to: ::::{important} While the APM agent supports automatic transaction creation for web frameworks such as ASP.NET and ASP.NET Core, it doesn't know where the "unit of work" starts for bespoke services. Therefore, it cannot start a transaction automatically. As a result, spans, such as those for outbound HTTP requests, aren't captured, as they expect a running transaction, and no trace data is generated or exported by default. -To manually create a transaction around the appropriate unit of work for your scenario, instrument your code manually. You can start a custom transaction using the [Public API](/reference/public-api.md). Alternatively, consider using the [Elastic Distribution of OpenTelemetry for .NET](elastic-otel-dotnet://reference/index.md), which captures all spans automatically, including those for outbound HTTP requests. The first span without a parent is considered a transaction when ingested into Elastic Observability. +To manually create a transaction around the appropriate unit of work for your scenario, instrument your code manually. You can start a custom transaction using the [Public API](/reference/public-api.md). Alternatively, consider using the [Elastic Distribution of OpenTelemetry for .NET](elastic-otel-dotnet://reference/edot-dotnet/index.md), which captures all spans automatically, including those for outbound HTTP requests. The first span without a parent is considered a transaction when ingested into Elastic Observability. :::: Configuration for Windows services can be provided by setting environment variables for the specific Windows service in the Windows registry. With PowerShell From b071604622d69240ba2862eaaa09f23e016ba392 Mon Sep 17 00:00:00 2001 From: Fabrizio Ferri-Benedetti Date: Fri, 5 Dec 2025 10:09:10 +0100 Subject: [PATCH 4/4] Add crosslink --- docs/docset.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docset.yml b/docs/docset.yml index ad154e525..2288d8d03 100644 --- a/docs/docset.yml +++ b/docs/docset.yml @@ -9,6 +9,7 @@ cross_links: - ecs-dotnet - ecs-logging - elasticsearch + - elastic-otel-dotnet toc: - toc: reference - toc: release-notes