Giter VIP home page Giter VIP logo

Comments (4)

liliankasem avatar liliankasem commented on June 22, 2024 1

If the issue is with AppInsights ingestion then I think we can track these issues in your other GH issue and close this one?

from azure-functions-dotnet-worker.

liliankasem avatar liliankasem commented on June 22, 2024

Hi @dmytro-gokun, a cancellation token should be getting signaled on function timeout, I believe there a graceful shutdown period of a couple seconds but is not configurable.

Can you share more details about the issue you're seeing? If you're able to share a region, timestamp and invocation ID I should be able to investigate further. Thanks!

from azure-functions-dotnet-worker.

dmytro-gokun avatar dmytro-gokun commented on June 22, 2024

@liliankasem I did some testing and I think you are right about CancellationToken and 2 second timeout. The reason i thought cancellation token was not signaled is that i have code like this:

    public class Function
    {
        [Function("Function")]
        public async Task Run(
            [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post")] 
            HttpRequestData request,
            CancellationToken cancellationToken)
        {
            try
            {
                await DoWork(cancellationToken);
            }
            catch (OperationCanceledException)
            {
                Log.LogInformation("Canceled");
            }
        }
    }

with logs being set to Application Insights. So, that "Canceled" log does not end up in AI. I think the reason for that is that the worker gets restarted after the function timeout and some AI logs are lost. Not 100% sure about this though...

from azure-functions-dotnet-worker.

dmytro-gokun avatar dmytro-gokun commented on June 22, 2024

Agree

from azure-functions-dotnet-worker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.