Skip to content

Commit 993dc1e

Browse files
mashurexMustafa Ashurex
andauthored
Spring Boot Reactive Client and Spring Boot Starter (#157)
Co-authored-by: Mustafa Ashurex <[email protected]>
1 parent 4ee573e commit 993dc1e

File tree

21 files changed

+1207
-0
lines changed

21 files changed

+1207
-0
lines changed
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
#
2+
# https://help.github.com/articles/dealing-with-line-endings/
3+
#
4+
# These are explicitly windows files and should use crlf
5+
*.bat text eol=crlf
6+
7+
*.sh text eol=lf
8+
*.paw binary
9+
10+
11+
# Java sources
12+
*.java text diff=java
13+
*.gradle text diff=java
14+
*.gradle.kts text diff=java
15+
*.kts text diff=java
16+
*.kts text diff=java
17+
# These files are text and should be normalized (Convert crlf => lf)
18+
*.css text diff=css
19+
*.scss text
20+
*.df text
21+
*.htm text diff=html
22+
*.html text diff=html
23+
*.js text
24+
*.vue text
25+
*.jsp text
26+
*.jspf text
27+
*.jspx text
28+
*.properties text
29+
*.tld text
30+
*.tag text
31+
*.tagx text
32+
*.xml text
33+
34+
# These files are binary and should be left untouched
35+
# (binary is a macro for -text -diff)
36+
*.class binary
37+
*.dll binary
38+
*.ear binary
39+
*.jar binary
40+
*.so binary
41+
*.war binary
42+
43+
# Configs
44+
*.cnf text
45+
*.conf text
46+
*.config text
47+
.editorconfig text
48+
.env text
49+
.gitattributes text
50+
.gitconfig text
51+
.htaccess text
52+
*.lock text -diff
53+
package-lock.json text -diff
54+
*.toml text
55+
*.yaml text
56+
*.yml text
57+
browserslist text
58+
Makefile text
59+
makefile text
60+
61+
# Documentation
62+
*.ipynb text
63+
*.markdown text
64+
*.md text
65+
*.mdwn text
66+
*.mdown text
67+
*.mkd text
68+
*.mkdn text
69+
*.mdtxt text
70+
*.mdtext text
71+
*.txt text
72+
AUTHORS text
73+
CHANGELOG text
74+
CHANGES text
75+
CONTRIBUTING text
76+
COPYING text
77+
copyright text
78+
*COPYRIGHT* text
79+
INSTALL text
80+
license text
81+
LICENSE text
82+
NEWS text
83+
readme text
84+
*README* text
85+
TODO text
86+
87+
# Graphics
88+
*.ai binary
89+
*.bmp binary
90+
*.eps binary
91+
*.gif binary
92+
*.gifv binary
93+
*.ico binary
94+
*.jng binary
95+
*.jp2 binary
96+
*.jpg binary
97+
*.jpeg binary
98+
*.jpx binary
99+
*.jxr binary
100+
*.pdf binary
101+
*.png binary
102+
*.psb binary
103+
*.psd binary
104+
*.svg text
105+
*.svgz binary
106+
*.tif binary
107+
*.tiff binary
108+
*.wbmp binary
109+
*.webp binary
110+
111+
# Archives
112+
*.7z binary
113+
*.gz binary
114+
*.jar binary
115+
*.rar binary
116+
*.tar binary
117+
*.zip binary
118+
119+
# Fonts
120+
*.ttf binary
121+
*.eot binary
122+
*.otf binary
123+
*.woff binary
124+
*.woff2 binary
125+
126+
127+
# Ignore files (like .npmignore or .gitignore)
128+
*.*ignore text
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
!gradle/wrapper/*
2+
*.class
3+
*.log
4+
*.jar
5+
target/
6+
dist/
7+
.idea/
8+
*.iml
9+
TEST*.xml
10+
.DS_Store
11+
Thumbs.db
12+
*.app
13+
*.exe
14+
*.war
15+
.gradle
16+
build
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--add-opens java.base/java.lang=ALL-UNNAMED
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Metlo spring-boot-reactive-starter
2+
3+
Basic Spring Boot starter to automatically capture ServerWebExchange request and response traces.
4+
5+
## Quickstart
6+
7+
compile and install:
8+
```shell
9+
mvn clean install
10+
```
11+
12+
maven dependency:
13+
```xml
14+
<dependency>
15+
<groupId>com.metlo</groupId>
16+
<artifactId>spring-boot-reactive-starter</artifactId>
17+
<version>0.3</version>
18+
</dependency>
19+
```
20+
21+
## Spring Boot Properties
22+
```yaml
23+
metlo:
24+
# Enable Metlo request and response tracing.
25+
enabled: true
26+
# The maximum number of threads to use for asynchronous communication.
27+
thread-pool-size: 2
28+
# The maximum number of trace requests per second to capture, -1 means unlimited.
29+
requests-per-second: -1
30+
# The Metlo connection API key to use for authorization.
31+
api-key: <your api key>
32+
# The Metlo API host URL to send traces to.
33+
host: https://app.metlo.com:8081
34+
# Case-insensitive collection of field names to omit from headers, bodies, and query arguments.
35+
protected-keys:
36+
- password
37+
- apiKey
38+
- secret
39+
# Log trace requests to application logs.
40+
log-requests: false
41+
# Manually set the instance hostname for tracing.
42+
hostname: null
43+
```
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
######
3+
# Run KtLint Format on all project modules
4+
######
5+
6+
mvn com.github.gantsign.maven:ktlint-maven-plugin:format
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<name>spring-reactive-parent</name>
8+
<groupId>com.metlo</groupId>
9+
<artifactId>spring-reactive-parent</artifactId>
10+
<version>0.3</version>
11+
<packaging>pom</packaging>
12+
13+
<url>https://www.github.com/metlo-labs/metlo</url>
14+
<description>Reactive Spring Agent for Metlo</description>
15+
<licenses>
16+
<license>
17+
<name>MIT License</name>
18+
<url>https://www.opensource.org/licenses/mit-license.php</url>
19+
</license>
20+
</licenses>
21+
<developers>
22+
<developer>
23+
<name>Mustafa Ashurex</name>
24+
<email>[email protected]</email>
25+
<organization>com.cordiance</organization>
26+
<organizationUrl>https://www.cordiance.com</organizationUrl>
27+
</developer>
28+
</developers>
29+
<scm>
30+
<connection>scm:git:git://github.com/metlo-labs/metlo.git</connection>
31+
<developerConnection>scm:git:ssh://github.com:metlo-labs/metlo.git</developerConnection>
32+
<url>https://github.com/metlo-labs/metlo</url>
33+
</scm>
34+
35+
<properties>
36+
<maven.compiler.source>17</maven.compiler.source>
37+
<maven.compiler.target>17</maven.compiler.target>
38+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
39+
<kotlin.version>1.7.21</kotlin.version>
40+
<spring-boot.version>2.7.3</spring-boot.version>
41+
<spring.version>5.3.22</spring.version>
42+
</properties>
43+
44+
<modules>
45+
<module>spring-reactive-client</module>
46+
<module>spring-boot-reactive-starter</module>
47+
</modules>
48+
49+
<dependencyManagement>
50+
<dependencies>
51+
<dependency>
52+
<groupId>org.jetbrains.kotlin</groupId>
53+
<artifactId>kotlin-stdlib</artifactId>
54+
<version>${kotlin.version}</version>
55+
</dependency>
56+
<dependency>
57+
<groupId>io.github.microutils</groupId>
58+
<artifactId>kotlin-logging-jvm</artifactId>
59+
<version>3.0.4</version>
60+
</dependency>
61+
<dependency>
62+
<groupId>com.google.code.gson</groupId>
63+
<artifactId>gson</artifactId>
64+
<version>2.10</version>
65+
</dependency>
66+
<dependency>
67+
<groupId>org.springframework.boot</groupId>
68+
<artifactId>spring-boot-autoconfigure</artifactId>
69+
<version>${spring-boot.version}</version>
70+
</dependency>
71+
<dependency>
72+
<groupId>org.springframework.boot</groupId>
73+
<artifactId>spring-boot</artifactId>
74+
<version>${spring-boot.version}</version>
75+
</dependency>
76+
<dependency>
77+
<groupId>org.springframework</groupId>
78+
<artifactId>spring-context</artifactId>
79+
<version>${spring.version}</version>
80+
</dependency>
81+
<dependency>
82+
<groupId>org.springframework</groupId>
83+
<artifactId>spring-web</artifactId>
84+
<version>${spring.version}</version>
85+
</dependency>
86+
<dependency>
87+
<groupId>org.springframework</groupId>
88+
<artifactId>spring-webflux</artifactId>
89+
<version>${spring.version}</version>
90+
</dependency>
91+
</dependencies>
92+
</dependencyManagement>
93+
<build>
94+
<pluginManagement>
95+
<plugins>
96+
<plugin>
97+
<groupId>org.apache.maven.plugins</groupId>
98+
<artifactId>maven-install-plugin</artifactId>
99+
<version>3.1.0</version>
100+
</plugin>
101+
<plugin>
102+
<groupId>org.apache.maven.plugins</groupId>
103+
<artifactId>maven-source-plugin</artifactId>
104+
<version>2.2.1</version>
105+
<executions>
106+
<execution>
107+
<id>attach-sources</id>
108+
<goals>
109+
<goal>jar-no-fork</goal>
110+
</goals>
111+
</execution>
112+
</executions>
113+
</plugin>
114+
<plugin>
115+
<groupId>org.jetbrains.kotlin</groupId>
116+
<artifactId>kotlin-maven-plugin</artifactId>
117+
<version>${kotlin.version}</version>
118+
<configuration>
119+
<args>
120+
<arg>-Xjsr305=strict</arg>
121+
</args>
122+
</configuration>
123+
<executions>
124+
<execution>
125+
<id>compile</id>
126+
<phase>compile</phase>
127+
<goals>
128+
<goal>compile</goal>
129+
</goals>
130+
</execution>
131+
<execution>
132+
<id>test-compile</id>
133+
<phase>test-compile</phase>
134+
<goals>
135+
<goal>test-compile</goal>
136+
</goals>
137+
</execution>
138+
</executions>
139+
</plugin>
140+
<plugin>
141+
<groupId>org.apache.maven.plugins</groupId>
142+
<artifactId>maven-resources-plugin</artifactId>
143+
<version>3.3.0</version>
144+
<configuration>
145+
<encoding>UTF-8</encoding>
146+
</configuration>
147+
</plugin>
148+
<plugin>
149+
<groupId>com.github.gantsign.maven</groupId>
150+
<artifactId>ktlint-maven-plugin</artifactId>
151+
<version>1.15.2</version>
152+
<executions>
153+
<execution>
154+
<id>check</id>
155+
<phase>compile</phase>
156+
<goals>
157+
<goal>check</goal>
158+
</goals>
159+
</execution>
160+
</executions>
161+
</plugin>
162+
</plugins>
163+
</pluginManagement>
164+
<plugins>
165+
<plugin>
166+
<groupId>org.apache.maven.plugins</groupId>
167+
<artifactId>maven-install-plugin</artifactId>
168+
</plugin>
169+
</plugins>
170+
</build>
171+
</project>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--add-opens java.base/java.lang=ALL-UNNAMED

0 commit comments

Comments
 (0)