kennknowles commented on code in PR #39149:
URL: https://github.com/apache/beam/pull/39149#discussion_r3553542288


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/changestreams/dao/DaoFactory.java:
##########
@@ -100,6 +102,10 @@ public List<String> getTvfNameList() {
     return this.tvfNameList;
   }
 
+  public void setOpenTelemetry(OpenTelemetry openTelemetry) {

Review Comment:
   It looks like this should be `@Nullable` since the pipeline option is passed 
in unconditionally



##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/BatchSpannerRead.java:
##########
@@ -126,8 +129,9 @@ public GeneratePartitionsFn(
     }
 
     @Setup
-    public void setup() throws Exception {
-      spannerAccessor = SpannerAccessor.getOrCreate(config);
+    public void setup(PipelineOptions options) throws Exception {
+      OpenTelemetry otel = 
options.as(SdkHarnessOptions.class).getOpenTelemetry();
+      spannerAccessor = SpannerAccessor.getOrCreate(config, otel);

Review Comment:
   Will this work if otel is null? (or can it never be null?)



-- 
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]

Reply via email to