30 Nov 2023 10:15 AM
Hi,
Looking at the documentation I see the following:
the Timeseries data has datapoints of type "TimeseriesDatapoint". However, looking at the timeseries interface I see the following:
export interface Timeseries {
/** The datapoints recordset for this time series */
datapoints: [];
/** The name or names in case of multiple dimensions for the time series */
name: string | string[];
/** Unit token for the value represented by the timeseries datapoints. Eg: 'kbit/s' */
unit?: TimeseriesUnit;
/** Custom data to be added to a Timeseries series payload */
userData?: Record<string, any>;
}
In my code I have the following:
const timeSeriesData:Timeseries = {
name: dimensionName,
unit: 'percent',
datapoints: sloChartDataPoints
}
sloChartDataPoints is of type Array<TimeseriesDatapoint>.
The error I get is:
Solved! Go to Solution.
30 Nov 2023 11:14 AM
Hi @gilgi, what version of Strato are you using? Please update to the latest: 0.108.6.
Best, Edu.
30 Nov 2023 11:33 AM
Hi @educampver
I am actually running 0.109.0 ( that was the latest installed yesterday or a day before that...)
Gil.
30 Nov 2023 11:50 AM - edited 30 Nov 2023 11:53 AM
Weird, I see it fine in 0.109.0:
export interface Timeseries {
/** The datapoints recordset for this time series */
datapoints: TimeseriesDatapoint[];
/** The name or names in case of multiple dimensions for the time series */
name: string | string[];
/** Unit token for the value represented by the timeseries datapoints. Eg: 'kbit/s' */
unit?: TimeseriesUnit;
/** Custom data to be added to a Timeseries series payload */
userData?: Record<string, any>;
}
The only way I've found to reproduce this issue is by manually removing the TimeseriesDatapoint type in the Timeseries type definition. Is it possible this happened by mistake?
Try reinstalling it maybe it'll fix it: npm install @dynatrace/strato-components-preview@latest
30 Nov 2023 12:40 PM
I've done so and it was the same. Have updated the file manually but not sure this is the right way to go.
30 Nov 2023 02:00 PM
It's definitely not the way to go, and everything looks fine on our end, so I'm not sure how to proceed. Is this a new app you just created? Can you try creating a new app from scratch and checking the type definition?
04 Dec 2023 11:41 AM
@gilgi Just checking in. Did you find a solution to this problem?
04 Dec 2023 11:45 AM
Hi @PennyScully
In the emanwhile I kept the manual changes, while I know it's not the way to go, but just didn't have the time to try and create a new app. In my case it wasn't a new app. The upgrade of the version did add the migration comment to my code warning me about the change, so I assume it has something to do wilth the my specific windows environment.
Thanks for following up!