Azure / Azure/azure-functions-host
Monitor Tab doesn't show invocations for Non-HTTP Triggered Functions on the Linux Consumption Plan
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 36
Description
#### Investigative information
Please provide the following:
- Timestamp:2019-07-01T10:49:00.0356745Z
- Function App version (1.0 or 2.0): 2.0 (2.0.12490)
- Function App name: TimerTriggers
- Function name(s) (as appropriate):
- Invocation ID:78e4b797-f4ce-497d-a0b7-8a8eef460ac6
- Region:West Europe
#### Repro steps
Provide the steps required to reproduce the problem:
1. Create a new Python Function App
2. Add a new Timer Triggered Function schedule":"0 */1 * * * *"
3. Deploy to Linux Consumption Plan.
4. Add Application Insights
5. Wait an hour.
6. Run the Function once in the Portal.
7. Visit the monitor tab.
#### Expected behavior
Provide a description of the expected behavior.
After Step 6 there should be at least 60 invocations of the Function TimerTrigger.
There will be only one from the Portal invocation.

#### Actual behavior
Provide a description of the actual behavior observed.
1. The Monitor tab is querying the Requests table.
{
"query": "requests | project timestamp, id, operation_Name, success, resultCode, duration, operation_Id, cloud_RoleName, invocationId=customDimensions['InvocationId'] | where timestamp > ago(30d) | where cloud_RoleName =~ 'testfinpyfunction' and operation_Name == 'TimerTrigger' | order by timestamp desc | take 20"
}
2. The Invocations are recorded in the Traces table.
traces | where timestamp > ago(30d) | order by timestamp desc | take 10
#### Known workarounds
Provide a description of any known workarounds.
No workarounds exist.
1) Sampling has been disabled for Application Insights.
2) Placeholders have been disabled.
#### Related information
Provide any related information
* Python
* Also tested with a Storage Queue Trigger which shows the same issue.
* Bindings used - Timer, HTTP, Queue.
Source
```python
import datetime
import logging
import time
import azure.functions as func
def main(mytimer: func.TimerRequest) -> None:
utc_timestamp = datetime.datetime.utcnow().replace(
tzinfo=datetime.timezone.utc).isoformat()
if mytimer.past_due:
logging.info('The timer is past due!')
logging.info('Python timer trigger function ran at %s', utc_timestamp)
```
Contributor guide
Assessment
This issue has not been assessed yet.