We have microservices communicating through a message broker like azure event hub using custom model class written in Java. How do I propagate context between them to implement distributed tracing? I found this link opentelemetry-context-propagation. It didn’t help much. I’m looking for a detailed code with the propagator, carrier and getter and setter for injecting and extracting context in java.
public class MyModel {
public int id;
public String name;
public MyContext mycontext;
}
public class MyContext {
public String source;
public Instant time;
}
Note: The actual model and context are different. MyModel and MyContext are given just for the sake of asking question here.