The present disclosure relates to methods of metering, and in particular to methods of metering activities of applications in distributed networks. More particular, the disclosure concerns a method for metering the operation of distributed Internet of Things, IoT devices. This disclosure relates to a method for metering activities of an application in a data processing system, wherein said data processing system comprises resource nodes configured to perform activities executed as actors in the respective resource nodes; and wherein the actors are controlled by one or more runtimes in the data processing system. The method comprises tracing, by a runtime, information related to activities executed by actors controlled by the runtime, and metering, by the runtime, the operation of the application based on the part of the traced information, which is related to activities of actors being used by the metered application. Furthermore, the disclosure relates to corresponding apparatuses and computer programs.