Skip to content
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

Open
AmitOttenheimer opened this issue Sep 19, 2024 · 9 comments
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. Monitor - ApplicationInsights needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@AmitOttenheimer
Copy link

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!

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 19, 2024
@jhendrixMSFT jhendrixMSFT added Mgmt This issue is related to a management-plane library. Monitor - ApplicationInsights and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Sep 19, 2024
@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Sep 19, 2024
@jhendrixMSFT
Copy link
Member

Can you please elaborate on the problem with the call to UnmarshalAsJSON?

@AmitOttenheimer
Copy link
Author

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

@AmitOttenheimer
Copy link
Author

Hey @jhendrixMSFT
Is there any update ?

@jhendrixMSFT
Copy link
Member

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.

@jhendrixMSFT jhendrixMSFT added needs-author-feedback Workflow: More information is needed from author to address the issue. and removed needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team labels Oct 28, 2024
Copy link

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.

@AmitOttenheimer
Copy link
Author

AmitOttenheimer commented Oct 28, 2024

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
  }
]

@github-actions github-actions bot added needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-author-feedback Workflow: More information is needed from author to address the issue. labels Oct 28, 2024
@jhendrixMSFT
Copy link
Member

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 2015-05-01 so either it's been broken for many years, or it broke in the latest beta version of the service.

@lirenhe can you please follow up with the team that owns this swagger so they can investigate?

@jhendrixMSFT jhendrixMSFT added the Service Attention Workflow: This issue is responsible by Azure service team. label Oct 29, 2024
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azmonapplicationinsights.

@AmitOttenheimer
Copy link
Author

hey @jhendrixMSFT is there any ETA for this fix ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. Monitor - ApplicationInsights needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

2 participants