Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow integers as tag values #9

Open
marvin-j97 opened this issue Nov 22, 2024 · 5 comments
Open

allow integers as tag values #9

marvin-j97 opened this issue Nov 22, 2024 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Milestone

Comments

@marvin-j97
Copy link
Owner

e.g. Give me the COUNT of requests for service:rest-api AND http.res.code:[400 TO 499]

@marvin-j97 marvin-j97 added enhancement New feature or request help wanted Extra attention is needed labels Nov 22, 2024
@marvin-j97 marvin-j97 changed the title integers as tag values allow integers as tag values Nov 22, 2024
@piaoger
Copy link

piaoger commented Nov 27, 2024

Both fjall and talna are both awesome. Also add support more dataypes for Value, such as integer,boolean or even string ? :)

@marvin-j97
Copy link
Owner Author

Both fjall and talna are both awesome. Also add support more dataypes for Value, such as integer,boolean or even string ? :)

Tag values are strictly strings right now:

pub type TagSet<'a> = [(&'a str, &'a str)];

Adding boolean shouldn't be too hard when integers are added, because it's just one more enum variant

@marvin-j97 marvin-j97 added the good first issue Good for newcomers label Nov 27, 2024
@piaoger
Copy link

piaoger commented Nov 27, 2024

Tag values are strictly strings right now:

Oh, sorry for my mislead. I am talking about field Value which is only f64 or f32 for now. It can also be in newtype for number or enum style :)

No native support for other number types or boolean is fine, maybe just need some handy Into/From helpers.

@marvin-j97
Copy link
Owner Author

Considering it's a timeseries database, anything but numbers doesn't really make sense - integers could work, but I think floats are enough for typical metrics workloads.

@piaoger
Copy link

piaoger commented Nov 27, 2024

No problem, integer support may make aggregation or other things more complicated. The data conversion can be done in client side. Anyway, thanks for your quick response 💯

@marvin-j97 marvin-j97 added this to the 1.0 milestone Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants