Azure / azure-functions-core-tools

Command line tools for Azure Functions
MIT License
1.32k stars 434 forks source link

Log stream for Linux Consumption apps #2138

Open ggailey777 opened 4 years ago

ggailey777 commented 4 years ago

It seems like we now (at least in the portal) have Log stream supported for Linux Consumption apps. image This means that (at minimum) the command func azure functionapp logstream <APP_NAME> --browser should open this URL:
/resource/subscriptions/<SUB_ID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<APP_NAME>/logStream It's currently opening the Live Metrics URL:
/resource/subscriptions/<SUB_ID>/resourceGroups/<RG>/providers/microsoft.insights/components/<APP_NAME>

We should also investigate if the original command func azure functionapp logstream <APP_NAME> might also now work.

apawast commented 4 years ago

@anirudhgarg do you know if we can use the same API as the portal to get streaming logs?

anirudhgarg commented 4 years ago

I think that should work, but @ehamai can confirm if that link can be exposed outside of the portal.

ehamai commented 4 years ago

So theoretically it should be doable, however I think we need to make sure the AI folks are okay with that. They were pretty hesitant to even give us permission just to do this in the portal to begin with. Even then, we still need them to do a lot of work for us to improve the usability and reliability of this API so it's probably better to make sure they understand our scenario before we dive in.

apawast commented 4 years ago

@balag0 In the past, the first URL was used because at the time log streaming wasn't as reliable. Do you feel that it is reliable enough to make this change now?

balag0 commented 4 years ago

I am not familiar with this url /resource/subscriptions//resourceGroups//providers/Microsoft.Web/sites//logStream

This doesn't look like a published arm api from Microsoft.Web RP so not sure about its reliability either.