Skip to content

Commit e33cc28

Browse files
authored
fix(readme): fix example of the responses config endpoint (#212)
1 parent c31a4ef commit e33cc28

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ See the [Development](#development) section for how to get the test agent runnin
1818
## Installation
1919

2020
The test agent can be installed using [nix](https://docs.determinate.systems/getting-started/):
21-
21+
2222
nix profile install github:datadog/dd-apm-test-agent#ddapm-test-agent
2323
# nix profile upgrade ddapm-test-agent # to upgrade
2424

@@ -50,7 +50,7 @@ or a specific branch:
5050

5151
### Trace invariant checks
5252

53-
Many checks are provided by the test agent which will verify trace data.
53+
Many checks are provided by the test agent which will verify trace data.
5454
All checks are enabled by default and can be manually disabled.
5555

5656
See the [configuration](#configuration) section for the options.
@@ -86,19 +86,19 @@ INFO:ddapm_test_agent.agent:end of payload -------------------------------------
8686

8787
### Proxy
8888

89-
The test agent provides proxying to the Datadog agent.
89+
The test agent provides proxying to the Datadog agent.
9090
This is enabled by passing the agent url to the test agent either via the `--agent-url` command-line argument or by the `DD_TRACE_AGENT_URL` or `DD_AGENT_URL` environment variables.
9191

9292
When proxying is enabled, the response from the Datadog agent will be returned instead of one from the test agent.
9393

94-
At the trace-level, proxying can also be disabled by including the `X-Datadog-Agent-Proxy-Disabled` header with a value of `true`. This will disable proxying after a trace
94+
At the trace-level, proxying can also be disabled by including the `X-Datadog-Agent-Proxy-Disabled` header with a value of `true`. This will disable proxying after a trace
9595
is handled, regardless of whether an agent URL is set.
9696

9797

9898
### Snapshot testing
9999

100100
The test agent provides a form of [characterization testing](https://en.wikipedia.org/wiki/Characterization_test) which
101-
we refer to as snapshotting.
101+
we refer to as snapshotting.
102102
This allows library maintainers to ensure that traces don't change unexpectedly when making unrelated changes.
103103

104104
This can be used to write integration tests by having test cases use the tracer to emit traces which are collected by the test agent and compared against reference traces stored previously.
@@ -129,7 +129,7 @@ The traces are normalized and output in JSON to a file. The following transforma
129129

130130
### Recording 3rd party API requests
131131

132-
The test agent can be configured to proxy requests to select provider API endpoints, capturing real requests to
132+
The test agent can be configured to proxy requests to select provider API endpoints, capturing real requests to
133133
the server and recording them to play back for future use. Currently, only OpenAI, Azure OpenAI, and DeepSeek are supported.
134134

135135
These cassettes are recorded by default in the `vcr-cassettes` directory. However, this can be changed with the `--vcr-cassettes-directory` command-line option, or `VCR_CASSETTES_DIRECTORY` environment variable.
@@ -245,8 +245,8 @@ Please refer to `ddapm-test-agent-fmt --help` for more information.
245245
- `DD_SUPPRESS_TRACE_PARSE_ERRORS` [`false`]: Set to `"true"` to disable span parse errors when decoding handled traces. When disabled, errors will not be thrown for
246246
metrics incorrectly placed within the meta field, or other type errors related to span tag formatting/types. Can also be set using the `--suppress-trace-parse-errors=true` option.
247247

248-
- `SNAPSHOT_REMOVED_ATTRS` [`""`]: The attributes to remove from spans in snapshots. This is useful for removing attributes
249-
that are not relevant to the test case. **Note that removing `span_id` is not permitted to allow span
248+
- `SNAPSHOT_REMOVED_ATTRS` [`""`]: The attributes to remove from spans in snapshots. This is useful for removing attributes
249+
that are not relevant to the test case. **Note that removing `span_id` is not permitted to allow span
250250
ordering to be maintained.**
251251

252252
- `SNAPSHOT_REGEX_PLACEHOLDERS` [`""`]: The regex expressions to replace by a placeholder. Expressed as a comma separated `key:value` list. Specifying `ba[rz]:placeholder` will change any occurrence of `bar` or `baz` to `{placeholder}`: `foobarbazqux` -> `foo{placeholder}{placeholder}qux`. This is in particular useful to strip path prefixes or other infrastructure dependent identifiers.
@@ -386,11 +386,11 @@ Create a Remote Config payload to retrieve in endpoint `/v0.7/config`
386386
#### [optional] `X-Datadog-Test-Session-Token`
387387

388388
```
389-
curl -X POST 'http://0.0.0.0:8126/test/session/responses/config/path' -d '{"roots": ["eyJ....fX0="], "targets": "ey...19", "target_files": [{"path": "datadog/2/ASM_DATA/blocked_users/config", "raw": "eyJydWxlc19kYXRhIjogW119"}], "client_configs": ["datadog/2/ASM_DATA/blocked_users/config"]}'
389+
curl -X POST 'http://0.0.0.0:8126/test/session/responses/config' -d '{"roots": ["eyJ....fX0="], "targets": "ey...19", "target_files": [{"path": "datadog/2/ASM_DATA/blocked_users/config", "raw": "eyJydWxlc19kYXRhIjogW119"}], "client_configs": ["datadog/2/ASM_DATA/blocked_users/config"]}'
390390
```
391391

392392
### /test/session/responses/config/path (POST)
393-
Due to Remote Config payload being quite complicated, this endpoint works like `/test/session/responses/config (POST)`
393+
Due to Remote Config payload being quite complicated, this endpoint works like `/test/session/responses/config (POST)`
394394
but you should send a path and a message and this endpoint builds the Remote Config payload.
395395

396396
The keys of the JSON body are `path` and `msg`
@@ -404,9 +404,9 @@ curl -X POST 'http://0.0.0.0:8126/test/session/responses/config/path' -d '{"path
404404

405405

406406
### /test/trace_check/failures (GET)
407-
Get Trace Check failures that occured. If a token is included, trace failures for only that session token are returned unless used in conjuction with `return_all`, which can be used to return all failures regardless of inputted token. This method returns a `<Response 200>` if no Trace Check failures are being returned and a `<Response 400>` if Trace Check failures are being returned. Trace Check failures are returned as a content type of text, with failure messages concatenated in the response body. Optionally, set the `use_json` query string parameter to `true` to return Trace Check failures as a JSON response in the following format:
407+
Get Trace Check failures that occured. If a token is included, trace failures for only that session token are returned unless used in conjuction with `return_all`, which can be used to return all failures regardless of inputted token. This method returns a `<Response 200>` if no Trace Check failures are being returned and a `<Response 400>` if Trace Check failures are being returned. Trace Check failures are returned as a content type of text, with failure messages concatenated in the response body. Optionally, set the `use_json` query string parameter to `true` to return Trace Check failures as a JSON response in the following format:
408408
```
409-
response = {
409+
response = {
410410
"<FAILING_CHECK_NAME>" : ["<FAILURE_MESSAGE_1>", "<FAILURE_MESSAGE_2>"]
411411
}
412412
```
@@ -434,9 +434,9 @@ curl -X GET 'http://0.0.0.0:8126/test/trace_check/clear'
434434
```
435435

436436
### /test/trace_check/summary (GET)
437-
Get Trace Check summary results. If a token is included, returns summary results only for Trace Checks run during the session. The `return_all` optional query string parameter can be used to return all trace check results (regardless of inputted session token). The method returns Trace Check results in the following JSON format:
437+
Get Trace Check summary results. If a token is included, returns summary results only for Trace Checks run during the session. The `return_all` optional query string parameter can be used to return all trace check results (regardless of inputted session token). The method returns Trace Check results in the following JSON format:
438438
```
439-
summary = {
439+
summary = {
440440
"trace_content_length" : {
441441
"Passed_Checks": 10,
442442
"Failed_Checks": 0,
@@ -465,7 +465,7 @@ curl -X PUT 'http://0.0.0.0:8126/test/session/integrations' -d '{"integration_na
465465
```
466466

467467
### /test/integrations/tested_versions (GET)
468-
Return a csv list of all tested integrations received by the agent. The format of returned data will be:
468+
Return a csv list of all tested integrations received by the agent. The format of returned data will be:
469469
`tracer_language,tracer_version,integration_name,integration_version,dependency_name`.
470470

471471
#### [optional] `?test_session_token=`

0 commit comments

Comments
 (0)