serilog-sinks-azureblobstorage icon indicating copy to clipboard operation
serilog-sinks-azureblobstorage copied to clipboard

Stack Overflow when using sink within Function App

Open ghost opened this issue 3 years ago • 5 comments

I have migrated our project to latest package dependencies for various things and removed some deprecated Microsoft packages etc. and then found our app no longer deployed within the Function App in Azure. Upon investigation a stack overflow message was encountered and I have traced it back to this package.

Update: I am using Azurite and if I set the restrictedToMinimumLevel to Error then the stack overflow doesn't occur because the log events being raised are Request events an example of which shown at the foot of this post.

I have traced the issue to this function: -

Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.GetCloudBlobAsync: Line 46

Line 46 makes this call: -

Response<BlobProperties> propertiesResponse = await currentAppendBlobClient.GetPropertiesAsync().ConfigureAwait(false);

This emits an event handled by: -

Serilog.Sinks.AzureBlobStorage.Emit

and the first thing that this does is call: -

Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.GetCloudBlobAsync: Line 46

DemoDotNetCore31.zip

[08:48:57 INF] Request [37a4ec4f-9503-4a0a-b12d-ad31e9321b4c] HEAD http://127.0.0.1:10000/devstoreaccount1/azure-webjobs-hosts/locks/andydesktop-1020578781/host
x-ms-version:2020-08-04
Accept:application/xml
x-ms-client-request-id:37a4ec4f-9503-4a0a-b12d-ad31e9321b4c
x-ms-return-client-request-id:true
User-Agent:azsdk-net-Storage.Blobs/12.9.0,(.NET 6.0.3; Microsoft Windows 10.0.19044)
x-ms-date:Wed, 06 Apr 2022 07:48:57 GMT
Authorization:REDACTED
client assembly: Azure.Storage.Blobs
[08:48:57 INF] Response [37a4ec4f-9503-4a0a-b12d-ad31e9321b4c] 200 OK (00.0s)
Server:Azurite-Blob/3.16.0
x-ms-creation-time:Wed, 06 Apr 2022 07:46:51 GMT
x-ms-meta-FunctionInstance:REDACTED
x-ms-blob-type:BlockBlob
x-ms-lease-duration:fixed
x-ms-lease-state:leased
x-ms-lease-status:locked
ETag:"0x1EAFB3D22287DC0"
x-ms-client-request-id:37a4ec4f-9503-4a0a-b12d-ad31e9321b4c
x-ms-request-id:1c7c35a3-7e06-4453-bec5-a8007c115f47
x-ms-version:2021-04-10
Date:Wed, 06 Apr 2022 07:48:57 GMT
Accept-Ranges:bytes
x-ms-server-encrypted:true
x-ms-access-tier:Hot
x-ms-access-tier-inferred:true
x-ms-access-tier-change-time:Wed, 06 Apr 2022 07:46:51 GMT
Connection:keep-alive
Keep-Alive:REDACTED
Last-Modified:Wed, 06 Apr 2022 07:46:51 GMT
Content-Length:0
Content-Type:application/octet-stream
Content-MD5:

ghost avatar Apr 06 '22 07:04 ghost

Here it's the stack trace of my stack overflow

Stack overflow. at System.Globalization.CompareInfo.IcuCompareString(System.ReadOnlySpan1<Char>, System.ReadOnlySpan1<Char>, System.Globalization.CompareOptions) at System.Globalization.CompareInfo.Compare(System.ReadOnlySpan1<Char>, System.ReadOnlySpan1<Char>, System.Globalization.CompareOptions) at System.Globalization.CompareInfo.Compare(System.String, System.String, System.Globalization.CompareOptions) at System.String.Equals(System.String, System.String, System.StringComparison) at Azure.Core.RequestUriBuilder.ToString() at Azure.Core.RequestUriBuilder.ToUri() at Azure.Storage.StorageSharedKeyPipelinePolicy.BuildStringToSign(Azure.Core.HttpMessage) at Azure.Storage.StorageSharedKeyPipelinePolicy.OnSendingRequest(Azure.Core.HttpMessage) at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.ProcessAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNextAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy+<<ProcessAsync>g__ProcessAsyncInner|4_0>d.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Azure.Core.Pipeline.HttpPipelineSynchronousPolicy+<<ProcessAsync>g__ProcessAsyncInner|4_0>d, Azure.Core, Version=1.25.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8]](<<ProcessAsync>g__ProcessAsyncInner|4_0>d ByRef) at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.<ProcessAsync>g__ProcessAsyncInner|4_0(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNextAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.RedirectPolicy+<ProcessAsync>d__5.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Azure.Core.Pipeline.RedirectPolicy+<ProcessAsync>d__5, Azure.Core, Version=1.25.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8]](<ProcessAsync>d__5 ByRef) at Azure.Core.Pipeline.RedirectPolicy.ProcessAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>, Boolean) at Azure.Core.Pipeline.RedirectPolicy.ProcessAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.RetryPolicy+<ProcessAsync>d__11.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Azure.Core.Pipeline.RetryPolicy+<ProcessAsync>d__11, Azure.Core, Version=1.25.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8]](<ProcessAsync>d__11 ByRef) at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>, Boolean) at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNextAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNextAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNextAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNextAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.HttpPipeline.SendAsync(Azure.Core.HttpMessage, System.Threading.CancellationToken) at Azure.Storage.Blobs.ContainerRestClient+<CreateAsync>d__8.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Azure.Storage.Blobs.ContainerRestClient+<CreateAsync>d__8, Azure.Storage.Blobs, Version=12.13.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8]](<CreateAsync>d__8 ByRef) at Azure.Storage.Blobs.ContainerRestClient.CreateAsync(System.Nullable1<Int32>, System.Collections.Generic.IDictionary2<System.String,System.String>, System.Nullable1<Azure.Storage.Blobs.Models.PublicAccessType>, System.String, System.Nullable1<Boolean>, System.Threading.CancellationToken) at Azure.Storage.Blobs.BlobContainerClient+<CreateInternal>d__53.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Azure.Storage.Blobs.BlobContainerClient+<CreateInternal>d__53, Azure.Storage.Blobs, Version=12.13.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8]](<CreateInternal>d__53 ByRef) at Azure.Storage.Blobs.BlobContainerClient.CreateInternal(Azure.Storage.Blobs.Models.PublicAccessType, System.Collections.Generic.IDictionary2<System.String,System.String>, Azure.Storage.Blobs.Models.BlobContainerEncryptionScopeOptions, Boolean, System.Threading.CancellationToken, System.String) at Azure.Storage.Blobs.BlobContainerClient+<CreateIfNotExistsInternal>d__52.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Azure.Storage.Blobs.BlobContainerClient+<CreateIfNotExistsInternal>d__52, Azure.Storage.Blobs, Version=12.13.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8]](<CreateIfNotExistsInternal>d__52 ByRef) at Azure.Storage.Blobs.BlobContainerClient+<CreateIfNotExistsAsync>d__50.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Azure.Storage.Blobs.BlobContainerClient+<CreateIfNotExistsAsync>d__50, Azure.Storage.Blobs, Version=12.13.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8]](<CreateIfNotExistsAsync>d__50 ByRef) at Azure.Storage.Blobs.BlobContainerClient.CreateIfNotExistsAsync(Azure.Storage.Blobs.Models.PublicAccessType, System.Collections.Generic.IDictionary2<System.String,System.String>, Azure.Storage.Blobs.Models.BlobContainerEncryptionScopeOptions, System.Threading.CancellationToken) at Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider+<CreateBlobContainerIfNotExistsAsync>d__9.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider+<CreateBlobContainerIfNotExistsAsync>d__9, Serilog.Sinks.AzureBlobStorage, Version=3.1.3.0, Culture=neutral, PublicKeyToken=null]](<CreateBlobContainerIfNotExistsAsync>d__9 ByRef) at Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider.CreateBlobContainerIfNotExistsAsync(Azure.Storage.Blobs.BlobContainerClient, Boolean) at Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider+<GetBlobReferenceAsync>d__8.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider+<GetBlobReferenceAsync>d__8, Serilog.Sinks.AzureBlobStorage, Version=3.1.3.0, Culture=neutral, PublicKeyToken=null]](<GetBlobReferenceAsync>d__8 ByRef) at Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider.GetBlobReferenceAsync(Azure.Storage.Blobs.BlobServiceClient, System.String, System.String, Boolean) at Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider+<GetAppendBlobClientAsync>d__5.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider+<GetAppendBlobClientAsync>d__5, Serilog.Sinks.AzureBlobStorage, Version=3.1.3.0, Culture=neutral, PublicKeyToken=null]](<GetAppendBlobClientAsync>d__5 ByRef) at Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider.GetAppendBlobClientAsync(Azure.Storage.Blobs.BlobServiceClient, System.String, System.String, Boolean, System.Nullable1<Int64>) at Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider+<GetCloudBlobAsync>d__4.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider+<GetCloudBlobAsync>d__4, Serilog.Sinks.AzureBlobStorage, Version=3.1.3.0, Culture=neutral, PublicKeyToken=null]](<GetCloudBlobAsync>d__4 ByRef) at Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider.GetCloudBlobAsync(Azure.Storage.Blobs.BlobServiceClient, System.String, System.String, Boolean, System.Nullable1<Int64>) at Serilog.Sinks.AzureBlobStorage.AzureBlobStorageSink.Emit(Serilog.Events.LogEvent) at Serilog.Core.Sinks.SafeAggregateSink.Emit(Serilog.Events.LogEvent) at Serilog.Extensions.Logging.SerilogLogger.Write[[Microsoft.Extensions.Azure.AzureEventSourceLogForwarder+EventSourceEvent, Microsoft.Extensions.Azure, Version=1.1.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8]](Serilog.Events.LogEventLevel, Microsoft.Extensions.Logging.EventId, EventSourceEvent, System.Exception, System.Func3<EventSourceEvent,System.Exception,System.String>) at Serilog.Extensions.Logging.SerilogLogger.Log[[Microsoft.Extensions.Azure.AzureEventSourceLogForwarder+EventSourceEvent, Microsoft.Extensions.Azure, Version=1.1.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8]](Microsoft.Extensions.Logging.LogLevel, Microsoft.Extensions.Logging.EventId, EventSourceEvent, System.Exception, System.Func3<EventSourceEvent,System.Exception,System.String>) at Microsoft.Extensions.Logging.Logger.<Log>g__LoggerLog|12_0[[Microsoft.Extensions.Azure.AzureEventSourceLogForwarder+EventSourceEvent, Microsoft.Extensions.Azure, Version=1.1.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8]](Microsoft.Extensions.Logging.LogLevel, Microsoft.Extensions.Logging.EventId, Microsoft.Extensions.Logging.ILogger, System.Exception, System.Func3<EventSourceEvent,System.Exception,System.String>, System.Collections.Generic.List1<System.Exception> ByRef, EventSourceEvent ByRef) at Microsoft.Extensions.Logging.Logger.Log[[Microsoft.Extensions.Azure.AzureEventSourceLogForwarder+EventSourceEvent, Microsoft.Extensions.Azure, Version=1.1.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8]](Microsoft.Extensions.Logging.LogLevel, Microsoft.Extensions.Logging.EventId, EventSourceEvent, System.Exception, System.Func3<EventSourceEvent,System.Exception,System.String>) at Microsoft.Extensions.Azure.AzureEventSourceLogForwarder.LogEvent(System.Diagnostics.Tracing.EventWrittenEventArgs) at System.Diagnostics.Tracing.EventSource.DispatchToAllListeners(System.Diagnostics.Tracing.EventWrittenEventArgs) at System.Diagnostics.Tracing.EventSource.WriteEventVarargs(Int32, System.Guid*, System.Object[]) at Azure.Core.Pipeline.LoggingPolicy+<ProcessAsync>d__9.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Azure.Core.Pipeline.LoggingPolicy+<ProcessAsync>d__9, Azure.Core, Version=1.25.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8]](<ProcessAsync>d__9 ByRef) at Azure.Core.Pipeline.LoggingPolicy.ProcessAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>, Boolean) at Azure.Core.Pipeline.LoggingPolicy.ProcessAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNextAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNextAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy+<<ProcessAsync>g__ProcessAsyncInner|4_0>d.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Azure.Core.Pipeline.HttpPipelineSynchronousPolicy+<<ProcessAsync>g__ProcessAsyncInner|4_0>d, Azure.Core, Version=1.25.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8]](<<ProcessAsync>g__ProcessAsyncInner|4_0>d ByRef) at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.<ProcessAsync>g__ProcessAsyncInner|4_0(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNextAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.RedirectPolicy+<ProcessAsync>d__5.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Azure.Core.Pipeline.RedirectPolicy+<ProcessAsync>d__5, Azure.Core, Version=1.25.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8]](<ProcessAsync>d__5 ByRef) at Azure.Core.Pipeline.RedirectPolicy.ProcessAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>, Boolean) at Azure.Core.Pipeline.RedirectPolicy.ProcessAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.RetryPolicy+<ProcessAsync>d__11.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Azure.Core.Pipeline.RetryPolicy+<ProcessAsync>d__11, Azure.Core, Version=1.25.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8]](<ProcessAsync>d__11 ByRef) at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>, Boolean) at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNextAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNextAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNextAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNextAsync(Azure.Core.HttpMessage, System.ReadOnlyMemory1<Azure.Core.Pipeline.HttpPipelinePolicy>) at Azure.Core.Pipeline.HttpPipeline.SendAsync(Azure.Core.HttpMessage, System.Threading.CancellationToken) at Azure.Storage.Blobs.ContainerRestClient+<CreateAsync>d__8.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Azure.Storage.Blobs.ContainerRestClient+<CreateAsync>d__8, Azure.Storage.Blobs, Version=12.13.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8]](<CreateAsync>d__8 ByRef) at Azure.Storage.Blobs.ContainerRestClient.CreateAsync(System.Nullable1<Int32>, System.Collections.Generic.IDictionary2<System.String,System.String>, System.Nullable1<Azure.Storage.Blobs.Models.PublicAccessType>, System.String, System.Nullable1<Boolean>, System.Threading.CancellationToken) at Azure.Storage.Blobs.BlobContainerClient+<CreateInternal>d__53.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Azure.Storage.Blobs.BlobContainerClient+<CreateInternal>d__53, Azure.Storage.Blobs, Version=12.13.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8]](<CreateInternal>d__53 ByRef) at Azure.Storage.Blobs.BlobContainerClient.CreateInternal(Azure.Storage.Blobs.Models.PublicAccessType, System.Collections.Generic.IDictionary2<System.String,System.String>, Azure.Storage.Blobs.Models.BlobContainerEncryptionScopeOptions, Boolean, System.Threading.CancellationToken, System.String) at Azure.Storage.Blobs.BlobContainerClient+<CreateIfNotExistsInternal>d__52.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Azure.Storage.Blobs.BlobContainerClient+<CreateIfNotExistsInternal>d__52, Azure.Storage.Blobs, Version=12.13.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8]](<CreateIfNotExistsInternal>d__52 ByRef) at Azure.Storage.Blobs.BlobContainerClient+<CreateIfNotExistsAsync>d__50.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Azure.Storage.Blobs.BlobContainerClient+<CreateIfNotExistsAsync>d__50, Azure.Storage.Blobs, Version=12.13.1.0, Culture=neutral, PublicKeyToken=92742159e12e44c8]](<CreateIfNotExistsAsync>d__50 ByRef) at Azure.Storage.Blobs.BlobContainerClient.CreateIfNotExistsAsync(Azure.Storage.Blobs.Models.PublicAccessType, System.Collections.Generic.IDictionary2<System.String,System.String>, Azure.Storage.Blobs.Models.BlobContainerEncryptionScopeOptions, System.Threading.CancellationToken) at Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider+<CreateBlobContainerIfNotExistsAsync>d__9.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider+<CreateBlobContainerIfNotExistsAsync>d__9, Serilog.Sinks.AzureBlobStorage, Version=3.1.3.0, Culture=neutral, PublicKeyToken=null]](<CreateBlobContainerIfNotExistsAsync>d__9 ByRef) at Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider.CreateBlobContainerIfNotExistsAsync(Azure.Storage.Blobs.BlobContainerClient, Boolean) at Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider+<GetBlobReferenceAsync>d__8.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider+<GetBlobReferenceAsync>d__8, Serilog.Sinks.AzureBlobStorage, Version=3.1.3.0, Culture=neutral, PublicKeyToken=null]](<GetBlobReferenceAsync>d__8 ByRef) at Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider.GetBlobReferenceAsync(Azure.Storage.Blobs.BlobServiceClient, System.String, System.String, Boolean) at Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider+<GetAppendBlobClientAsync>d__5.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider+<GetAppendBlobClientAsync>d__5, Serilog.Sinks.AzureBlobStorage, Version=3.1.3.0, Culture=neutral, PublicKeyToken=null]](<GetAppendBlobClientAsync>d__5 ByRef) at Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider.GetAppendBlobClientAsync(Azure.Storage.Blobs.BlobServiceClient, System.String, System.String, Boolean, System.Nullable1<Int64>) at Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider+<GetCloudBlobAsync>d__4.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider+<GetCloudBlobAsync>d__4, Serilog.Sinks.AzureBlobStorage, Version=3.1.3.0, Culture=neutral, PublicKeyToken=null]](<GetCloudBlobAsync>d__4 ByRef) at Serilog.Sinks.AzureBlobStorage.AzureBlobProvider.DefaultCloudBlobProvider.GetCloudBlobAsync(Azure.Storage.Blobs.BlobServiceClient, System.String, System.String, Boolean, System.Nullable`1<Int64>)

ciacco85 avatar Oct 05 '22 13:10 ciacco85

@chriswill any ideas? it's working fine with deprecated Microsoft.Azure.Storage nuget package and your last main release 2.x

ciacco85 avatar Oct 07 '22 09:10 ciacco85

Are you running your function in isolated mode?

If not, then your function may not have support for these dlls.

Sent from my iPhone

On Oct 7, 2022, at 2:52 AM, Francesco Venturini @.***> wrote:



@chriswillhttps://github.com/chriswill any ideas? it's working fine with deprecated Microsoft.Azure.Storage nuget package and your last main release 2.x

— Reply to this email directly, view it on GitHubhttps://github.com/chriswill/serilog-sinks-azureblobstorage/issues/92#issuecomment-1271376104, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AABUZYVPCGB6CNJ57MK2VPDWB7XGHANCNFSM5SVDWPHQ. You are receiving this because you were mentioned.Message ID: @.***>

chriswill avatar Oct 07 '22 22:10 chriswill

Are you running your function in isolated mode? If not, then your function may not have support for these dlls. Sent from my iPhone On Oct 7, 2022, at 2:52 AM, Francesco Venturini @.> wrote:  @chriswillhttps://github.com/chriswill any ideas? it's working fine with deprecated Microsoft.Azure.Storage nuget package and your last main release 2.x — Reply to this email directly, view it on GitHub<#92 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AABUZYVPCGB6CNJ57MK2VPDWB7XGHANCNFSM5SVDWPHQ. You are receiving this because you were mentioned.Message ID: @.>

No, you're right, because I remember that I've switched to net 6 only when in process support for v4 function was released. So the only option to use your sink is to switch to isolated mode? If yes, I suggest the author @andyb70 to close the issue Thanks

PS OT: since mine is a containerized function, should it be isolated by design?

ciacco85 avatar Oct 09 '22 12:10 ciacco85

So the only option to use your sink is to switch to isolated mode?

I'm not sure. However before isolated mode existed, I ran into all sorts of problems trying to run code (other Nugets) on anything other than the specific versions of the code they provided. I'm currently running in isolated mode and I'm much happier. Also, just as an FYI, I run this library in my .net 6.0 isolated mode function app without issues.

Not trying to dis on you, but Microsoft makes so many different variations and ways to run .net code. I have people asking about running it on this function app, this container, this data warehouse storage type, this Blazor app, this version of .net framework from way back, etc. I can't build and test all of these environments. If enough people care, the community will come forth with a test case, or documentation, or a PR.

I'm not currently running a containerized function, but if you have some learnings to share from that environment, please contribute with a sample implementation or other learning assistance and you'll be recognized for the contribution.

chriswill avatar Oct 11 '22 05:10 chriswill