Azure / Azure/azure-functions-host

Monitor Tab doesn't show invocations for Non-HTTP Triggered Functions on the Linux Consumption Plan

Open
#4,627 1 comment 2 reactions 1 assignee Claimed by @brettsam View on GitHub
needs-investigation
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.

![image](https://user-images.githubusercontent.com/1410302/60431959-f3716380-9bf8-11e9-952d-86f6372213aa.png)

#### 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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.