dapr / dapr/java-sdk

Add Baggage Support

Aperta
#1,302 1 commento 0 reazioni 1 assegnatario Rivendicata da @siri-varma Vedi su GitHub
kind/enhancement
Lingua principale
Java
Stelle
300
Fork
230
Merge medio
5g 1h
PR unite (30g)
5

Descrizione

The Dapr runtime has recently [added support for baggage propagation](https://github.com/dapr/dapr/pull/8649). [Here is the docs PR for reference as well](https://github.com/dapr/docs/pull/4609). Baggage is a mechanism to propagate key-value pairs across service boundaries, which is useful for passing contextual information through distributed traces.

We should add a new function that users can use to add baggage propagation support, working for **both** gRPC and HTTP. This would enable users to provide baggage without having to import OpenTelemetry themselves.

consumer code _example_:
```
Map baggage = new HashMap<>();
baggage.put("user-id", "12345");
baggage.put("tenant", "acme");

// Get context with baggage
DaprContext ctx = client.withBaggage(baggage);

client.InvokeMethod(ctx, ...)
```

We should have tests for both gRPC + HTTP for this functionality.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.