-
Notifications
You must be signed in to change notification settings - Fork 524
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 numbers and boolean values for tags. #1712
Conversation
Store numbers as scaled_floats, scaling_factor 1000000 fixes elastic#828.
What is the maximum number that can be stored with this scaled float format? Are strings, numbers and booleans stored in the same place in ES? What if one span has the tag |
Yes, strings, numbers and booleans are stored at the same place in ES. If the same attribute has different datatypes this will throw an exception. |
According to ES doc a
where a long is a signed 64-bit integer with a minimum value of -263 and a maximum value of 263-1. Having a |
jenkins, retest this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should follow up with some documentation about sticking to a single data type for a given tag.
@felixbarny I'd like to merge this soonish - do you have any concerns regarding the handling? |
Do users have to possibility to set another mapping type in case they want to set large numbers? For most use cases, including recording bytes up to 9PB and Unix timestamps in up to millisecond precision the current range is sufficient. |
If the user can't configure the mapping type I think it would make sense to validate the range in the APM Server so that the error appears in the agent logs as well rather than only in the APM Server and Elasticsearch logs. But if possible I think users should be able to configure the mapping type, although the default you choose sounds good to me. |
There is a way to add fields to the ES template, see discussions around this #1371, which makes use of the experimental feature append_fields (experimental). However, one can make use of the So to summarize, there is some hackish way to do add custom mapping types. |
jenkins, retest this please. |
That is not possible with the setup we have at the moment, as the server would need to either handle the whole request syncronously so errors can be returned back to the agents, or the server would need to fetch all indexed The same handling applies if e.g. a mapping explosion or any other issue with storing the data to ES happens. |
* Allow numbers and boolean values for tags. Store numbers as scaled_floats, scaling_factor 1000000 * Update tags in metricset to behave the same way as transaction.tags fixes elastic#828.
Store numbers as scaled_floats, scaling_factor 1000000
fixes #828.
depends on elastic/beats#9772