Open AmitOttenheimer opened 2 months ago
Can you please elaborate on the problem with the call to UnmarshalAsJSON
?
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 Is there any update ?
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 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?
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 ?
Somebody from the service team needs to fix their swagger. @lirenhe can you please help route this?
@AmitOttenheimer, could you open a support ticket for applicationInsights service directly? It would be easier to let support team to communicate with engineers from service team.
Yes, how can I do that ?
Hey, the support engineer assigned to the ticket that I created responded me:
` Hello Amit,
Thank you for the provided details.
So as I understand you are using the Go SDK for your application hosted in Azure, which I assume is Go coded application.
I would like to let you know that it is true that there is an Application Insights SDK for Go available on GitHub, which allows you to send telemetry data (such as events, metrics, and traces) to Application Insights. However, this SDK is not officially maintained or supported by Microsoft application insights. so our product group can not help here as this SDK is not one of our maintained and officially created SDKs.
Go language is NOT one of the supported application insights languages, which are (ASP.NET Core, .NET, Java, Node.js, Python, Javascript) as per our public documentation here: Application Insights overview - Azure Monitor | Microsoft Learn and you can also check this part of the documentation where it states that this kind of SDKs is not supported as many community-supported Application Insights SDKs exist, but Microsoft only provides support for instrumentation options listed in this article for languages that are also mentioned above. Application Insights overview - Azure Monitor | Microsoft Learn
For full support from application insights and the latest features, it's recommended to use the supported SDKs mentioned in the earlier documentation.
So we recommend to stay in contact with the Azure SDK for Go development team and let them know that Go is not supported by applicaiton insights as per our public documentations so we can not involve our product team so they have to fix this from their end.
I hope the provided details are clear to you. Please let me know if I can be of any other help to you.
Hope you have a good day.
regards,
Salam Shatarah Support Engineer Azure Monitoring and Automation Working Hours: Sun-Thu 9:00AM – 4:00PM (UTC+3) phone number: +96265564904 Need help outside of my working hours? Locate an engineer: azmonbackup@microsoft.com Manager: Manuela Berceanu-Paquete/ manuelab@microsoft.com
`
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!