Hi,
We have developed an application in Thingworx and give access to a user to call service through REST api. Is there any method to know how many a service called by a particular user?
Does Thingworx log such kind of information? timestamp, caller id (user), service name. etc.
Hi,
No such kind of information it's recorded on a normal execution, if you set debug log level it will be recorded but then you will be out of space fast on the server.
If it's just some few services that you want to record, you may implement it with a Stream and log the data yourself should be just a line of code, and it won't affect performance as Stream writes are async.
You may look at Tomcat logs also, there should be REST Api call ( Equal to Service ) and Origin IP, but there you won't have user data.
It would be really good to have this kind of information --> Telemetry information, and for instance the time length of execution,...
Carles.
Thanks Carles,
I have created a DataTable and logs the information: username, time, service name.
But I also want to know the size of return results in terms of kilo bytes or MBs.
Do you have any idea?
Don't do it through a DataTable, the performance it's poor ( >100k registers you are dead ), you should do it through a Stream as said on my previous post.
About knowing the KiloBytes / MB of your answer here you are out of look on a precise way, you are too far from HTTP request to get this info, also this will depend on the type of request ( Content-Type:application/json or application/xml,... ) and also if requests are Zipped/ Encrypted.
You can do an estimate, but that's all, like number of rows * estimate space occupied by a row.
Carles.
Thanks Carlos,
Estimate basic data types is easy, but not all fields of InfoTable.
Is there any function sizeof() in InfoTable? Or it should be asked to developer team of Thingworx
I don't think there is, you may ask for sure.
Also you can follow some Javascript way of doing it: http://stackoverflow.com/questions/1248302/javascript-object-size
Thanks again,
Do you know how many units (entities) can be connected to a single Thingworx 7.2 platform as RemoteThings? In other words how many RemoteThings a single Thingworx platform can handle in efficient way?
You should ask TW Support for this, they had done tests, also there's a connection server which purpose it's just to get all the connections in one.