question

Wai C. avatar image
Wai C. asked ·

How to turn a String Session Property to Long Property?

The session property I able to capture from the CSS element is "MYRxxxx or USD xxxx". Due to the word MYR or USD, it can't be long but has to be string.

Now, after capturing this, how can I configure Dynatrace to remove the name of the currency and make them to be long after that?

Best Regards,

Wai Keat

configurationDynatrace Managedmonitoringuser session monitoring
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Simon S. avatar image
Simon S. answered ·

@Wai Keat C. to extract a long you first need to apply a cleanup rule. The cleanup rule allows you to extract the actual number from the string "MYRxxxx" or "USD xxxx". The extracted value can then be converted into a long. See the attached screenshot as an example.

example-extraction.png

Please note, that you cannot apply this to values that have already been captured. But at least you can add a new rule that properly extracts the value as a long. I suggest to create a new property and remove the old one to not mix values.

You can also extract a value currency to just have "MYD" and "USD" and another rule that just contains the total.


1 comment Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Hi Simon,

Although the regex during testing seems to work, but actually after we apply it, it won't work.


I've open a support ticket and this is the reply I get:


Please note that
doubles:

  • we don't support thousands separators
  • we only support '.' and ',' as decimal separators
  • we don't support other characters (no e/E, f/F, d/D)
    => only one char may be '.' or ',' (two separators are not allowed!), all other characters must be digits!

longs:
all characters must be digits, no other characters are supported!

Please verify it for the captured, or if string works, may stay with it. Please let me know what do you think.

0 Likes 0 · ·
Wai C. avatar image
Wai C. answered ·

Thanks guys, for the swift input.
Let me try it our later.

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Sebastian K. avatar image
Sebastian K. answered ·

There is no option to make such switch. You have to delete field and create it new for example with new key name but for the same css property.

Sebastian

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.