spring-boot-execution-metric-aspectj

Annotation-based execution metrics with AspectJ for spring boot 2.x applications. Prepared for Graphite.

Лицензия

Лицензия

Категории

Категории

Spring Boot Контейнер Микросервисы AspectJ Инструменты разработки Development Libraries
Группа

Группа

com.github.kuljaninemir
Идентификатор

Идентификатор

spring-boot-execution-metric-aspectj
Последняя версия

Последняя версия

1.0.12
Дата

Дата

Тип

Тип

jar
Описание

Описание

spring-boot-execution-metric-aspectj
Annotation-based execution metrics with AspectJ for spring boot 2.x applications. Prepared for Graphite.
Ссылка на сайт

Ссылка на сайт

https://github.com/kuljaninemir/spring-boot-execution-metric-aspectj
Система контроля версий

Система контроля версий

https://github.com/kuljaninemir/spring-boot-execution-metric-aspectj

Скачать spring-boot-execution-metric-aspectj

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.kuljaninemir/spring-boot-execution-metric-aspectj/ -->
<dependency>
    <groupId>com.github.kuljaninemir</groupId>
    <artifactId>spring-boot-execution-metric-aspectj</artifactId>
    <version>1.0.12</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.kuljaninemir/spring-boot-execution-metric-aspectj/
implementation 'com.github.kuljaninemir:spring-boot-execution-metric-aspectj:1.0.12'
// https://jarcasting.com/artifacts/com.github.kuljaninemir/spring-boot-execution-metric-aspectj/
implementation ("com.github.kuljaninemir:spring-boot-execution-metric-aspectj:1.0.12")
'com.github.kuljaninemir:spring-boot-execution-metric-aspectj:jar:1.0.12'
<dependency org="com.github.kuljaninemir" name="spring-boot-execution-metric-aspectj" rev="1.0.12">
  <artifact name="spring-boot-execution-metric-aspectj" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.kuljaninemir', module='spring-boot-execution-metric-aspectj', version='1.0.12')
)
libraryDependencies += "com.github.kuljaninemir" % "spring-boot-execution-metric-aspectj" % "1.0.12"
[com.github.kuljaninemir/spring-boot-execution-metric-aspectj "1.0.12"]

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
org.springframework.boot : spring-boot-starter-web jar 2.0.4.RELEASE
org.springframework.boot : spring-boot-starter-actuator jar 2.0.4.RELEASE
io.micrometer : micrometer-registry-graphite jar 1.0.6
org.aspectj : aspectjrt jar 1.8.13

test (1)

Идентификатор библиотеки Тип Версия
com.jayway.jsonpath : json-path jar 0.9.1

Модули Проекта

Данный проект не имеет модулей.

Build Status HitCount contributions welcome

Spring boot execution metric aspectj for graphite

This dependency lets you:

  • Use Spring Boot 2.x metrics with AspectJ.
  • Use one annotation to measure counter, gauge and timed data.
  • Annotate any objects, not just spring components.
  • Minimal config to export data to Graphite.
  • Configure environment and app-name on the data.

Usage

Add the following dependencies:

<dependency>
  <groupId>com.github.kuljaninemir</groupId>
  <artifactId>spring-boot-execution-metric-aspectj</artifactId>
  <version>1.0.12</version>
</dependency>
<dependency>
  <groupId>org.aspectj</groupId>
  <artifactId>aspectjweaver</artifactId>
  <version>1.8.13</version>
</dependency>

Configure aspectj-maven-plugin and set it to weave this jar:

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>aspectj-maven-plugin</artifactId>
  <version>1.11</version>
  <configuration>
    <complianceLevel>1.8</complianceLevel>
    <source>1.8</source>
    <target>1.8</target>
    <showWeaveInfo>true</showWeaveInfo>
    <verbose>true</verbose>
    <Xlint>ignore</Xlint>
    <encoding>UTF-8</encoding>
    <XnoInline>true</XnoInline>
    <proc>none</proc>
    <weaveDependencies>
      <weaveDependency>
        <groupId>com.github.kuljaninemir</groupId>
        <artifactId>spring-boot-execution-metric-aspectj</artifactId>
      </weaveDependency>
    </weaveDependencies>
  </configuration>
  <executions>
    <execution>
      <goals>
        <!-- use this goal to weave all your main classes -->
        <goal>compile</goal>
        <!-- use this goal to weave all your test classes -->
        <goal>test-compile</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Configure the properties as you like, for example:

management.metrics.export.graphite.host=localhost
management.metrics.export.graphite.port=8097
management.metrics.export.graphite.step=10s
management.metrics.export.graphite.tags-as-prefix=graphite-prefix-env,graphite-prefix-app
management.metrics.export.graphite.prefix-tag-env=dev
management.metrics.export.graphite.prefix-tag-app=myapp1
management.metrics.export.graphite.enabled=true
management.metrics.export.graphite.protocol=plaintext
management.metrics.web.server.auto-time-requests=true

Make sure you have a Configuration that scans this package:

@Configuration
@ComponentScan("com.github.kuljaninemir.springbootexecutionmetricaspectj")
public class MyConfig {
}

Compile with maven

mvn clean
mvn compile

Built With

  • Maven - Dependency Management

Versioning

I use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Версии библиотеки

Версия
1.0.12
0.0.3
0.0.1