Finding the parent id/ session id of an activity (logs)

Is there a way to find parent id/session id that measures from the start to the end of an activity in Elasticsearch. I was reading up on spans and how they can help with this. However, besides using APM, does elasticsearch offer an API or when reading the logs that were sent to elasticsearch, is there a specific id that will help co-relate the activity? As in a co-relate id of some sort. I am using NET application.