camunda / camunda-bpm-platform

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.
https://camunda.com/
Apache License 2.0
4.14k stars 1.57k forks source link

Integrate Camunda metrics into Spring Boot Actuator registry #2771

Open ThorbenLindhauer opened 2 years ago

ThorbenLindhauer commented 2 years ago

This issue was imported from JIRA:

Field Value
JIRA Link CAM-14729
Reporter @tmetzke
Has restricted visibility comments true

User Story (Required on creation):

Functional Requirements (Required before implementation):

Technical Requirements (Required before implementation):

Limitations of Scope (Optional):

Hints (optional):

Links:

### camunda-bpm-platform PR
- [ ] https://github.com/camunda/camunda-bpm-platform/pull/4519
### camunda-docs-manual PR
punitdarira commented 4 months ago

Hi @ThorbenLindhauer! I've drafted a PR. For now all the metrics are at the root level. I feel we should only expose Camunda metrics in actuator when it's enabled via properties or other means. What do you think? image image

psavidis commented 4 months ago

Hello @punitdarira ,

Thank you for considering this contribution. Can i ask you to provide me with the steps you followed to test your code?

Petros

punitdarira commented 4 months ago

@psavidis , First I built the project of camunda-bpm-spring-boot-starter using mvn clean install -Dmaven.test.skip=true Then I ran camunda-bpm-spring-boot-starter-rest using mvn clean spring-boot:run

We still have few things to implement like

psavidis commented 3 months ago

Hey @punitdarira,

Exactly, you can continue with the above contributions if you wish.

psavidis commented 3 months ago

@psavidis , First I built the project of camunda-bpm-spring-boot-starter using mvn clean install -Dmaven.test.skip=true Then I ran camunda-bpm-spring-boot-starter-rest using mvn clean spring-boot:run

We still have few things to implement like

  • [ ] Taking the time interval for pushing the metrics in the registry from the user.
  • [ ] Maybe making this whole feature disabled by default and only enabling when the property is set?
  • [ ] Documentation

I've tried to use your suggestion on running the spring boot maven plugin in the camunda-bpm-spring-boot-starter-rest and i'm getting a failure:

[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:3.2.2:run (default-cli) on project camunda-bpm-spring-boot-starter-rest: Unable to find a suitable main class, please add a 'mainClass' property -> [Help 1]

punitdarira commented 3 months ago

@psavidis , First I built the project of camunda-bpm-spring-boot-starter using mvn clean install -Dmaven.test.skip=true Then I ran camunda-bpm-spring-boot-starter-rest using mvn clean spring-boot:run We still have few things to implement like

  • [ ] Taking the time interval for pushing the metrics in the registry from the user.
  • [ ] Maybe making this whole feature disabled by default and only enabling when the property is set?
  • [ ] Documentation

I've tried to use your suggestion on running the spring boot maven plugin in the camunda-bpm-spring-boot-starter-rest and i'm getting a failure:

[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:3.2.2:run (default-cli) on project camunda-bpm-spring-boot-starter-rest: Unable to find a suitable main class, please add a 'mainClass' property -> [Help 1]

Sorry I missed mentioning that I added a Main.java in camunda-bpm-spring-boot-starter-rest. This is a simple Main.java package org.camunda.bpm.spring.boot.starter.rest;

import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication public class Main { public static void main(String... args) { SpringApplication.run(Main.class, args); } }

I also changed the scope of com.h2database.h2 from test to compile in pom.xml of camunda-bpm-spring-boot-starter-rest project.

punitdarira commented 3 months ago

Hi @psavidis , Added changes for pickup up interval seconds from properties file

psavidis commented 3 months ago

Hello @punitdarira,

The analysis of this ticket is still on going by the team. When the last details are finalised, i will update this thread with the technical proposal and the decision making thread to make it transparent to you as well.

Till then, i'd recommend to pause the code contribution so that you don't make changes that might be reverted later.

Kind regards, Petros