@newrelic/browser-agent 1.318.0-rc.1 → 1.318.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/common/constants/env.cdn.js +1 -1
- package/dist/cjs/common/constants/env.npm.js +1 -1
- package/dist/cjs/features/ajax/aggregate/index.js +7 -7
- package/dist/esm/common/constants/env.cdn.js +1 -1
- package/dist/esm/common/constants/env.npm.js +1 -1
- package/dist/esm/features/ajax/aggregate/index.js +7 -7
- package/package.json +1 -1
- package/src/features/ajax/aggregate/index.js +7 -7
|
@@ -17,7 +17,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.RRWEB_PACKAGE_NAME = exports.D
|
|
|
17
17
|
/**
|
|
18
18
|
* Exposes the version of the agent
|
|
19
19
|
*/
|
|
20
|
-
const VERSION = exports.VERSION = "1.318.0-rc.
|
|
20
|
+
const VERSION = exports.VERSION = "1.318.0-rc.2";
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Exposes the build type of the agent
|
|
@@ -17,7 +17,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.RRWEB_PACKAGE_NAME = exports.D
|
|
|
17
17
|
/**
|
|
18
18
|
* Exposes the version of the agent
|
|
19
19
|
*/
|
|
20
|
-
const VERSION = exports.VERSION = "1.318.0-rc.
|
|
20
|
+
const VERSION = exports.VERSION = "1.318.0-rc.2";
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Exposes the build type of the agent
|
|
@@ -97,20 +97,20 @@ class Aggregate extends _aggregateBase.AggregateBase {
|
|
|
97
97
|
callbackDuration: metrics.cbTime,
|
|
98
98
|
[_constants.AJAX_ID]: (0, _uniqueId.generateUuid)() // all AjaxRequest events should have a unique identifier to allow for easier grouping and analysis in the UI
|
|
99
99
|
};
|
|
100
|
-
event.gql =
|
|
100
|
+
event.gql = (0, _gql.parseGQL)({
|
|
101
101
|
body: ctx.requestBody,
|
|
102
102
|
query: ctx.parsedOrigin?.search
|
|
103
103
|
});
|
|
104
|
-
if (event.gql) event.gql.operationHasErrors =
|
|
104
|
+
if (event.gql) event.gql.operationHasErrors = (0, _gql.hasGQLErrors)(ctx.responseBody);
|
|
105
105
|
const capturePayloadSetting = this.agentRef.init.ajax.capture_payloads;
|
|
106
106
|
const shouldCapturePayload = (0, _payloads.canCapturePayload)(capturePayloadSetting, params.status, event.gql?.operationHasErrors);
|
|
107
107
|
if (shouldCapturePayload) {
|
|
108
108
|
// Store raw data; obfuscation and truncation will happen in the serializer
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
if ((0, _payloads.isLikelyHumanReadable)(ctx.requestHeaders, ctx.requestBody))
|
|
113
|
-
if ((0, _payloads.isLikelyHumanReadable)(ctx.responseHeaders, ctx.responseBody))
|
|
109
|
+
event.requestQuery = (0, _payloads.parseQueryString)(ctx.parsedOrigin?.search);
|
|
110
|
+
event.requestHeaders = ctx.requestHeaders;
|
|
111
|
+
event.responseHeaders = ctx.responseHeaders;
|
|
112
|
+
if ((0, _payloads.isLikelyHumanReadable)(ctx.requestHeaders, ctx.requestBody)) event.requestBody = ctx.requestBody;
|
|
113
|
+
if ((0, _payloads.isLikelyHumanReadable)(ctx.responseHeaders, ctx.responseBody)) event.responseBody = ctx.responseBody;
|
|
114
114
|
}
|
|
115
115
|
if (ctx.dt) {
|
|
116
116
|
event.spanId = ctx.dt.spanId;
|
|
@@ -90,20 +90,20 @@ export class Aggregate extends AggregateBase {
|
|
|
90
90
|
callbackDuration: metrics.cbTime,
|
|
91
91
|
[AJAX_ID]: generateUuid() // all AjaxRequest events should have a unique identifier to allow for easier grouping and analysis in the UI
|
|
92
92
|
};
|
|
93
|
-
event.gql =
|
|
93
|
+
event.gql = parseGQL({
|
|
94
94
|
body: ctx.requestBody,
|
|
95
95
|
query: ctx.parsedOrigin?.search
|
|
96
96
|
});
|
|
97
|
-
if (event.gql) event.gql.operationHasErrors =
|
|
97
|
+
if (event.gql) event.gql.operationHasErrors = hasGQLErrors(ctx.responseBody);
|
|
98
98
|
const capturePayloadSetting = this.agentRef.init.ajax.capture_payloads;
|
|
99
99
|
const shouldCapturePayload = canCapturePayload(capturePayloadSetting, params.status, event.gql?.operationHasErrors);
|
|
100
100
|
if (shouldCapturePayload) {
|
|
101
101
|
// Store raw data; obfuscation and truncation will happen in the serializer
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
if (isLikelyHumanReadable(ctx.requestHeaders, ctx.requestBody))
|
|
106
|
-
if (isLikelyHumanReadable(ctx.responseHeaders, ctx.responseBody))
|
|
102
|
+
event.requestQuery = parseQueryString(ctx.parsedOrigin?.search);
|
|
103
|
+
event.requestHeaders = ctx.requestHeaders;
|
|
104
|
+
event.responseHeaders = ctx.responseHeaders;
|
|
105
|
+
if (isLikelyHumanReadable(ctx.requestHeaders, ctx.requestBody)) event.requestBody = ctx.requestBody;
|
|
106
|
+
if (isLikelyHumanReadable(ctx.responseHeaders, ctx.responseBody)) event.responseBody = ctx.responseBody;
|
|
107
107
|
}
|
|
108
108
|
if (ctx.dt) {
|
|
109
109
|
event.spanId = ctx.dt.spanId;
|
package/package.json
CHANGED
|
@@ -102,22 +102,22 @@ export class Aggregate extends AggregateBase {
|
|
|
102
102
|
[AJAX_ID]: generateUuid() // all AjaxRequest events should have a unique identifier to allow for easier grouping and analysis in the UI
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
event.gql =
|
|
105
|
+
event.gql = parseGQL({
|
|
106
106
|
body: ctx.requestBody,
|
|
107
107
|
query: ctx.parsedOrigin?.search
|
|
108
108
|
})
|
|
109
|
-
if (event.gql) event.gql.operationHasErrors =
|
|
109
|
+
if (event.gql) event.gql.operationHasErrors = hasGQLErrors(ctx.responseBody)
|
|
110
110
|
|
|
111
111
|
const capturePayloadSetting = this.agentRef.init.ajax.capture_payloads
|
|
112
112
|
const shouldCapturePayload = canCapturePayload(capturePayloadSetting, params.status, event.gql?.operationHasErrors)
|
|
113
113
|
|
|
114
114
|
if (shouldCapturePayload) {
|
|
115
115
|
// Store raw data; obfuscation and truncation will happen in the serializer
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
if (isLikelyHumanReadable(ctx.requestHeaders, ctx.requestBody))
|
|
120
|
-
if (isLikelyHumanReadable(ctx.responseHeaders, ctx.responseBody))
|
|
116
|
+
event.requestQuery = parseQueryString(ctx.parsedOrigin?.search)
|
|
117
|
+
event.requestHeaders = ctx.requestHeaders
|
|
118
|
+
event.responseHeaders = ctx.responseHeaders
|
|
119
|
+
if (isLikelyHumanReadable(ctx.requestHeaders, ctx.requestBody)) event.requestBody = ctx.requestBody
|
|
120
|
+
if (isLikelyHumanReadable(ctx.responseHeaders, ctx.responseBody)) event.responseBody = ctx.responseBody
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
if (ctx.dt) {
|