Azure / Azure/azure-cli-extensions

Missing customDimensions output for requests query in app-insights

Open
#1,221 6 comments 0 reactions 1 assignee Assigned to @kairu-ms View on GitHub
customer-reported feature-request Monitor - ApplicationInsights Service Attention
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### **This is autogenerated. Please review and update as needed.**

## Describe the bug

**Command Name**
`az monitor app-insights events show
Extension Name: application-insights. Version: 0.1.2.`

**Errors:**

When running with event type `requests` and application ID corresponding to my function app, I get correct requests but `customDimensions` field always contains only `additionalProperties` key with value null. When querying requests in Azure Monitor portal (just `requests | take 20` or with the REST API (`https://api.applicationinsights.io/v1/apps/${APP_ID}/events/requests?$top=5`), the `customDimensions` contains necessary information such as `FunctionExecutionTimeMs` or `invocationID`, which is necessary to understand which function invocation we're talking about.

I verified that the requests for which I'm getting different results for that field are exactly the same.

Output in CLI:

```
"count": 1,
"customDimensions": {
"additionalProperties": null
},
"customMeasurements": null,
```

Output in REST API/web frontend when running a query.

```
"customDimensions": {
"ai_legacyRequestId": "XXXX",
"FunctionExecutionTimeMs": "2279.5392",
"TriggerReason": "This function was programmatically called via the host APIs.",
"FullName": "Functions.handler",
"LogLevel": "Information",
"Category": "Host.Results",
"InvocationId": "XXXX",
"HostInstanceId": "XXXX",
"ProcessId": "37",
"HttpMethod": "POST",
"HttpPath": "/api/handler"
},
```

## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

- _Put any pre-requisite steps here..._
- `az monitor app-insights events show --type requests --app {} --offset {}`

## Expected Behavior

Correctly filled `customDimensions` filled with data relevant to function execution.

## Environment Summary
```
Linux-5.3.0-24-generic-x86_64-with-debian-9.11
Python 3.6.5
Shell: bash

azure-cli 2.0.80

Extensions:
application-insights 0.1.2

```
## Additional Context

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.