01 Nov 2021 07:59 AM - last edited on 31 May 2023 12:03 PM by Michal_Gebacki
Hello,
I would like to be able to set a key-value inside a synthetic script, and then be able to see this value inside a dashboard.
This should be a custom key-value that I can calculate during the synthetic script run, set it as a (maybe global) key-value, and when opening a dashboard the up-to-date value should be shown.
Is this possible?
We work with NewRelic, and we consider moving to Dynatrace, In NewRelic we could easily do this operation by using $util.insights.set(Key, Value); and then read the value inside the dashboard.
Thanks very much.
Solved! Go to Solution.
01 Nov 2021 08:33 AM
Check the Pre-execution script methods request.addHeader(key,value)
HTH
Yos
01 Nov 2021 08:40 AM - edited 01 Nov 2021 09:50 AM
But how can I fetch this data to a Metric inside the dashboard ?!
For example I used:
request.addHeader("ScansCount", "8765");
How can I show the "ScansCount" value/avg/sum/etc inside a metric in a dashboard?
-- EDIT --
We work on Clickpath scripts
01 Nov 2021 09:55 AM
For that you will need to collect the information from server side with request attribute and calculated metrics then you will be able to chart your metrics with data explorer.