-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
func (client *ProactiveDetectionConfigurationsClient) List return an array with each item properties are nil #23464
Comments
Can you please elaborate on the problem with the call to |
yes. i saw that the body is being returned as expected, the configuration is accurate and the there is a call to the UnmarshalAsJSON function to return the json data as an object but the UnmarshalAsJSON function return the array with each item properties set to be nil |
Hey @jhendrixMSFT |
Can you please provide a sample body that's failing to incorrectly unmarshal? Logging will make this easier, although you'll need to explicitly enable logging request/response bodies. |
Hi @AmitOttenheimer. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
Hey, this is sample body that is failing to unmarshal: [
{
"name": "slowpageloadtime",
"ruleDefinitions": {
"Name": "slowpageloadtime",
"DisplayName": "Slow page load time",
"Description": "Smart Detection rules notify you of performance anomaly issues.",
"HelpUrl": "https://docs.microsoft.com/en-us/azure/application-insights/app-insights-proactive-performance-diagnostics",
"IsHidden": false,
"IsEnabledByDefault": true,
"IsInPreview": false,
"SupportsEmailNotifications": true
},
"enabled": true,
"sendEmailsToSubscriptionOwners": true,
"customEmails": [],
"lastUpdatedTime": null
},
{
"name": "slowserverresponsetime",
"ruleDefinitions": {
"Name": "slowserverresponsetime",
"DisplayName": "Slow server response time",
"Description": "Smart Detection rules notify you of performance anomaly issues.",
"HelpUrl": "https://docs.microsoft.com/en-us/azure/application-insights/app-insights-proactive-performance-diagnostics",
"IsHidden": false,
"IsEnabledByDefault": true,
"IsInPreview": false,
"SupportsEmailNotifications": true
},
"enabled": true,
"sendEmailsToSubscriptionOwners": true,
"customEmails": [],
"lastUpdatedTime": null
},
{
"name": "longdependencyduration",
"ruleDefinitions": {
"Name": "longdependencyduration",
"DisplayName": "Long dependency duration",
"Description": "Smart Detection rules notify you of performance anomaly issues.",
"HelpUrl": "https://docs.microsoft.com/en-us/azure/application-insights/app-insights-proactive-performance-diagnostics",
"IsHidden": false,
"IsEnabledByDefault": true,
"IsInPreview": false,
"SupportsEmailNotifications": true
},
"enabled": true,
"sendEmailsToSubscriptionOwners": true,
"customEmails": [],
"lastUpdatedTime": null
},
{
"name": "degradationinserverresponsetime",
"ruleDefinitions": {
"Name": "degradationinserverresponsetime",
"DisplayName": "Degradation in server response time",
"Description": "Smart Detection rules notify you of performance anomaly issues.",
"HelpUrl": "https://docs.microsoft.com/en-us/azure/application-insights/app-insights-proactive-performance-diagnostics",
"IsHidden": false,
"IsEnabledByDefault": true,
"IsInPreview": false,
"SupportsEmailNotifications": true
},
"enabled": true,
"sendEmailsToSubscriptionOwners": true,
"customEmails": [],
"lastUpdatedTime": null
},
{
"name": "degradationindependencyduration",
"ruleDefinitions": {
"Name": "degradationindependencyduration",
"DisplayName": "Degradation in dependency duration",
"Description": "Smart Detection rules notify you of performance anomaly issues.",
"HelpUrl": "https://docs.microsoft.com/en-us/azure/application-insights/app-insights-proactive-performance-diagnostics",
"IsHidden": false,
"IsEnabledByDefault": true,
"IsInPreview": false,
"SupportsEmailNotifications": true
},
"enabled": true,
"sendEmailsToSubscriptionOwners": true,
"customEmails": [],
"lastUpdatedTime": null
},
{
"name": "extension_traceseveritydetector",
"ruleDefinitions": {
"Name": "extension_traceseveritydetector",
"DisplayName": "Degradation in trace severity ratio (preview)",
"Description": "This detection rule automatically analyzes the trace logs emitted from your application, and can warn you about unusual patterns in the severity of your trace telemetry.",
"HelpUrl": "https://github.com/Microsoft/ApplicationInsights-Home/blob/master/SmartDetection/degradation-in-trace-severity-ratio.md",
"IsHidden": false,
"IsEnabledByDefault": true,
"IsInPreview": true,
"SupportsEmailNotifications": false
},
"enabled": true,
"sendEmailsToSubscriptionOwners": true,
"customEmails": [],
"lastUpdatedTime": null
},
{
"name": "extension_exceptionchangeextension",
"ruleDefinitions": {
"Name": "extension_exceptionchangeextension",
"DisplayName": "Abnormal rise in exception volume (preview)",
"Description": "This detection rule automatically analyzes the exceptions thrown in your application, and can warn you about unusual patterns in your exception telemetry.",
"HelpUrl": "https://github.com/Microsoft/ApplicationInsights-Home/blob/master/SmartDetection/abnormal-rise-in-exception-volume.md",
"IsHidden": false,
"IsEnabledByDefault": true,
"IsInPreview": true,
"SupportsEmailNotifications": false
},
"enabled": true,
"sendEmailsToSubscriptionOwners": true,
"customEmails": [],
"lastUpdatedTime": null
},
{
"name": "extension_memoryleakextension",
"ruleDefinitions": {
"Name": "extension_memoryleakextension",
"DisplayName": "Potential memory leak detected (preview)",
"Description": "This detection rule automatically analyzes the memory consumption of each process in your application, and can warn you about potential memory leaks or increased memory consumption.",
"HelpUrl": "https://github.com/Microsoft/ApplicationInsights-Home/tree/master/SmartDetection/memory-leak.md",
"IsHidden": false,
"IsEnabledByDefault": true,
"IsInPreview": true,
"SupportsEmailNotifications": false
},
"enabled": true,
"sendEmailsToSubscriptionOwners": true,
"customEmails": [],
"lastUpdatedTime": null
},
{
"name": "extension_securityextensionspackage",
"ruleDefinitions": {
"Name": "extension_securityextensionspackage",
"DisplayName": "Potential security issue detected (preview)",
"Description": "This detection rule automatically analyzes the telemetry generated by your application and detects potential security issues.",
"HelpUrl": "https://github.com/Microsoft/ApplicationInsights-Home/blob/master/SmartDetection/application-security-detection-pack.md",
"IsHidden": false,
"IsEnabledByDefault": true,
"IsInPreview": true,
"SupportsEmailNotifications": false
},
"enabled": true,
"sendEmailsToSubscriptionOwners": true,
"customEmails": [],
"lastUpdatedTime": null
},
{
"name": "extension_billingdatavolumedailyspikeextension",
"ruleDefinitions": {
"Name": "extension_billingdatavolumedailyspikeextension",
"DisplayName": "Abnormal rise in daily data volume (preview)",
"Description": "This detection rule automatically analyzes the billing data generated by your application, and can warn you about an unusual increase in your application's billing costs",
"HelpUrl": "https://github.com/Microsoft/ApplicationInsights-Home/tree/master/SmartDetection/billing-data-volume-daily-spike.md",
"IsHidden": false,
"IsEnabledByDefault": true,
"IsInPreview": true,
"SupportsEmailNotifications": false
},
"enabled": true,
"sendEmailsToSubscriptionOwners": true,
"customEmails": [],
"lastUpdatedTime": null
}
] |
Thanks, this was helpful. The swagger definition for this type doesn't match what's sent over the wire. Specifically, the swagger specifies the fields as pascal-cased when they're actually camel-cased. Interesting to note that this specific API is from @lirenhe can you please follow up with the team that owns this swagger so they can investigate? |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azmonapplicationinsights. |
hey @jhendrixMSFT is there any ETA for this fix ? |
Hey,
I am using the function: func (client *ProactiveDetectionConfigurationsClient) List(ctx context.Context, resourceGroupName string, resourceName string, ...) (ProactiveDetectionConfigurationsClientListResponse, error)
and I am receiving the array with the proper item number but each item has every property set to the default value,
I saw that the problem was inside the function: func (client *ProactiveDetectionConfigurationsClient) listHandleResponse(resp *http.Response) (ProactiveDetectionConfigurationsClientListResponse, error)
with in the UnmarshalAsJSON
I am using this version: v1.2.0
thank you very much!
The text was updated successfully, but these errors were encountered: