Dynatrace automatically detects event-based message queue handlers. To get insight into applications using non-standard or non-event-based message queue handlers, you must first define a custom messaging service for your consumers.
To define a custom messaging service for your consumers
Go to Settings > Service detection > Custom service detection.
Select whether your messaging service is based on Java, .NET, or Node.js, and then select Define messaging service.
Define the name of your messaging service, choose your messaging technology from the list, and then select Find entry point.
Select the process that contains your entry point from the list and select Continue.
Find the class you want to instrument, select the required class or file, and select Continue.
Java .NET To instrument the class, you can
Node.js Select the file containing the custom service. Dynatrace presents a list of methods that can be used as a custom service. Select the desired method to complete the configuration.
Select the methods you want to instrument and select Finish.
See the requirements for Apache Kafka in the section below.
The Define custom service page displays the newly added entry point and methods.
optional Add more entry points if needed.
optional Restrict the new custom service to certain process groups. See the Restrict a custom service to specific process groups section below.
Review the entry point and methods to be instrumented.
In the lower-right corner of the page, select Save.
.NET Node.js Restart your consumer application so that the custom messaging service can be detected.
Custom messaging services for Apache Kafka must define a method in your code that is responsible for processing a single Kafka message. Only such methods can be used as an entry point for Kafka messaging services.
If you have several custom services defined, the evaluation goes from top to bottom, applying the first matching rule. If for some reason you have the same class and method defined in several custom services, make sure to prioritize the services accordingly.
You can edit any custom service at any time. For changes to take effect, you need to restart the affected processes, unless real-time updates are activated for Java and PHP. For .NET and Node.js, you must restart the process.
To edit a custom service, select the service's Edit button in the list of services. You can
Updates to Java and PHP custom messaging services can be applied in near real time, without process restarts. To activate this feature, go to Settings > Server-side service detection > Deep monitoring > Real-time updates to Java and PHP services and enable the dedicated switches.
Note that with real-time updates, you do not need to restart processes; however, such updates might cause CPU spikes when deployed.
You can restrict usage of any custom service to certain process groups. Custom service rules apply in specified process groups only and are ignored in other process groups. You can restrict a custom service when you create it or edit it.
To restrict a custom service