gemini-code-assist[bot] commented on code in PR #36962:
URL: https://github.com/apache/beam/pull/36962#discussion_r2581738902
##########
sdks/java/core/src/main/java/org/apache/beam/sdk/values/WindowedValues.java:
##########
@@ -990,6 +1090,52 @@ public List<? extends Coder<?>> getComponents() {
}
}
+ public static class OpenTelemetryContextSerializer {
+
+ private static final
TextMapSetter<BeamFnApi.Elements.ElementMetadata.Builder> SETTER =
+ (carrier, key, value) -> {
+ if (carrier == null) {
+ return;
+ }
+ if ("traceparent".equals(key)) {
+ carrier.setTraceparent(value);
+ } else if ("tracestate".equals(key)) {
+ carrier.setTracestate(value);
+ }
+ };
+
+ private static final TextMapGetter<BeamFnApi.Elements.ElementMetadata>
GETTER =
+ new TextMapGetter<BeamFnApi.Elements.ElementMetadata>() {
+ @Override
+ public Iterable<String> keys(BeamFnApi.Elements.ElementMetadata
carrier) {
+ // W3C Propagator knows what keys it wants, but this satisfies the
interface
+ return Collections.emptyList();
Review Comment:
Thank you for the feedback!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]