1414import io .clientcore .core .annotations .ServiceClient ;
1515import io .clientcore .core .http .models .RequestOptions ;
1616import io .clientcore .core .http .models .Response ;
17+ import io .clientcore .core .instrumentation .Instrumentation ;
1718import io .clientcore .core .models .binarydata .BinaryData ;
1819import java .time .OffsetDateTime ;
1920import java .util .Map ;
@@ -26,14 +27,18 @@ public final class AppendBlobClient {
2627 @ Metadata (generated = true )
2728 private final AppendBlobsImpl serviceClient ;
2829
30+ private final Instrumentation instrumentation ;
31+
2932 /**
3033 * Initializes an instance of AppendBlobClient class.
3134 *
3235 * @param serviceClient the service client implementation.
36+ * @param instrumentation the instrumentation instance.
3337 */
3438 @ Metadata (generated = true )
35- AppendBlobClient (AppendBlobsImpl serviceClient ) {
39+ AppendBlobClient (AppendBlobsImpl serviceClient , Instrumentation instrumentation ) {
3640 this .serviceClient = serviceClient ;
41+ this .instrumentation = instrumentation ;
3742 }
3843
3944 /**
@@ -81,10 +86,11 @@ public Response<Void> createWithResponse(String containerName, String blob, long
8186 OffsetDateTime immutabilityPolicyExpiry , BlobImmutabilityPolicyMode immutabilityPolicyMode , Boolean legalHold ,
8287 BlobHttpHeaders blobHttpHeaders , CpkInfo cpkInfo , EncryptionScope encryptionScopeParam ,
8388 RequestOptions requestOptions ) {
84- return this .serviceClient .createWithResponse (containerName , blob , contentLength , timeout , metadata , leaseId ,
85- ifModifiedSince , ifUnmodifiedSince , ifMatch , ifNoneMatch , ifTags , requestId , blobTagsString ,
86- immutabilityPolicyExpiry , immutabilityPolicyMode , legalHold , blobHttpHeaders , cpkInfo , encryptionScopeParam ,
87- requestOptions );
89+ return this .instrumentation .instrument ("AppendBlob_Create" , requestOptions ,
90+ updatedOptions -> this .serviceClient .createWithResponse (containerName , blob , contentLength , timeout ,
91+ metadata , leaseId , ifModifiedSince , ifUnmodifiedSince , ifMatch , ifNoneMatch , ifTags , requestId ,
92+ blobTagsString , immutabilityPolicyExpiry , immutabilityPolicyMode , legalHold , blobHttpHeaders , cpkInfo ,
93+ encryptionScopeParam , updatedOptions ));
8894 }
8995
9096 /**
@@ -129,9 +135,11 @@ public void create(String containerName, String blob, long contentLength, Intege
129135 String ifMatch , String ifNoneMatch , String ifTags , String requestId , String blobTagsString ,
130136 OffsetDateTime immutabilityPolicyExpiry , BlobImmutabilityPolicyMode immutabilityPolicyMode , Boolean legalHold ,
131137 BlobHttpHeaders blobHttpHeaders , CpkInfo cpkInfo , EncryptionScope encryptionScopeParam ) {
132- this .serviceClient .create (containerName , blob , contentLength , timeout , metadata , leaseId , ifModifiedSince ,
133- ifUnmodifiedSince , ifMatch , ifNoneMatch , ifTags , requestId , blobTagsString , immutabilityPolicyExpiry ,
134- immutabilityPolicyMode , legalHold , blobHttpHeaders , cpkInfo , encryptionScopeParam );
138+ this .instrumentation .instrument ("AppendBlob_Create" , null ,
139+ updatedOptions -> this .serviceClient .create (containerName , blob , contentLength , timeout , metadata , leaseId ,
140+ ifModifiedSince , ifUnmodifiedSince , ifMatch , ifNoneMatch , ifTags , requestId , blobTagsString ,
141+ immutabilityPolicyExpiry , immutabilityPolicyMode , legalHold , blobHttpHeaders , cpkInfo ,
142+ encryptionScopeParam ));
135143 }
136144
137145 /**
@@ -185,10 +193,11 @@ public Response<Void> appendBlockWithResponse(String containerName, String blob,
185193 OffsetDateTime ifUnmodifiedSince , String ifMatch , String ifNoneMatch , String ifTags , String requestId ,
186194 String structuredBodyType , Long structuredContentLength , CpkInfo cpkInfo , EncryptionScope encryptionScopeParam ,
187195 RequestOptions requestOptions ) {
188- return this .serviceClient .appendBlockWithResponse (containerName , blob , contentLength , body , timeout ,
189- transactionalContentMD5 , transactionalContentCrc64 , leaseId , maxSize , appendPosition , ifModifiedSince ,
190- ifUnmodifiedSince , ifMatch , ifNoneMatch , ifTags , requestId , structuredBodyType , structuredContentLength ,
191- cpkInfo , encryptionScopeParam , requestOptions );
196+ return this .instrumentation .instrument ("AppendBlob_AppendBlock" , requestOptions ,
197+ updatedOptions -> this .serviceClient .appendBlockWithResponse (containerName , blob , contentLength , body ,
198+ timeout , transactionalContentMD5 , transactionalContentCrc64 , leaseId , maxSize , appendPosition ,
199+ ifModifiedSince , ifUnmodifiedSince , ifMatch , ifNoneMatch , ifTags , requestId , structuredBodyType ,
200+ structuredContentLength , cpkInfo , encryptionScopeParam , updatedOptions ));
192201 }
193202
194203 /**
@@ -239,9 +248,11 @@ public void appendBlock(String containerName, String blob, long contentLength, B
239248 Long appendPosition , OffsetDateTime ifModifiedSince , OffsetDateTime ifUnmodifiedSince , String ifMatch ,
240249 String ifNoneMatch , String ifTags , String requestId , String structuredBodyType , Long structuredContentLength ,
241250 CpkInfo cpkInfo , EncryptionScope encryptionScopeParam ) {
242- this .serviceClient .appendBlock (containerName , blob , contentLength , body , timeout , transactionalContentMD5 ,
243- transactionalContentCrc64 , leaseId , maxSize , appendPosition , ifModifiedSince , ifUnmodifiedSince , ifMatch ,
244- ifNoneMatch , ifTags , requestId , structuredBodyType , structuredContentLength , cpkInfo , encryptionScopeParam );
251+ this .instrumentation .instrument ("AppendBlob_AppendBlock" , null ,
252+ updatedOptions -> this .serviceClient .appendBlock (containerName , blob , contentLength , body , timeout ,
253+ transactionalContentMD5 , transactionalContentCrc64 , leaseId , maxSize , appendPosition , ifModifiedSince ,
254+ ifUnmodifiedSince , ifMatch , ifNoneMatch , ifTags , requestId , structuredBodyType , structuredContentLength ,
255+ cpkInfo , encryptionScopeParam ));
245256 }
246257
247258 /**
@@ -303,11 +314,12 @@ public Response<Void> appendBlockFromUrlWithResponse(String containerName, Strin
303314 String ifTags , OffsetDateTime sourceIfModifiedSince , OffsetDateTime sourceIfUnmodifiedSince ,
304315 String sourceIfMatch , String sourceIfNoneMatch , String requestId , String copySourceAuthorization ,
305316 CpkInfo cpkInfo , EncryptionScope encryptionScopeParam , RequestOptions requestOptions ) {
306- return this .serviceClient .appendBlockFromUrlWithResponse (containerName , blob , sourceUrl , contentLength ,
307- sourceRange , sourceContentMD5 , sourceContentcrc64 , timeout , transactionalContentMD5 , leaseId , maxSize ,
308- appendPosition , ifModifiedSince , ifUnmodifiedSince , ifMatch , ifNoneMatch , ifTags , sourceIfModifiedSince ,
309- sourceIfUnmodifiedSince , sourceIfMatch , sourceIfNoneMatch , requestId , copySourceAuthorization , cpkInfo ,
310- encryptionScopeParam , requestOptions );
317+ return this .instrumentation .instrument ("AppendBlob_AppendBlockFromUrl" , requestOptions ,
318+ updatedOptions -> this .serviceClient .appendBlockFromUrlWithResponse (containerName , blob , sourceUrl ,
319+ contentLength , sourceRange , sourceContentMD5 , sourceContentcrc64 , timeout , transactionalContentMD5 ,
320+ leaseId , maxSize , appendPosition , ifModifiedSince , ifUnmodifiedSince , ifMatch , ifNoneMatch , ifTags ,
321+ sourceIfModifiedSince , sourceIfUnmodifiedSince , sourceIfMatch , sourceIfNoneMatch , requestId ,
322+ copySourceAuthorization , cpkInfo , encryptionScopeParam , updatedOptions ));
311323 }
312324
313325 /**
@@ -367,11 +379,12 @@ public void appendBlockFromUrl(String containerName, String blob, String sourceU
367379 String ifTags , OffsetDateTime sourceIfModifiedSince , OffsetDateTime sourceIfUnmodifiedSince ,
368380 String sourceIfMatch , String sourceIfNoneMatch , String requestId , String copySourceAuthorization ,
369381 CpkInfo cpkInfo , EncryptionScope encryptionScopeParam ) {
370- this .serviceClient .appendBlockFromUrl (containerName , blob , sourceUrl , contentLength , sourceRange ,
371- sourceContentMD5 , sourceContentcrc64 , timeout , transactionalContentMD5 , leaseId , maxSize , appendPosition ,
372- ifModifiedSince , ifUnmodifiedSince , ifMatch , ifNoneMatch , ifTags , sourceIfModifiedSince ,
373- sourceIfUnmodifiedSince , sourceIfMatch , sourceIfNoneMatch , requestId , copySourceAuthorization , cpkInfo ,
374- encryptionScopeParam );
382+ this .instrumentation .instrument ("AppendBlob_AppendBlockFromUrl" , null ,
383+ updatedOptions -> this .serviceClient .appendBlockFromUrl (containerName , blob , sourceUrl , contentLength ,
384+ sourceRange , sourceContentMD5 , sourceContentcrc64 , timeout , transactionalContentMD5 , leaseId , maxSize ,
385+ appendPosition , ifModifiedSince , ifUnmodifiedSince , ifMatch , ifNoneMatch , ifTags , sourceIfModifiedSince ,
386+ sourceIfUnmodifiedSince , sourceIfMatch , sourceIfNoneMatch , requestId , copySourceAuthorization , cpkInfo ,
387+ encryptionScopeParam ));
375388 }
376389
377390 /**
@@ -406,8 +419,9 @@ public void appendBlockFromUrl(String containerName, String blob, String sourceU
406419 public Response <Void > sealWithResponse (String containerName , String blob , Integer timeout , String requestId ,
407420 String leaseId , OffsetDateTime ifModifiedSince , OffsetDateTime ifUnmodifiedSince , String ifMatch ,
408421 String ifNoneMatch , Long appendPosition , RequestOptions requestOptions ) {
409- return this .serviceClient .sealWithResponse (containerName , blob , timeout , requestId , leaseId , ifModifiedSince ,
410- ifUnmodifiedSince , ifMatch , ifNoneMatch , appendPosition , requestOptions );
422+ return this .instrumentation .instrument ("AppendBlob_Seal" , requestOptions ,
423+ updatedOptions -> this .serviceClient .sealWithResponse (containerName , blob , timeout , requestId , leaseId ,
424+ ifModifiedSince , ifUnmodifiedSince , ifMatch , ifNoneMatch , appendPosition , updatedOptions ));
411425 }
412426
413427 /**
@@ -440,7 +454,8 @@ public Response<Void> sealWithResponse(String containerName, String blob, Intege
440454 public void seal (String containerName , String blob , Integer timeout , String requestId , String leaseId ,
441455 OffsetDateTime ifModifiedSince , OffsetDateTime ifUnmodifiedSince , String ifMatch , String ifNoneMatch ,
442456 Long appendPosition ) {
443- this .serviceClient .seal (containerName , blob , timeout , requestId , leaseId , ifModifiedSince , ifUnmodifiedSince ,
444- ifMatch , ifNoneMatch , appendPosition );
457+ this .instrumentation .instrument ("AppendBlob_Seal" , null ,
458+ updatedOptions -> this .serviceClient .seal (containerName , blob , timeout , requestId , leaseId , ifModifiedSince ,
459+ ifUnmodifiedSince , ifMatch , ifNoneMatch , appendPosition ));
445460 }
446461}
0 commit comments