cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using Placeholders in Synthetics

ifordyce-s95
Visitor

Hi there.

 

I need my synthetic monitor to insert a cookie with a timestamp in it, in the format 2022-04-26T11:33:29.693Z.

 

In the Advanced section under Set Cookies, there is a comment "Enclose placeholder values in brackets, for example {email}", so I assume I need to do this using placeholders.

 

So the question is - is there a timestamp placeholder already available that I can use, or do I need to create a new one? 

 

If there is one already available, is there a list somewhere. If not, how do I create it?

 

Many thanks,

 

Ian

3 REPLIES 3

andreborges
Observer

Hi Ian, 

 

You will have to create a placeholder in the script section using the api.setValue() method.

 

Ref.: 

https://www.dynatrace.com/news/blog/monitor-dynamic-application-workflows-with-placeholders-and-synt...

HTTP Monitor - Pre and post scripting: https://www.dynatrace.com/support/help/shortlink/http-monitor-pre-post-script#variables

 

Best,

 

ifordyce-s95
Visitor

Many thanks Andre. I'll give it a go and let you know how I get on!

 

Ian

Hi @ifordyce-s95, were you able to receive some satisfying results eventually? Thanks in advance for any feedback, it would be fantastic to know!

Featured Posts