Skip to content

Commit cec3757

Browse files
robertomonteromiguelcbeauchesnehennadii-datadog
authored
Add RUM_INJECTION scenario to test Real User Monitoring SDK injection (#5813)
Co-authored-by: Charles de Beauchesne <charles.debeauchesne@datadoghq.com> Co-authored-by: hennadii-datadog <165046351+hennadii-datadog@users.noreply.github.com>
1 parent 548d917 commit cec3757

File tree

19 files changed

+127
-1
lines changed

19 files changed

+127
-1
lines changed

docs/weblog/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,30 @@ The following text may be written to the body of the response:
4141
Hello headers!\n
4242
```
4343

44+
### GET /html
45+
46+
This endpoint returns an HTML page instead of a JSON response. It is used to test features that require HTML content, such as RUM (Real User Monitoring) auto-injection.
47+
48+
**Important:** This is a server-rendered HTML endpoint, not a REST/JSON endpoint. The tracer may inject additional scripts (like the RUM SDK) into the HTML response when RUM injection is enabled.
49+
50+
The response content type must be `text/html`.
51+
52+
The HTML content **must** be :
53+
54+
```html
55+
<!DOCTYPE html>
56+
<html>
57+
<head>
58+
<title>Hello</title>
59+
</head>
60+
<body>
61+
<h1>Hello</h1>
62+
</body>
63+
</html>
64+
```
65+
66+
**Note:** When RUM injection is enabled via environment variables (`DD_RUM_ENABLED=true`), the tracer will automatically inject the RUM SDK script into the HTML response.
67+
4468
### GET /identify
4569

4670
This endpoint must set the following tags on the local root span:

manifests/cpp_httpd.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ manifest:
7777
tests/test_profiling.py: missing_feature (missing profiling module in weblog)
7878
tests/test_protobuf.py: missing_feature
7979
tests/test_resource_renaming.py: missing_feature
80+
tests/test_rum_injection.py: irrelevant (RUM injection only supported for Java)
8081
tests/test_sampling_rates.py::Test_SampleRateFunction: v1.0.0 # real version unknown
8182
tests/test_sampling_rates.py::Test_SamplingDecisionAdded: v1.0.0 # real version unknown
8283
tests/test_sampling_rates.py::Test_SamplingDecisions: v1.0.0 # real version unknown

manifests/cpp_nginx.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ manifest:
234234
tests/test_miscs.py: irrelevant
235235
tests/test_protobuf.py: missing_feature
236236
tests/test_resource_renaming.py: missing_feature
237+
tests/test_rum_injection.py: irrelevant (RUM injection only supported for Java)
237238
tests/test_sampling_rates.py::Test_SampleRateFunction: v1.0.0 # real version unknown
238239
tests/test_sampling_rates.py::Test_SamplingDecisionAdded: v1.0.0 # real version unknown
239240
tests/test_sampling_rates.py::Test_SamplingDecisions: v1.0.0 # real version unknown

manifests/dotnet.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,7 @@ manifest:
571571
uds: missing_feature (to be confirmed)
572572
tests/test_protobuf.py::Test_Protobuf: v3.15.0
573573
tests/test_resource_renaming.py: missing_feature
574+
tests/test_rum_injection.py: irrelevant (RUM injection only supported for Java)
574575
tests/test_sampling_rates.py::Test_SampleRateFunction: v3.11.1 # real version unknown
575576
tests/test_sampling_rates.py::Test_SamplingDecisionAdded: v3.11.1 # real version unknown
576577
tests/test_sampling_rates.py::Test_SamplingDecisions: v3.11.1 # real version unknown

manifests/golang.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,7 @@ manifest:
857857
tests/test_library_conf.py::Test_HeaderTags_Wildcard_Response_Headers: missing_feature
858858
tests/test_protobuf.py: missing_feature
859859
tests/test_resource_renaming.py: missing_feature
860+
tests/test_rum_injection.py: irrelevant (RUM injection only supported for Java)
860861
tests/test_sampling_rates.py::Test_SampleRateFunction: v1.72.1 # real version unknown
861862
tests/test_sampling_rates.py::Test_SamplingDecisionAdded: v1.72.1 # real version unknown
862863
tests/test_sampling_rates.py::Test_SamplingDecisions: v1.72.1 # real version unknown

manifests/java.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2623,6 +2623,10 @@ manifest:
26232623
"*": missing_feature
26242624
spring-boot: v1.47.0
26252625
tests/test_resource_renaming.py: missing_feature
2626+
tests/test_rum_injection.py:
2627+
- weblog_declaration:
2628+
"*": irrelevant (RUM injection only supported for spring-boot)
2629+
spring-boot: v1.49.0
26262630
tests/test_sampling_rates.py::Test_SampleRateFunction:
26272631
- weblog_declaration:
26282632
"*": v1.49.0

manifests/nodejs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,6 +1621,7 @@ manifest:
16211621
- weblog_declaration:
16221622
"*": *ref_5_81_0
16231623
nextjs: missing_feature
1624+
tests/test_rum_injection.py: irrelevant (RUM injection only supported for Java)
16241625
tests/test_sampling_rates.py::Test_SampleRateFunction: *ref_5_54_0
16251626
tests/test_sampling_rates.py::Test_SamplingDecisionAdded: *ref_5_17_0
16261627
tests/test_sampling_rates.py::Test_SamplingDecisions: *ref_5_54_0

manifests/php.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,7 @@ manifest:
560560
tests/test_profiling.py::Test_Profile: missing_feature (profiling seems not to be activated)
561561
tests/test_protobuf.py: missing_feature
562562
tests/test_resource_renaming.py: missing_feature
563+
tests/test_rum_injection.py: irrelevant (RUM injection only supported for Java)
563564
tests/test_sampling_rates.py::Test_SampleRateFunction: v1.13.0+4663b2fa7c20c6920f347d059b57dc2a419cb7f7
564565
tests/test_sampling_rates.py::Test_SamplingDecisionAdded: v1.7.2 # real version unknown
565566
tests/test_sampling_rates.py::Test_SamplingDecisions: v1.13.0+4663b2fa7c20c6920f347d059b57dc2a419cb7f7

manifests/python.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,6 +1344,7 @@ manifest:
13441344
tests/test_protobuf.py: missing_feature
13451345
tests/test_resource_renaming.py::Test_Resource_Renaming_HTTP_Endpoint_Tag: v3.17.0
13461346
tests/test_resource_renaming.py::Test_Resource_Renaming_Stats_Aggregation_Keys: v3.17.0
1347+
tests/test_rum_injection.py: irrelevant (RUM injection only supported for Java)
13471348
tests/test_sampling_rates.py::Test_SampleRateFunction: v3.6.0+dev
13481349
tests/test_sampling_rates.py::Test_SamplingDecisionAdded: v2.8.0
13491350
tests/test_sampling_rates.py::Test_SamplingDecisions: v3.6.0+dev

manifests/python_lambda.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,4 +236,5 @@ manifest:
236236
"*": v8.113.0
237237
alb-multi: v8.114.0.dev
238238
tests/test_resource_renaming.py: missing_feature
239+
tests/test_rum_injection.py: irrelevant (RUM injection only supported for Java)
239240
tests/test_v1_payloads.py: missing_feature

0 commit comments

Comments
 (0)