generateRandomBlob returns a string of exactly size bytes of random data (same character set as other attributes).
(size int)
| 215 | |
| 216 | // generateRandomBlob returns a string of exactly size bytes of random data (same character set as other attributes). |
| 217 | func (t *TraceInfo) generateRandomBlob(size int) string { |
| 218 | letters := []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") |
| 219 | s := make([]rune, size) |
| 220 | for i := 0; i < size; i++ { |
| 221 | s[i] = letters[t.r.Intn(len(letters))] |
| 222 | } |
| 223 | return string(s) |
| 224 | } |
| 225 | |
| 226 | // generateFixedAttributesWithPrefix returns the fixed attributes with a prefix. Keys are lowercase with a hyphen before the numeric suffix (e.g. string-01, int-01, blob-01). |
| 227 | func (t *TraceInfo) generateFixedAttributesWithPrefix(prefix string) []*jaeger.Tag { |
no outgoing calls
no test coverage detected