Skip to content

[BUG] Missing required property/properties: timespan #45283

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

Open
IshanCSE opened this issue May 10, 2025 · 4 comments
Open

[BUG] Missing required property/properties: timespan #45283

IshanCSE opened this issue May 10, 2025 · 4 comments
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor Monitor, Monitor Ingestion, Monitor Query 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

Comments

@IshanCSE
Copy link

We are using Azure Monitor to get Percentage CPU utilization.
We are using these dependencies
"com.azure:azure-monitor-query:1.5.7"
"com.azure:azure-storage-blob:12.24.0"
"com.azure:azure-identity:1.15.4"
"com.azure:azure-core-http-okhttp:1.11.13"
"com.azure:azure-core:1.55.3"

We are using Java 17 with Spring boot 3.4.3.

We are using below code to get details

MetricsQueryClient metricsQueryClient = new MetricsQueryClientBuilder()
.credential(new DefaultAzureCredentialBuilder().build())
.buildClient();

Response metricsResponse = metricsQueryClient
.queryResourceWithResponse(vmResourceId, Arrays.asList("Percentage CPU"),
new MetricsQueryOptions()
.setAggregations(Arrays.asList(AggregationType.TOTAL))
.setTimeInterval(QueryTimeInterval.LAST_30_MINUTES),
Context.NONE);

We have added "Microsoft.Insights/*/Read" action in required Role.

When Above code executes, we get below error

2025-05-10 05:16:50,949 ERROR [pool-2-thread-2] [com.azure.core.implementation.MethodHandleReflectiveInvoker] [reqid: app: jsid: aid: uid: org: vorg: sid: un: sn:] - Missing required property/properties: timespan
2025-05-10 05:16:50,950 ERROR [pool-2-thread-2] [com.informatica.cloud.management.monitoring.VMAutoScaler] [reqid: app: jsid: aid: uid: org: vorg: sid: un: sn:] - Error checking VM status {}
com.azure.core.exception.HttpResponseException: Deserialization Failed.
at com.azure.core.implementation.serializer.HttpResponseBodyDecoder.decodeByteArray(HttpResponseBodyDecoder.java:99) ~[cloud-datastore.jar:?]
at com.azure.core.implementation.serializer.HttpResponseDecoder$HttpDecodedResponse.getDecodedBody(HttpResponseDecoder.java:93) ~[cloud-datastore.jar:?]
at com.azure.core.implementation.http.rest.SyncRestProxy.handleBodyReturnType(SyncRestProxy.java:193) ~[cloud-datastore.jar:?]
at com.azure.core.implementation.http.rest.SyncRestProxy.handleRestResponseReturnType(SyncRestProxy.java:148) ~[cloud-datastore.jar:?]
at com.azure.core.implementation.http.rest.SyncRestProxy.handleRestReturnType(SyncRestProxy.java:221) ~[cloud-datastore.jar:?]
at com.azure.core.implementation.http.rest.SyncRestProxy.invoke(SyncRestProxy.java:86) ~[cloud-datastore.jar:?]
at com.azure.core.implementation.http.rest.RestProxyBase.invoke(RestProxyBase.java:124) ~[cloud-datastore.jar:?]
at com.azure.core.http.rest.RestProxy.invoke(RestProxy.java:95) ~[cloud-datastore.jar:?]
at jdk.proxy3/jdk.proxy3.$Proxy535.listSync(Unknown Source) ~[?:?]
at com.azure.monitor.query.implementation.metrics.MetricsImpl.listWithResponse(MetricsImpl.java:1033) ~[azure-monitor-query-1.5.7.jar:1.5.7]
at com.azure.monitor.query.MetricsQueryClient.queryResourceWithResponse(MetricsQueryClient.java:155) ~[azure-monitor-query-1.5.7.jar:1.5.7]
at com.azure.monitor.query.MetricsQueryClient.queryResource(MetricsQueryClient.java:121) ~[azure-monitor-query-1.5.7.jar:1.5.7]
at com.informatica.cloud.management.monitoring.AzureVMMonitor.getCPUUsage(AzureVMMonitor.java:65) ~[classes/:?]
at com.informatica.cloud.management.monitoring.VMAutoScaler.getDomainVMServiceEntity(VMAutoScaler.java:36) ~[classes/:?]
at com.informatica.cloud.runtime.argo.ArgoService.submitTaskToArgoAsync(ArgoService.java:1199) ~[classes/:?]
at com.informatica.cloud.runtime.argo.ArgoService.lambda$submitTaskToArgo$14(ArgoService.java:1122) ~[classes/:?]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
at java.base/java.lang.Thread.run(Thread.java:840) [?:?]
Caused by: java.io.IOException: java.lang.IllegalStateException: Missing required property/properties: timespan
at com.azure.core.implementation.ReflectionSerializable.deserializeAsJsonSerializable(ReflectionSerializable.java:164) ~[cloud-datastore.jar:?]
at com.azure.core.implementation.serializer.HttpResponseBodyDecoder.deserialize(HttpResponseBodyDecoder.java:169) ~[cloud-datastore.jar:?]
at com.azure.core.implementation.serializer.HttpResponseBodyDecoder.deserializeBody(HttpResponseBodyDecoder.java:150) ~[cloud-datastore.jar:?]
at com.azure.core.implementation.serializer.HttpResponseBodyDecoder.decodeByteArray(HttpResponseBodyDecoder.java:93) ~[cloud-datastore.jar:?]
... 20 more
Caused by: java.lang.IllegalStateException: Missing required property/properties: timespan
at com.azure.monitor.query.implementation.metrics.models.MetricsResponse.lambda$fromJson$3(MetricsResponse.java:251) ~[azure-monitor-query-1.5.7.jar:1.5.7]
at com.azure.json.JsonReader.readMapOrObject(JsonReader.java:554) ~[azure-json-1.5.0.jar:1.5.0]
at com.azure.json.JsonReader.readObject(JsonReader.java:458) ~[azure-json-1.5.0.jar:1.5.0]
at com.azure.monitor.query.implementation.metrics.models.MetricsResponse.fromJson(MetricsResponse.java:202) ~[azure-monitor-query-1.5.7.jar:1.5.7]
at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:732) ~[?:?]
at com.azure.core.implementation.MethodHandleReflectiveInvoker.invokeStatic(MethodHandleReflectiveInvoker.java:26) ~[cloud-datastore.jar:?]
at com.azure.core.implementation.ReflectionSerializable.deserializeAsJsonSerializable(ReflectionSerializable.java:159) ~[cloud-datastore.jar:?]
at com.azure.core.implementation.serializer.HttpResponseBodyDecoder.deserialize(HttpResponseBodyDecoder.java:169) ~[cloud-datastore.jar:?]
at com.azure.core.implementation.serializer.HttpResponseBodyDecoder.deserializeBody(HttpResponseBodyDecoder.java:150) ~[cloud-datastore.jar:?]
at com.azure.core.implementation.serializer.HttpResponseBodyDecoder.decodeByteArray(HttpResponseBodyDecoder.java:93) ~[cloud-datastore.jar:?]
... 20 more

@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 May 10, 2025
@IshanCSE
Copy link
Author

Can anyone provide any support for this ?

@joshfree joshfree added Monitor Monitor, Monitor Ingestion, Monitor Query and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels May 12, 2025
@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label May 12, 2025
@joshfree
Copy link
Member

Thanks for reaching out to us via Github, @IshanCSE!

Can anyone provide any support for this ?

We use Github Issues to track bugs, questions, and feature requests. GitHub issues are free, but response time is not guaranteed. See https://github.com/Azure/azure-sdk-for-java/blob/main/SUPPORT.md for more details. Customers with an Azure support plan can open an Azure support ticket. We recommend this option if your problem requires immediate attention. See the linked SUPPORT.md for details on how to open an Azure support ticket, if this is urgent.

When Above code executes, we get below error

@jairmyree can you please assist?

@jairmyree
Copy link
Member

@IshanCSE Thank you for reaching out. I'll look into this issue.

@IshanCSE
Copy link
Author

@jairmyree We are opening Azure Support ticket

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. Monitor Monitor, Monitor Ingestion, Monitor Query 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
Projects
None yet
Development

No branches or pull requests

3 participants