#Subject: Blob Trigger Function Not Invoking on File Upload

1 messages · Page 1 of 1 (latest)

tranquil anchor
#

Subject: Blob Trigger Function Not Invoking on File Upload

outer mantle
#

You should add an Application Insights resource plugged to your function and check the logs

#

BlobTrigger polls the storage account so it should work when a file appears in any case

#

Could be an issue within your function startup, if there's any

tranquil anchor
#

When i go to "logs" of my function i get a "Connected!"

outer mantle
#

You should get way more logs

#

Did you add Appinsights in your code too in your function startup ?

tranquil anchor
#

uhhh

#

nope i didn't, i don't know how to do it :/

tranquil anchor
#

i don't have more logs

outer mantle
#

That's for ASP.Net Core but you'll get the idea

tranquil anchor
#

i guess it's application insight no?

outer mantle
tranquil anchor
#

"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
},
"enableLiveMetricsFilters": true
}

i guess it's already setup

outer mantle
tranquil anchor
#

ohhh

#

i think i see what you mean

tranquil anchor
# outer mantle https://learn.microsoft.com/en-us/azure/azure-monitor/app/asp-net-core#enable-ap...
using Microsoft.Azure.Functions.Worker.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

var builder = FunctionsApplication.CreateBuilder(args);

builder.ConfigureFunctionsWebApplication();
builder.Services.AddApplicationInsightsTelemetry();

// This code adds other services for your application.
builder.Services.AddMvc();

// Application Insights isn't enabled by default. See https://aka.ms/AAt8mw4.
// builder.Services
//     .AddApplicationInsightsTelemetryWorkerService()
//     .ConfigureFunctionsApplicationInsights();

builder.Build().Run();

I get an error saying Severity Code Description Project File Line Suppression State Error (active) CS1061 'IServiceCollection' does not contain a definition for 'AddApplicationInsightsTelemetry' and no accessible extension method 'AddApplicationInsightsTelemetry' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?) AppFunction C:\Users\Alexa\source\repos\AzureRessourceGroup\FunctionApp\Program.cs 8

I puted the content from the doc, i guess i'm missing something ?

#

Sorry tho, i'm really a noob :/

outer mantle
#

You probably need to adapt for an Azure Function

#

The link was to give you an idea

#

Just check your AppInsights instance first with the traces query

#

You may already find something in there

tranquil anchor
#

I don't understand where you see "traces query"

outer mantle
#

First screen, close the Query Hub, it's behind it ^^

tranquil anchor
tranquil anchor
outer mantle
#

Change the limit to max

#

And run it again

#

It should give you the information you need

tranquil anchor
#

limit means max log ?

#

i changed it to 100 cause it was taking a lot of time

#

but now i'm a 9:50 and it's still writting progress

outer mantle
#

That's weird