I am using the elastic apm client for nodejs to set custom labels when my IoT devices communicate with my IoT API. Here is the function documentation.
This API works great, but always sets the label value type to "string" (as mentioned in the docs).
I happen to be storing the geohash of my IoT devices GPS coordinates into a label called location, so I can see in visualizations labels.location of type string, with proper values.
But I cannot find an easy way of changing the apm-* index pattern field type for labels.location to anything other than string/number/etc. Basically geo_point is just not listed in the combo box list of supported index pattern field type.
Note that other fields in the apm-* index (such as client.geo.location) are listed in the index management page with the proper geo_point field type. I just cannot select that type when trying to change my own labels type from string (to geo_point).
Should I use a scripted field to convert my geohash string into the official "geo_point" type?
Or should I rather use a reindexing request to force my labels.location field into this non-listed geo_point format?
Or is there another apm client function that I can use to provide the device own self-known GPS localization info in geo_point format to the ES stack? Like,
apm.setGeoLocation() or anything else than labels?
What is the official or recommended way of doing this?