Skip to main content

Microservices

How it works#

We introduced such a concept as a service group. A service group is an agent set of microservice applications. To combine agents into a service group, you need to add only one more parameter to start the agent - groupId.

After that, your application looks like a monolith for testing with Drill4J and you need to use groupId instead of agentId for autotests here.

Chrome browser extension detects service groups automatically.

Docker-compose file for your application may look like this:

version: '2'
services:
some-non-jvm-service:
image: repo/some-non-jvm-service:3.1.0
ports:
- 8082:8082
some-jvm-service-one:
image: repo/some-jvm-service-two:0.1.0
ports:
- 8080:8080
volumes:
- ./distr:/data
environment:
- JAVA_OPTS=-agentpath:/data/libdrill_agent.so=drillInstallationDir=/data,adminAddress=host.docker.internal:8090,agentId=service-one,groupId=app,buildVersion=0.1.0,logLevel=INFO
some-jvm-service-two:
image: repo/some-jvm-service-one:0.2.1
ports:
- 8081:8081
volumes:
- ./distr:/data
environment:
- JAVA_OPTS=-agentpath:/data/libdrill_agent.so=drillInstallationDir=/data,adminAddress=host.docker.internal:8090,agentId=service-two,groupId=app,buildVersion=0.2.1,logLevel=INFO

After launching the application you can see your Microservice app in Drill Admin: