Skip to content

Commit 5ce127b

Browse files
author
Ignacio Bonafonte
committed
Fix error.stack format, now that backend supports adding tag values with number it breaks our trick to show the stack trace.
1 parent 209d431 commit 5ce127b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/DatadogSDKTesting/DDTracer.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ internal class DDTracer {
171171
attributes.updateValue(value: AttributeValue.string(errorMessage), forKey: DDTags.errorMessage)
172172
attributes.updateValue(value: AttributeValue.string(errorStack), forKey: DDTags.errorStack)
173173
} else {
174-
attributes.updateValue(value: AttributeValue.string(errorMessage + ". Check error.stack"), forKey: DDTags.errorMessage)
174+
attributes.updateValue(value: AttributeValue.string(errorMessage + ". Check error.stack for the full crash log."), forKey: DDTags.errorMessage)
175175
let splitted = errorStack.split(by: 5000)
176176
for i in 0 ..< splitted.count {
177-
attributes.updateValue(value: AttributeValue.string(splitted[i]), forKey: "\(DDTags.errorStack).\(String(format: "%02d", i))")
177+
attributes.updateValue(value: AttributeValue.string(splitted[i]), forKey: "\(DDTags.errorStack).\(String(format: "%d", i))")
178178
}
179179
}
180180

0 commit comments

Comments
 (0)