Skip to content

Commit 1278d68

Browse files
committed
addressed PR feedback
1 parent e47f003 commit 1278d68

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## v1.5.2
2-
* Add tracing support to send information to the WebJobs extension ([#211](https://github.com/microsoft/durabletask-java/pull/211))
2+
* Add tracing support for Azure Functions client scenarios ([#211](https://github.com/microsoft/durabletask-java/pull/211))
33

44
## v1.5.1
55
* Improve logging for unexpected connection failures in DurableTaskGrpcWorker ([#216](https://github.com/microsoft/durabletask-java/pull/216/files))

client/src/main/java/com/microsoft/durabletask/DurableTaskGrpcClient.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import java.util.concurrent.TimeUnit;
1818
import java.util.concurrent.TimeoutException;
1919
import java.util.logging.Logger;
20+
import java.util.stream.Collectors;
2021

2122
import io.opentelemetry.api.trace.Span;
2223
import io.opentelemetry.api.trace.SpanContext;
@@ -129,7 +130,11 @@ public String scheduleNewOrchestrationInstance(
129130
);
130131

131132
// Get the tracestate
132-
traceState = spanContext.getTraceState().toString();
133+
traceState = spanContext.getTraceState().asMap()
134+
.entrySet()
135+
.stream()
136+
.map(entry -> entry.getKey() + "=" + entry.getValue())
137+
.collect(Collectors.joining(","));
133138
}
134139

135140
if (traceParent != null) {

0 commit comments

Comments
 (0)