forked from splunk/public-o11y-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request splunk#1536 from splunk/repo-sync
Pulling refs/heads/main into main
- Loading branch information
Showing
9 changed files
with
378 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
...et-data-in/application/otel-dotnet/instrumentation/advanced-config-iis-apps.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
.. _advanced-config-iis-apps: | ||
|
||
******************************************* | ||
Advanced configuration for IIS applications | ||
******************************************* | ||
|
||
Follow these advanced configuration steps to make changes to specific application pools. | ||
|
||
Set environment variables | ||
========================= | ||
|
||
You can set environment variables for specific application pools in the ``environmentVariables`` block of the :new-page:`applicationHost.config file <https://learn.microsoft.com/en-us/iis/configuration/system.applicationhost/applicationpools/add/environmentvariables/#configuration-sample>`. | ||
|
||
For example: | ||
|
||
.. code-block:: xml | ||
<environmentVariables> | ||
<add name="OTEL_RESOURCE_ATTRIBUTES" value="deployment.environment=test,service.version=1.0.0" /> | ||
</environmentVariables> | ||
For all IIS applications, consider setting common environment variables for W3SVC and WAS Windows Services. For more information, see :new-page:`Instrument a Windows Service running a .NET application <https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/main/docs/windows-service-instrumentation.md>` in the OpenTelemetry documentation. | ||
|
||
.. note:: | ||
|
||
If the same environment variables are set in the ``environmentVariable`` block and in the web.config ``appSettings`` block, the value in the ``environmentVariables`` block takes precedence. | ||
|
||
Activate or deactivate instrumentation | ||
====================================== | ||
|
||
For .NET Framework applications, use the PowerShell module to activate or deactivate the instrumentation for specific application pools. | ||
|
||
#. Import the PowerShell module: | ||
|
||
.. code-block:: powershell | ||
Import-Module "OpenTelemetry.DotNet.Auto.psm1" | ||
.. note:: | ||
|
||
The application pool name is case sensitive. | ||
|
||
#. Activate or deactivate the application pool. | ||
|
||
* Activate instrumentation for the application pool: | ||
|
||
.. code-block:: powershell | ||
Enable-OpenTelemetryForIISAppPool -AppPoolName <app-pool> | ||
* Deactivate instrumentation for the application pool: | ||
|
||
.. code-block:: powershell | ||
Disable-OpenTelemetryForIISAppPool -AppPoolName <app-pool> | ||
#. Restart the application pool: | ||
|
||
.. code-block:: powershell | ||
Restart-WebAppPool -Name <app-pool> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.