mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-06-04 11:25:52 +08:00

* chore: add test for ensuring pipeline previews work for trace parser processors * chore: updates to trace parser validation in postable pipelines * chore: extract auth.randomHex into utils.RandomHex for reuse * chore: get trace parser preview test passing * chore: start with JSON serialized trace parser in test to cover deserialization * chore: address PR feedback
15 lines
232 B
Go
15 lines
232 B
Go
package utils
|
|
|
|
import (
|
|
"crypto/rand"
|
|
"encoding/hex"
|
|
)
|
|
|
|
func RandomHex(sz int) (string, error) {
|
|
bytes := make([]byte, sz)
|
|
if _, err := rand.Read(bytes); err != nil {
|
|
return "", err
|
|
}
|
|
return hex.EncodeToString(bytes), nil
|
|
}
|