I am new to Jaeger and I would like to use it in order to record traces for my microservices.
I create traces from my μservices, providing the traceId publish them as messages and consume them in another service in order to export the trace to Jaeger.
Though I have not found a way to provide also the span id and control them from the producer side.
Should I save some sort of state e.g.(the parent span of each trace) in my consumer, so that I can have correct hierarchy? How would you go about that?
My current setup has the order set by the ones that complete first and not by those that start first which is the desired. The API should be the first one. Do you know how I can solve this?
Any ideas or feedback are highly appreciated.

To create a new span for a given trace ID, you need to use the Jaeger client library for your language and follow the OpenTracing API specification. According to answer on StackOverflow, you can get the span ID from the span at your service1 and propagate it to your other services. For example, in Spring Boot:
You can also use the OpenTelemetry API to create spans and export them to Jaeger using a specific transformation. You need to convert the bytes of the IDs to unsigned ints using Big Endian byte order..
If you are new - I can suggest you to start with some tutorials on the web