in general, you need couple of things:
1. otel collector to store the traces/metrics in the other datasource(there are a lot already, but check your source is already implemented, if not, need to implement it)
2. add new reader in query - service, it should implement all methods that are in reader interface, with the appropriate response
in general, i use clickhouse, but i altered the code in order to improve performance(at least in my case, but i think it will fit all cases)
can be altered even further, but i still did not have a time to check it on high scale, with server with 2vcpu and 8gb of ram, i can handle 100 million traces with ease(avg response under 500ms, clickhouse is on cloud, while my query service is locally, so there is some latency there)