3

Say I have 3 microservices, and I want to trace requests using OpenTelemetry/Jaeger UI. How do I add baggages that propagate through the spans? Say I have one API called WeatherForecast which performs a get request to another service called Matrix, and I create a baggage like this:

    var res = HttpClient.GetStringAsync("http://localhost:5002/Matrix").Result;
    Baggage.Current.SetBaggage("weatherforecastid", "abced123");`

How do I get the current baggage to propagate through the Matrix Service (which calls another service)? I tried using Baggage.Current.SetBaggage thinking it would be referencing the baggage from the WeatherForecast, however it appears it only created a new baggage and did not propagate the previous.

kharlezaizen
  • 107
  • 4

0 Answers0