Process a trace and store a report file
Processes a trace and stores the report in a file resource in the Files service. A text report is produced from the raw trace. The text report for a decision step boundary provides the following information: The mappings of the input and output variables to the traced decision. In general a step in a decision names its variables congruent to their purpose in the step while the decision variables are often drawn from a data table that name the columns from a perspective different from the step. In that case, the decision variables have to be mapped to the step's variables.
The text report for a variable assignment provides the following information: The line number in the entire decision code. The DS2 package or the thread block name. The line number within the DS2 package or the thread block. The variable and the value assigned to it. The report is stored as the content of a file resource in the Files service so that it can be obtained for viewing. The file content is given the name in the format of testName_trace.txt.
The same raw trace can be processed as many times as needed. At the end of each successful processing, the previously allocated file object in the Files service is deleted. A new file resource is created. The Files service allows a file size up to 100MB by default. The report can be twice as large or more as the raw trace.
Upon successful processing, this operation stores the Files service resource URI and the timestamp of the processing in the processorNote column of the raw trace record.
Though a trace ID can be associated with both decision boundary and variable assignment traces, only one type of trace can be processed at one time.
1{2 "version": 1,3 "traceId": "6d707a51-62b3-40a4-4973-b2d9f12d20fe",4 "traceTimeStamp": "2020-09-08T14:29:30.000Z",5 "processedTimeStamp": "2020-09-08T14:35:27.000Z",6 "reportUri": "/files/files/b8bc8dd8-6747-4194-8b64-6f574f0f1f42",7 "objectUri": "/decisions/flows/501fa196-6d6e-4515-ac8f-3840ba576b56/revisions/37f0e7af-d27d-453c-b3a0-546f29c26a94",8 "links": [9 {10 "method": "POST",11 "rel": "self",12 "href": "/subjectContacts/traces/6d707a51-62b3-40a4-4973-b2d9f12d20fe/process?scope=step",13 "uri": "/subjectContacts/traces/6d707a51-62b3-40a4-4973-b2d9f12d20fe/process?scope=step",14 "type": "application/vnd.sas.decision.trace.report"15 },16 {17 "method": "GET",18 "rel": "reportContent",19 "href": "/files/files/b8bc8dd8-6747-4194-8b64-6f574f0f1f42/content",20 "uri": "/files/files/b8bc8dd8-6747-4194-8b64-6f574f0f1f42/content"21 },22 {23 "method": "GET",24 "rel": "rawContent",25 "href": "/subjectContacts/traces?filter=eq(traceId,'6d707a51-62b3-40a4-4973-b2d9f12d20fe')&scope=step",26 "uri": "/subjectContacts/traces?filter=eq(traceId,'6d707a51-62b3-40a4-4973-b2d9f12d20fe')&scope=step",27 "type": "text/tab-separated-values"28 }29 ]30}
Name | Type | Required | Description |
---|---|---|---|
traceId | string | true | The id of the trace to process. Examples: "3b4998e5-bac3-4a60-af24-61f63912fbf0" |
Name | Type | Required | Description |
---|---|---|---|
scope | string | false | The type of trace. Allowed values: assignmentstep Default: step |
testName | string | false | The name of a decision test case that produces the trace. It is used in naming the report. The testName portion of the report name is encoded. Each character not safe to be used in a URL are encoded in the form of a percent character followed by a pair of hexadecimal characters. Default: traceId |
Status | Meaning | Description | ||
---|---|---|---|---|
201 | Created | The request succeeded. | Schema | |
400 | Bad Request | The request was invalid. | Schema | |
404 | Not Found | No resource identified by the traceId. | Schema |