Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Please log LeaseLostException as Trace Information #59

Closed
PeterQin opened this issue Mar 13, 2020 · 1 comment
Closed

Please log LeaseLostException as Trace Information #59

PeterQin opened this issue Mar 13, 2020 · 1 comment

Comments

@PeterQin
Copy link

PeterQin commented Mar 13, 2020

My project using the EventHub Trigger Function. The WebJobs.Extensions.EventHubs SDK version is 3.0.6
Now I'm experiencing the LeaseLostException in App Insight, not frequent.
Call Stack

Microsoft.Azure.EventHubs.Processor.LeaseLostException:
   at Microsoft.Azure.EventHubs.Processor.AzureStorageCheckpointLeaseManager+<AcquireLeaseCoreAsync>d__32.MoveNext (Microsoft.Azure.EventHubs.Processor, Version=2.1.0.0, Culture=neutral, PublicKeyToken=7e34167dcc6d6d8c)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.Azure.EventHubs.Processor.PartitionManager+<RunLoopAsync>d__12.MoveNext (Microsoft.Azure.EventHubs.Processor, Version=2.1.0.0, Culture=neutral, PublicKeyToken=7e34167dcc6d6d8c)
Inner exception Microsoft.WindowsAzure.Storage.StorageException handled at Microsoft.Azure.EventHubs.Processor.AzureStorageCheckpointLeaseManager+<AcquireLeaseCoreAsync>d__32.MoveNext:
   at Microsoft.WindowsAzure.Storage.Core.Executor.Executor+<ExecuteAsyncInternal>d__41.MoveNext (Microsoft.WindowsAzure.Storage, Version=9.3.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
   at Microsoft.Azure.EventHubs.Processor.AzureStorageCheckpointLeaseManager+<AcquireLeaseCoreAsync>d__32.MoveNext (Microsoft.Azure.EventHubs.Processor, Version=2.1.0.0, Culture=neutral, PublicKeyToken=7e34167dcc6d6d8c)

I understood this is not a real error after reading a lot of doc. I'm very glad to see you guys want to log it as Information in #5 and #42 .
Could you guys please also update the LogExceptionReceivedEvent function in EventHubExtensionConfigProvider, your code logger?.Log(logLevel, 0, message, e.Exception, (s, ex) => message); still logging the LeaseLostException as Exception - https://github.com/Azure/azure-functions-eventhubs-extension/blob/dev/src/Microsoft.Azure.WebJobs.Extensions.EventHubs/Config/EventHubExtensionConfigProvider.cs#L87

@ghost ghost added the Needs: triage 🔍 label Mar 13, 2020
@PeterQin PeterQin changed the title Please log LeaseLostException as Trace Please log LeaseLostException as Trace Information Mar 13, 2020
@jeffhollan
Copy link

Just reviewed a supportability case with this being the issue. I thoughts @brettsam made this change but wonder if it's a different exception type?

@jeffhollan jeffhollan added this to the Triaged milestone Mar 20, 2020
@alrod alrod modified the milestones: Triaged, Functions Sprint 73 Apr 1, 2020
@alrod alrod self-assigned this Apr 1, 2020
alrod added a commit that referenced this issue Apr 8, 2020
alrod added a commit that referenced this issue Apr 11, 2020
@alrod alrod closed this as completed in e263c0c Apr 13, 2020
sidkri added a commit that referenced this issue Dec 8, 2020
* Add EventHub output logging. Fixes #60.
* Unifying logging of exceptions. Fixes #59.
* Fix nuget errors on pack (#73)
* Increasing max message size and batch size. Fixes #29
* User configurable initial offset support (#79)
* Instructions via Readme.md for setting up local environment to run integration tests

Co-authored-by: Alexey Rodionov <alrod@microsoft.com>
Co-authored-by: Pragna Gopa <pgopa@microsoft.com>
Co-authored-by: Sid Krishna <sidkri@microsoft.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants