Dynatrace / backstage-plugin

Dynatrace Backstage Plugin
Apache License 2.0
21 stars 3 forks source link

Queries return error when summarized data is not a String #152

Closed schiasileon closed 1 day ago

schiasileon commented 2 weeks ago

Summary

When summarizing data from arrays, the plugin throws invalid type errors, as it expects the query to return a string instead of any other type.

E.g.

| summarize { cost=sum(BilledCost) }, by: { day, currency=BillingCurrency }

throws:

"issues":[
   {
      "code":"invalid_type",
      "expected":"string",
      "received":"number",
      "path":[
         1,
         "sum(BilledCost)"
      ],
      "message":"Expected string, received number"
   }
],

Expected Behavior

The result is displayed correctly, even if it is not a String

Current Behavior

Throws long error

Your Environment

Kirdock commented 2 days ago

Hi, I just did some changes with https://github.com/Dynatrace/backstage-plugin/pull/157 and now everything should be supported, as long as the result is an array 👍