04 Aug 2023 05:37 AM - last edited on 11 Mar 2024 06:26 PM by donald_ferguson
Hi,
i am trying see user count in range 6 month.
currently i am using this query to show the total user. but this is only last 35 day due retention period.
SELECT Count(DISTINCT(userid)) FROM usersession where userId IS NOT NULL
in my mind it is need to create user session custom metric, but i cannot find the proper way to setup like USQL above.
is there someone facing same problem with me and have solution ?
thanks
04 Aug 2023 07:33 AM
For this you can cerate a small automation code that will run User sessions API with your select and push back the information to dynatrace as a metric with Metrics API - POST ingest data points
If you need minutes interval then create an AG extension that will run the code every minute ,if its for longer intervals use some scheduler to run it every no and than.
HTH
Yos