SafeUTF8 sanitizes a string for OTLP export by replacing invalid UTF-8 sequences.
(s string)
| 152 | |
| 153 | // SafeUTF8 sanitizes a string for OTLP export by replacing invalid UTF-8 sequences. |
| 154 | func SafeUTF8(s string) string { |
| 155 | return strings.ToValidUTF8(s, "?") |
| 156 | } |
| 157 | |
| 158 | // ShouldCrash returns true if the error should cause the process to crash. |
| 159 | func ShouldCrash(err error) bool { |
no outgoing calls
no test coverage detected