Closed raj-k-singh closed 8 months ago
The recent update introduces a new function HexToInt
that converts hexadecimal strings to integer values in the Signoz log processing environment. This enhancement includes both the conversion function and comprehensive tests to ensure accurate conversion and error handling.
Files | Change Summary |
---|---|
.../processor/signoztransformprocessor/ottlfunctions/func_hex_to_int.go |
Added HexToInt function for hexadecimal to integer conversion. |
.../processor/signoztransformprocessor/ottlfunctions/func_hex_to_int_test.go |
Introduced TestHexToInt to validate HexToInt with various scenarios. |
🐇✨
In the realm of code, under digital skies,
A rabbit hopped in, with bright, curious eyes.
"From hex to int, let's make the leap,
Through lines of code, our magic seeps.
With tests to guide, no error hides,
In our digital burrow, where magic resides."
🌟🐾
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
logtransform expects trace flags to be provided as hex values. ottllog context expect them to provided as int64 values. The official Int ottl function works only for base 10 values. This PR adds a custom function to help us with hex to int64 conversion
Summary by CodeRabbit
HexToInt
conversion function.