Skip to content

Commit 73d8d64

Browse files
fix: bumpversion and lombok, clean up README (#56)
1 parent 6a0d65c commit 73d8d64

File tree

3 files changed

+47
-34
lines changed

3 files changed

+47
-34
lines changed

README.md

Lines changed: 45 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1+
# Java Tracer
2+
13
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/lumigo-io/java-tracer/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/lumigo-io/java-tracer/tree/master)
24
![Version](https://img.shields.io/badge/version-1.0.38-green.svg)
35
[![codecov](https://codecov.io/gh/lumigo-io/java-tracer/branch/master/graph/badge.svg?token=D3IZ5hQwaQ)](https://codecov.io/gh/lumigo-io/java-tracer)
46

57
Supported Runtimes: Java 8, Java 11
68

7-
# Building With Lumigo
8-
## Maven
9+
## Building With Lumigo
10+
11+
### Maven
12+
913
Include lumigo java tracer dependency, for [Maven](https://maven.apache.org) projects, use:
14+
1015
```xml
1116
<repositories>
1217
<repository>
@@ -29,46 +34,53 @@ Include lumigo java tracer dependency, for [Maven](https://maven.apache.org) pro
2934
<version>1.0.38</version>
3035
</dependency>
3136
```
37+
3238
Find the latest version here (the format of the version will be n.n.n):
3339

34-
# Wrapping your Lambda
40+
## Wrapping your Lambda
41+
3542
* Wrap your lambda function by implementing a supplier which contains your code
36-
```java
37-
class MyFunction implements RequestHandler<INPUT, OUTPUT> {
38-
39-
@Override
40-
public OUTPUT handleRequest(INPUT event, Context context) {
41-
Supplier<OUTPUT> supplier = () -> {
42-
//Your lambda code
43-
//return <result of type OUTPUT>;
44-
};
45-
return LumigoRequestExecutor.execute(event, context, supplier);
43+
44+
```java
45+
class MyFunction implements RequestHandler<INPUT, OUTPUT> {
46+
47+
@Override
48+
public OUTPUT handleRequest(INPUT event, Context context) {
49+
Supplier<OUTPUT> supplier = () -> {
50+
//Your lambda code
51+
//return <result of type OUTPUT>;
52+
};
53+
return LumigoRequestExecutor.execute(event, context, supplier);
54+
}
4655
}
47-
}
48-
```
56+
```
57+
4958
* For handler return void use:
5059

51-
```java
52-
class MyFunction implements RequestHandler<INPUT, Void> {
53-
54-
@Override
55-
public Void handleRequest(INPUT event, Context context) {
56-
Supplier<Void> supplier = () -> {
57-
//Your lambda code
58-
return null;
59-
};
60-
return LumigoRequestExecutor.execute(event, context, supplier);
60+
```java
61+
class MyFunction implements RequestHandler<INPUT, Void> {
62+
63+
@Override
64+
public Void handleRequest(INPUT event, Context context) {
65+
Supplier<Void> supplier = () -> {
66+
//Your lambda code
67+
return null;
68+
};
69+
return LumigoRequestExecutor.execute(event, context, supplier);
70+
}
6171
}
62-
}
63-
```
72+
```
73+
74+
### Configuration
6475

65-
## Configuration
6676
There are 2 way to pass configuration properties
6777

68-
### Environment variables
69-
Adding `LUMIGO_TRACER_TOKEN` environment variables
78+
#### Environment variables
79+
80+
Adding `LUMIGO_TRACER_TOKEN` environment variables
81+
82+
#### Static code initiation
7083

71-
### Static code initiation
7284
```java
7385
class MyFunction implements RequestHandler<String, String> {
7486

@@ -87,7 +99,7 @@ class MyFunction implements RequestHandler<String, String> {
8799
}
88100
```
89101

90-
## Java 11 Support
102+
### Java 11 Support
103+
91104
Add the environment variable `JAVA_TOOL_OPTIONS` to your Lambda functions and set it to
92105
`-Djdk.attach.allowAttachSelf=true` in addition to the manual code mentioned above.
93-

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
<dependency>
146146
<groupId>org.projectlombok</groupId>
147147
<artifactId>lombok</artifactId>
148-
<version>1.18.8</version>
148+
<version>1.18.22</version>
149149
<scope>provided</scope>
150150
</dependency>
151151
<dependency>

scripts/bd_to_prod.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ setup_git
2626
echo "Getting latest changes from git"
2727
changes=$(git log $(git describe --tags --abbrev=0)..HEAD --oneline)
2828

29+
pip install --upgrade bumpversion
2930
bumpversion patch --message "{current_version} → {new_version}. Changes: ${changes}"
3031

3132
echo "Override maven settings"

0 commit comments

Comments
 (0)