Logo
Explore Help
Register Sign In
External/signoz
1
0
Fork 0
You've already forked signoz
mirror of https://github.com/SigNoz/signoz.git synced 2025-12-18 07:56:56 +00:00
Code Issues Packages Projects Releases Wiki Activity
signoz/pkg/query-service/utils/random.go

15 lines
232 B
Go
Raw Normal View History

Fix: Query Service: get trace parser working in log parsing pipelines (#3820) * 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
2023-10-29 16:58:31 +05:30
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
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.6 Page: 660ms Template: 5ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API