diff --git a/packages/datadog-plugin-graphql/src/utils.js b/packages/datadog-plugin-graphql/src/utils.js index 5ad9f11f0f8..112fbed4f74 100644 --- a/packages/datadog-plugin-graphql/src/utils.js +++ b/packages/datadog-plugin-graphql/src/utils.js @@ -17,7 +17,7 @@ function extractErrorIntoSpanEvent (config, span, exc) { } if (exc.path) { - attributes.path = exc.path + attributes.path = exc.path.toString() } if (exc.message) { @@ -27,7 +27,7 @@ function extractErrorIntoSpanEvent (config, span, exc) { if (config.graphqlErrorExtensions) { for (const ext of config.graphqlErrorExtensions) { if (exc.extensions?.[ext]) { - attributes[`extensions.${ext}`] = exc.extensions[ext] + attributes[`extensions.${ext}`] = exc.extensions[ext].toString() } } }