Skip to content

Commit a94685c

Browse files
ddOfirclaudecswatt
authored
Document HTTPS limitation for non-IIS Windows services in USM (#32723)
* Clarify USM environment variable detection limitations Add documentation explaining that Universal Service Monitoring (USM) only detects environment variables set at process start time, not those set programmatically within application code. This clarifies that while APM instrumentation libraries can read DD_SERVICE and similar variables set via System.setProperty() (Java) or Environment.SetEnvironmentVariable() (.NET), USM cannot detect these as it reads from /proc/PID/environ (Linux) or system APIs (Windows) which only contain the initial process environment. Includes examples for properly setting environment variables in Docker, Kubernetes, and shell environments to ensure USM detection. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Document HTTPS limitation for non-IIS Windows services in USM Add documentation clarifying that Universal Service Monitoring on Windows only supports HTTPS monitoring for IIS-based services. Non-IIS services (custom .NET apps, Node.js, Java, etc.) can only be monitored via HTTP. This limitation exists because USM on Windows uses Event Tracing for Windows (ETW) via the Microsoft-Windows-HttpService provider, which is only available for IIS services. Non-IIS services running HTTPS will not have their encrypted traffic monitored by USM. Includes a clear breakdown of what is and isn't supported: - IIS services: HTTP + HTTPS ✅ - Non-IIS services: HTTP only ✅, HTTPS ❌ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * some reformatting * edits --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: cecilia saixue watt <cecilia.watt@datadoghq.com>
1 parent a211697 commit a94685c

File tree

1 file changed

+58
-0
lines changed
  • content/en/universal_service_monitoring

1 file changed

+58
-0
lines changed

content/en/universal_service_monitoring/setup.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,52 @@ Additional protocols and traffic encryption methods are in <a href="/universal_s
4444
- Datadog Agent is installed alongside your service. Installing a tracing library is _not_ required.
4545
- The `env` tag for [Unified Service Tagging][1] has been applied to your deployment. The `service` and `version` tags are optional.
4646

47+
## How USM detects service names
48+
49+
<div class="alert alert-warning">
50+
Universal Service Monitoring detects service names from environment variables that exist when a process starts. USM reads these values from the operating system: from <code>/proc/PID/environ</code> on Linux, or through system APIs on Windows.
51+
</div>
52+
53+
USM recognizes the following environment variables:
54+
- `DD_SERVICE`: Explicitly sets the service name
55+
- `DD_ENV`: Sets the environment tag
56+
- `DD_VERSION`: Sets the version tag
57+
- `DD_TAGS`: Additional tags; can include the `service:name` tag
58+
59+
### Key limitation: USM and programmatically-set environment variables for APM
60+
61+
If you set environment variables programmatically **inside your application code** (such as `System.setProperty("dd.service", "my-service")` in Java, or `Environment.SetEnvironmentVariable("DD_SERVICE", "my-service")` in .NET), these environment variables are **not** detected by USM, even though these values work for APM tracing instrumentation.
62+
63+
This happens because USM runs in the Datadog Agent as a separate process and only sees the environment variables that were set when your process started. Conversely, APM instrumentation libraries run inside your application process and can read runtime environment changes.
64+
65+
**To ensure USM detection, set environment variables before the application starts**:
66+
67+
{{< tabs >}}
68+
{{% tab "Docker" %}}
69+
```yaml
70+
environment:
71+
- DD_SERVICE=my-service
72+
- DD_ENV=production
73+
```
74+
{{% /tab %}}
75+
{{% tab "Kubernetes" %}}
76+
```yaml
77+
env:
78+
- name: DD_SERVICE
79+
value: "my-service"
80+
- name: DD_ENV
81+
value: "production"
82+
```
83+
{{% /tab %}}
84+
{{% tab "Shell" %}}
85+
```bash
86+
export DD_SERVICE=my-service
87+
export DD_ENV=production
88+
java -jar myapp.jar
89+
```
90+
{{% /tab %}}
91+
{{< /tabs >}}
92+
4793
## Enabling Universal Service Monitoring
4894

4995
Enable Universal Service Monitoring in your Agent by using one of the following methods depending on how your service is deployed and your Agent configured:
@@ -751,6 +797,18 @@ service_monitoring_config:
751797
process_service_inference:
752798
enabled: true
753799
```
800+
801+
<div class="alert alert-warning">
802+
<strong>Important limitation for non-IIS Windows services:</strong> Universal Service Monitoring on Windows uses Event Tracing for Windows (ETW) through the <code>Microsoft-Windows-HttpService</code> provider for HTTPS traffic monitoring. This ETW provider is only available for IIS-based services. Non-IIS services (such as custom .NET applications, Node.js servers, Java servers, or other HTTP servers running on Windows) <strong>do not support HTTPS monitoring</strong> through USM. Only plain HTTP traffic can be monitored for non-IIS Windows services.
803+
</div>
804+
805+
### IIS and non-IIS service support
806+
807+
| Service type | HTTP traffic monitoring | HTTPS traffic monitoring |
808+
| --- | ----------- | ----------- |
809+
| IIS services | Supported | Supported |
810+
| Non-IIS services | Supported | **Not supported** |
811+
754812

755813
[1]: /agent/basic_agent_usage/windows/?tab=commandline
756814
{{% /tab %}}

0 commit comments

Comments
 (0)