@@ -255,11 +255,7 @@ public Blob create(
255
255
OpenTelemetryTraceUtil .Span otelSpan =
256
256
openTelemetryTraceUtil .startSpan ("create" , MODULE_STORAGE );
257
257
try (OpenTelemetryTraceUtil .Scope ignored = otelSpan .makeCurrent ()) {
258
- return internalDirectUpload (
259
- blobInfo ,
260
- opts ,
261
- ByteBuffer .wrap (content , offset , length ),
262
- openTelemetryTraceUtil .currentContext ())
258
+ return internalDirectUpload (blobInfo , opts , ByteBuffer .wrap (content , offset , length ))
263
259
.asBlob (this );
264
260
} catch (Exception e ) {
265
261
otelSpan .recordException (e );
@@ -322,7 +318,7 @@ public Blob createFrom(BlobInfo blobInfo, Path path, int bufferSize, BlobWriteOp
322
318
openTelemetryTraceUtil .startSpan ("createFrom" , MODULE_STORAGE );
323
319
try (OpenTelemetryTraceUtil .Scope ignored = otelSpan .makeCurrent ()) {
324
320
Opts <ObjectTargetOpt > opts = Opts .unwrap (options ).resolveFrom (blobInfo ).prepend (defaultOpts );
325
- return internalCreateFrom (path , blobInfo , opts , openTelemetryTraceUtil . currentContext () );
321
+ return internalCreateFrom (path , blobInfo , opts );
326
322
} catch (Exception e ) {
327
323
otelSpan .recordException (e );
328
324
otelSpan .setStatus (io .opentelemetry .api .trace .StatusCode .ERROR , e .getClass ().getSimpleName ());
@@ -333,11 +329,10 @@ public Blob createFrom(BlobInfo blobInfo, Path path, int bufferSize, BlobWriteOp
333
329
}
334
330
335
331
@ Override
336
- public Blob internalCreateFrom (
337
- Path path , BlobInfo info , Opts <ObjectTargetOpt > opts , OpenTelemetryTraceUtil .Context ctx )
332
+ public Blob internalCreateFrom (Path path , BlobInfo info , Opts <ObjectTargetOpt > opts )
338
333
throws IOException {
339
334
OpenTelemetryTraceUtil .Span otelSpan =
340
- openTelemetryTraceUtil .startSpan ("internalCreateFrom" , MODULE_STORAGE , ctx );
335
+ openTelemetryTraceUtil .startSpan ("internalCreateFrom" , MODULE_STORAGE );
341
336
requireNonNull (path , "path must be non null" );
342
337
if (Files .isDirectory (path )) {
343
338
throw new StorageException (0 , path + " is a directory" );
@@ -897,19 +892,10 @@ public GrpcBlobWriteChannel writer(BlobInfo blobInfo, BlobWriteOption... options
897
892
@ Override
898
893
public BlobInfo internalDirectUpload (
899
894
BlobInfo blobInfo , Opts <ObjectTargetOpt > opts , ByteBuffer buf ) {
900
- return internalDirectUpload (blobInfo , opts , buf , null );
901
- }
902
-
903
- @ Override
904
- public BlobInfo internalDirectUpload (
905
- BlobInfo blobInfo ,
906
- Opts <ObjectTargetOpt > opts ,
907
- ByteBuffer buf ,
908
- OpenTelemetryTraceUtil .Context ctx ) {
909
895
requireNonNull (blobInfo , "blobInfo must be non null" );
910
896
requireNonNull (buf , "content must be non null" );
911
897
OpenTelemetryTraceUtil .Span otelSpan =
912
- openTelemetryTraceUtil .startSpan ("internalDirectUpload" , MODULE_STORAGE , ctx );
898
+ openTelemetryTraceUtil .startSpan ("internalDirectUpload" , MODULE_STORAGE );
913
899
Opts <ObjectTargetOpt > optsWithDefaults = opts .prepend (defaultOpts );
914
900
GrpcCallContext grpcCallContext =
915
901
optsWithDefaults .grpcMetadataMapper ().apply (GrpcCallContext .createDefault ());
0 commit comments