|
| 1 | +diff --git a/build/cjs/vendor/instrumentation.js b/build/cjs/vendor/instrumentation.js |
| 2 | +index 84e18d1051f57d5807e65c8b8ce858ceee7d4557..640a5253d565650338fe33e0ea52c8dffc63e4e7 100644 |
| 3 | +--- a/build/cjs/vendor/instrumentation.js |
| 4 | ++++ b/build/cjs/vendor/instrumentation.js |
| 5 | +@@ -238,7 +238,7 @@ class RemixInstrumentation extends instrumentation.InstrumentationBase { |
| 6 | + return function callRouteAction(original) { |
| 7 | + return async function patchCallRouteAction( ...args) { |
| 8 | + const [params] = args; |
| 9 | +- const clonedRequest = params.request.clone(); |
| 10 | ++ const clonedRequest = params.request; |
| 11 | + const span = plugin.tracer.startSpan( |
| 12 | + `ACTION ${params.routeId}`, |
| 13 | + { attributes: { [semanticConventions.SemanticAttributes.CODE_FUNCTION]: 'action' } }, |
| 14 | +@@ -257,25 +257,6 @@ class RemixInstrumentation extends instrumentation.InstrumentationBase { |
| 15 | + .then(async response => { |
| 16 | + addResponseAttributesToSpan(span, response); |
| 17 | + |
| 18 | +- try { |
| 19 | +- const formData = await clonedRequest.formData(); |
| 20 | +- const { actionFormDataAttributes: actionFormAttributes } = plugin.getConfig(); |
| 21 | +- |
| 22 | +- formData.forEach((value, key) => { |
| 23 | +- if ( |
| 24 | +- actionFormAttributes?.[key] && |
| 25 | +- actionFormAttributes[key] !== false && |
| 26 | +- typeof value === 'string' |
| 27 | +- ) { |
| 28 | +- const keyName = actionFormAttributes[key] === true ? key : actionFormAttributes[key]; |
| 29 | +- span.setAttribute(`formData.${keyName}`, value.toString()); |
| 30 | +- } |
| 31 | +- }); |
| 32 | +- } catch { |
| 33 | +- // Silently continue on any error. Typically happens because the action body cannot be processed |
| 34 | +- // into FormData, in which case we should just continue. |
| 35 | +- } |
| 36 | +- |
| 37 | + return response; |
| 38 | + }) |
| 39 | + .catch(async error => { |
0 commit comments