-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
No viable timestamp field in ElasticSearch #480
Comments
In case anyone is looking into this, I went and developed a patch myself. I'll try and create a pull request in the coming days, though as I said, I am not a Go developer, or even an actual developer, so I make no promises about its quality :-) |
+1 especially if it can be made backwards compatible, i.e. not force any schema upgrades on people |
Opened pull request #491 The change should be backwards compatible. The only issue that I can see now is that the ElasticSearch mapping must be updated in advance to include startTimeMillis as a date type. If not, the traces of that day will be mapped to a number, and won't be a valid timerange field. I expect that when the collector creates a new index for the next day, it will use the new mapping, and use startTimeMillis is a timestamp field. |
What would that mean to the end user? |
Had a chance to test this scenario last night:
The new index is created with the correct mapping, but apparently Kibana doesn't like it when indices matching a pattern (like So, if users want to use the new functionality, there are two possible scenarios: First scenario:
Second scenario:
This is only a problem for Kibana. Grafana and Jaeger have no issue with the differing mappings. |
Is it worth adding a script that updates the mappings for existing indices? It seems like it would make the migration least painful, (1) run the script, (2) upgrade collectors. |
if users only persist traces for 2 days like we do, I don't see much need for a script to update all the previous spans. Let's open a task for it but I don't think it's super urgent. |
Hello,
We are using ElasticSearch to store our Jaeger traces, and we would like to perform additional queries on this data outside of Jaeger. However, the logs that Jaeger sends to ElasticSearch do not have a viable timestamp field, which makes querying this data externally very difficult, if not impossible.
I understand that Jaeger intentionally saves the StartTime field as a Long type in ES, because ES does not support dates with microsecond accuracy. If Jaeger saved the StartTime field as Date, ES would cut off the timestamp to milisecond accuracy, losing valuable precision.
Zipkin works around this issue by adding an additional field, timestamp_milis, which ES can use as a date field for sorting. I looked into implementing this in Jaeger myself, but I have little to no experience with Go.
Please consider adding a similar solution in Jaeger, as it would greatly increase the value of using ElasticSearch as a storage backend.
The text was updated successfully, but these errors were encountered: