Skip to content

Commit ef36810

Browse files
authored
Merge branch 'main' into mtoff/query-string-consistency
2 parents 21c9593 + 39044ff commit ef36810

32 files changed

+671
-199
lines changed

conftest.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from utils.tools import logger
1616
from utils.scripts.junit_report import junit_modifyreport
1717
from utils._context.library_version import LibraryVersion
18-
from utils._decorators import released
18+
from utils._decorators import released, configure as configure_decorators
1919
from utils.properties_serialization import SetupProperties
2020

2121
# Monkey patch JSON-report plugin to avoid noise in report
@@ -103,6 +103,8 @@ def pytest_configure(config):
103103
config.option.json_report_file = f"{context.scenario.host_log_folder}/report.json"
104104
config.option.xmlpath = f"{context.scenario.host_log_folder}/reportJunit.xml"
105105

106+
configure_decorators(config)
107+
106108

107109
# Called at the very begening
108110
def pytest_sessionstart(session):

docs/scenarios/parametric.md

+31
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,37 @@ docker image rm <library>-test-library
296296
The Python implementation of the interface `app/python`, when run, provides a specification of the API when run.
297297
See the steps below in the HTTP section to run the Python server and view the specification.
298298

299+
## Updating protos
300+
301+
In order to update the `parametric/protos`, these steps must be followed.
302+
303+
1. Create a virtual environment and activate it:
304+
```bash
305+
python3.12 -m venv .venv && source .venv/bin/activate
306+
```
307+
308+
2. Install the required dependencies:
309+
```bash
310+
pip install -r requirements.txt
311+
```
312+
313+
3. Install `grpcio-tools` (make sure grpcaio is the same version):
314+
```bash
315+
pip install grpcio-tools==1.60.1
316+
```
317+
318+
4. Change directory to `utils/parametric`:
319+
```console
320+
cd utils/parametric
321+
```
322+
323+
5. Run the script to generate the proto files:
324+
```bash
325+
./generate_protos.sh
326+
```
327+
328+
Then you should have updated proto files. This script will generate weird files, you can ignore/delete these.
329+
299330
## Implementation
300331

301332
### Shared Interface

docs/weblog/README.md

+17
Original file line numberDiff line numberDiff line change
@@ -678,3 +678,20 @@ Examples:
678678
### \[GET\] /set_cookie
679679

680680
This endpoint get a `name` and a `value` form the query string, and adds a header `Set-Cookie` with `{name}={value}` as header value in the HTTP response
681+
682+
### \[GET\] /session/new
683+
684+
This endpoint is the initial endpoint used to test session fingerprints, consequently it must initialize a new session and the web client should be able to deal with the persistence mechanism (e.g. cookies).
685+
686+
Examples:
687+
- `GET`: `/session/new`
688+
689+
### \[GET\] /session/user
690+
691+
Once a session has been established, a new call to `/session/user` must be made in order to generate a session fingerprint with the session id provided by the web client (e.g. cookie) and the user id provided as a parameter.
692+
693+
Query parameters required in the `GET` method:
694+
- `sdk_user`: user id used in the WAF login event triggered during the execution of the request.
695+
696+
Examples:
697+
- `GET`: `/session/user?sdk_user=sdkUser`

manifests/cpp.yml

+2
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ tests/:
171171
test_config_consistency.py:
172172
Test_Config_ClientTagQueryString_Configured: missing_feature
173173
Test_Config_ClientTagQueryString_Empty: missing_feature (test can not capture span with the expected http.url tag)
174+
Test_Config_HttpClientErrorStatuses_Default: missing_feature
175+
Test_Config_HttpClientErrorStatuses_FeatureFlagCustom: missing_feature
174176
Test_Config_HttpServerErrorStatuses_Default: missing_feature
175177
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
176178
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature

manifests/dotnet.yml

+3
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ tests/:
230230
test_fingerprinting.py:
231231
Test_Fingerprinting_Endpoint: missing_feature
232232
Test_Fingerprinting_Header_And_Network: missing_feature
233+
Test_Fingerprinting_Session: missing_feature
233234
test_identify.py:
234235
Test_Basic: v2.7.0
235236
test_ip_blocking_full_denylist.py:
@@ -367,6 +368,8 @@ tests/:
367368
test_config_consistency.py:
368369
Test_Config_ClientTagQueryString_Configured: missing_feature (configuration DNE)
369370
Test_Config_ClientTagQueryString_Empty: v2.53.0
371+
Test_Config_HttpClientErrorStatuses_Default: missing_feature
372+
Test_Config_HttpClientErrorStatuses_FeatureFlagCustom: missing_feature
370373
Test_Config_HttpServerErrorStatuses_Default: missing_feature
371374
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
372375
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature

manifests/golang.yml

+3
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ tests/:
305305
test_fingerprinting.py:
306306
Test_Fingerprinting_Endpoint: missing_feature
307307
Test_Fingerprinting_Header_And_Network: missing_feature
308+
Test_Fingerprinting_Session: missing_feature
308309
test_identify.py:
309310
Test_Basic: v1.37.0
310311
test_ip_blocking_full_denylist.py:
@@ -487,6 +488,8 @@ tests/:
487488
test_config_consistency.py:
488489
Test_Config_ClientTagQueryString_Configured: missing_feature (supports DD_TRACE_HTTP_URL_QUERY_STRING_DISABLED)
489490
Test_Config_ClientTagQueryString_Empty: v1.60.0
491+
Test_Config_HttpClientErrorStatuses_Default: missing_feature
492+
Test_Config_HttpClientErrorStatuses_FeatureFlagCustom: missing_feature
490493
Test_Config_HttpServerErrorStatuses_Default: missing_feature
491494
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
492495
Test_Config_ObfuscationQueryStringRegexp_Configured: v1.67.0

manifests/java.yml

+3
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,7 @@ tests/:
910910
Test_Fingerprinting_Header_And_Network:
911911
'*': v1.39.0
912912
spring-boot-3-native: irrelevant (GraalVM. Tracing support only)
913+
Test_Fingerprinting_Session: missing_feature
913914
test_identify.py:
914915
Test_Basic: missing_feature
915916
test_ip_blocking_full_denylist.py:
@@ -1237,6 +1238,8 @@ tests/:
12371238
test_config_consistency.py:
12381239
Test_Config_ClientTagQueryString_Configured: missing_feature (endpoints return 404, but in theory should work)
12391240
Test_Config_ClientTagQueryString_Empty: missing_feature (incorrect default value)
1241+
Test_Config_HttpClientErrorStatuses_Default: missing_feature
1242+
Test_Config_HttpClientErrorStatuses_FeatureFlagCustom: missing_feature
12401243
Test_Config_HttpServerErrorStatuses_Default: missing_feature
12411244
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
12421245
Test_Config_ObfuscationQueryStringRegexp_Configured: v1.39.0

manifests/nodejs.yml

+3
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ tests/:
377377
test_fingerprinting.py:
378378
Test_Fingerprinting_Endpoint: missing_feature
379379
Test_Fingerprinting_Header_And_Network: missing_feature
380+
Test_Fingerprinting_Session: missing_feature
380381
test_identify.py:
381382
Test_Basic: v2.4.0
382383
test_ip_blocking_full_denylist.py:
@@ -562,6 +563,8 @@ tests/:
562563
test_config_consistency.py:
563564
Test_Config_ClientTagQueryString_Configured: missing_feature (adding query string to http.url is not supported)
564565
Test_Config_ClientTagQueryString_Empty: missing_feature (removes query strings by default)
566+
Test_Config_HttpClientErrorStatuses_Default: missing_feature
567+
Test_Config_HttpClientErrorStatuses_FeatureFlagCustom: missing_feature
565568
Test_Config_HttpServerErrorStatuses_Default: missing_feature
566569
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
567570
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature

manifests/php.yml

+3
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ tests/:
180180
test_fingerprinting.py:
181181
Test_Fingerprinting_Endpoint: missing_feature
182182
Test_Fingerprinting_Header_And_Network: missing_feature
183+
Test_Fingerprinting_Session: missing_feature
183184
test_identify.py:
184185
Test_Basic: v0.85.0
185186
test_logs.py:
@@ -318,6 +319,8 @@ tests/:
318319
test_config_consistency.py:
319320
Test_Config_ClientTagQueryString_Configured: missing_feature (supports dd_trace_http_url_query_param_allowed instead)
320321
Test_Config_ClientTagQueryString_Empty: v1.2.0
322+
Test_Config_HttpClientErrorStatuses_Default: missing_feature
323+
Test_Config_HttpClientErrorStatuses_FeatureFlagCustom: missing_feature
321324
Test_Config_HttpServerErrorStatuses_Default: v1.3.0 # Unknown initial version
322325
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
323326
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature

manifests/python.yml

+3
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ tests/:
464464
test_fingerprinting.py:
465465
Test_Fingerprinting_Endpoint: v2.11.0.dev
466466
Test_Fingerprinting_Header_And_Network: v2.11.0.dev
467+
Test_Fingerprinting_Session: missing_feature (missing endpoint)
467468
test_identify.py:
468469
Test_Basic: v1.5.0rc1.dev
469470
test_ip_blocking_full_denylist.py:
@@ -760,6 +761,8 @@ tests/:
760761
test_config_consistency.py:
761762
Test_Config_ClientTagQueryString_Configured: missing_feature (supports DD_HTPP_CLIENT_TAGS_QUERY_STRING instead)
762763
Test_Config_ClientTagQueryString_Empty: v2.12.0
764+
Test_Config_HttpClientErrorStatuses_Default: missing_feature
765+
Test_Config_HttpClientErrorStatuses_FeatureFlagCustom: missing_feature
763766
Test_Config_HttpServerErrorStatuses_Default: missing_feature
764767
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
765768
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature

manifests/ruby.yml

+5
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ tests/:
213213
test_fingerprinting.py:
214214
Test_Fingerprinting_Endpoint: missing_feature
215215
Test_Fingerprinting_Header_And_Network: missing_feature
216+
Test_Fingerprinting_Session: missing_feature
216217
test_identify.py:
217218
Test_Basic: v1.0.0
218219
test_ip_blocking_full_denylist.py:
@@ -332,6 +333,8 @@ tests/:
332333
Test_Config_TraceEnabled: missing_feature
333334
Test_Config_TraceLogDirectory: missing_feature
334335
Test_Config_UnifiedServiceTagging: missing_feature
336+
test_crashtracking.py:
337+
Test_Crashtracking: v2.3.0
335338
test_dynamic_configuration.py:
336339
TestDynamicConfigHeaderTags: bug (To be confirmed, theorical version is v2.0.0)
337340
TestDynamicConfigSamplingRules: v2.0.0
@@ -388,6 +391,8 @@ tests/:
388391
test_config_consistency.py:
389392
Test_Config_ClientTagQueryString_Configured: missing_feature
390393
Test_Config_ClientTagQueryString_Empty: missing_feature (removes query string by default)
394+
Test_Config_HttpClientErrorStatuses_Default: missing_feature
395+
Test_Config_HttpClientErrorStatuses_FeatureFlagCustom: missing_feature
391396
Test_Config_HttpServerErrorStatuses_Default: missing_feature
392397
Test_Config_HttpServerErrorStatuses_FeatureFlagCustom: missing_feature
393398
Test_Config_ObfuscationQueryStringRegexp_Configured: missing_feature

0 commit comments

Comments
 (0)