For our current setup, I am only able to retrieve events from ES with the granularity of workflow e.g. the ExecutionDuration, ExecutionStatus etc…
Does temporal also emit activity historical events to ES? Is GetWorkflowHistory the only way to retrieve workflow history?
Workflow history is not stored in Elasticsearch. ES does include workflow history count in order to support queries like
HistoryCount > 100 for example.
Yes, you would have to use
GetWorkflowExecutionHistory to get it from primary storage.
To persist workflow histories beyond the set retention period see the workflow archival feature.
There is not too much information in the Archival page, is there an example for configuring Archival feature?
Docs links moved a little, here is a page that has more info.