patch-package
--- a/node_modules/dd-trace/src/format.js
+++ b/node_modules/dd-trace/src/format.js
@@ -57,10 +57,18 @@ function extractTags (trace, span) {
       case 'error.msg':
       case 'error.stack':
         trace.error = 1
-        trace.meta[tag] = String(tags[tag])
+        try {
+          trace.meta[tag] = String(tags[tag])
+        } catch (e) {
+          console.error("error:", e.message, "tag:", tag, "value:", tags[tag], "prototype:", tags[tag] ? tags[tag].__proto__ : undefined)
+        }
         break
       default:
-        trace.meta[tag] = String(tags[tag])
+        try {
+          trace.meta[tag] = String(tags[tag])
+        } catch (e) {
+          console.error("error:", e.message, "tag:", tag, "value:", tags[tag], "prototype:", tags[tag] ? tags[tag].__proto__ : undefined)
+        }
     }
   })
 }

patch-package
--- a/node_modules/dd-trace/src/format.js
+++ b/node_modules/dd-trace/src/format.js
@@ -46,7 +46,7 @@ function extractTags (trace, span) {
       case 'service.name':
       case 'span.type':
       case 'resource.name':
-        trace[map[tag]] = String(tags[tag])
+        trace[map[tag]] = serialize(tags[tag])
         break
       case 'error':
         if (tags[tag]) {
@@ -57,14 +57,18 @@ function extractTags (trace, span) {
       case 'error.msg':
       case 'error.stack':
         trace.error = 1
-        trace.meta[tag] = String(tags[tag])
+        trace.meta[tag] = serialize(tags[tag])
         break
       default:
-        trace.meta[tag] = String(tags[tag])
+        trace.meta[tag] = serialize(tags[tag])
     }
   })
 }
 
+function serialize(obj) {
+  return obj && !obj.toString ? JSON.stringify(obj) : String(obj)
+}
+
 function extractError (trace, span) {
   const error = span._error
 

Test a patch that should work around the type error.
[dd-trace] Test a patch that should work around the type error.
