Skip to content

Commit c5bdc31

Browse files
committed
Update README
1 parent 9e803c2 commit c5bdc31

1 file changed

Lines changed: 87 additions & 73 deletions

File tree

README.md

Lines changed: 87 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,96 @@
11
# Datasource Micrometer
2+
23
[![CI](https://github.com/jdbc-observations/datasource-micrometer/actions/workflows/ci.yml/badge.svg)](https://github.com/jdbc-observations/datasource-micrometer/actions/workflows/ci.yml?event=push&branch=main)
34
[![Maven Central](https://img.shields.io/maven-central/v/net.ttddyy.observation/datasource-micrometer)](https://central.sonatype.com/artifact/net.ttddyy.observation/datasource-micrometer)
45

5-
The Datasource Micrometer provides [Micrometer Observation API][micrometer-observation] instrumentation for JDBC operations.
6+
**Datasource Micrometer** adds [Micrometer Observation API][micrometer-observation] instrumentation for JDBC operations.
67

78
[micrometer-observation]: https://docs.micrometer.io/micrometer/reference/observation.html
89

10+
---
11+
912
## Modules
1013

11-
**datasource-micrometer**
12-
Micrometer observability instrumentation for JDBC DataSource.
14+
| Module | Purpose |
15+
|-----------------------------------------|-----------------------------------------------------------------|
16+
| **datasource-micrometer** | Micrometer observability instrumentation for JDBC `DataSource`. |
17+
| **datasource-micrometer-opentelemetry** | OpenTelemetry semantic conventions support. |
18+
| **datasource-micrometer-spring-boot** | Spring Boot auto-configuration and related support. |
19+
| **datasource-micrometer-bom** | Bill of Materials (BOM) for aligned versions of all modules. |
1320

14-
**datasource-micrometer-opentelemetry**
15-
OpenTelemetry Semantic Conventions support.
21+
---
1622

17-
**datasource-micrometer-spring-boot**
18-
Spring Boot support (auto-configurations, etc) for micrometer observability.
23+
## Dependencies
1924

20-
**datasource-micrometer-bom**
21-
Bill of Materials(BOM) for Datasource Micrometer modules.
25+
Replace `...` with the [version from Maven Central](https://central.sonatype.com/artifact/net.ttddyy.observation/datasource-micrometer).
2226

27+
### datasource-micrometer
2328

24-
### Dependency Settings
25-
**datasource-micrometer**
29+
**Maven**
2630

2731
```xml
28-
<!-- Maven -->
2932
<dependency>
3033
<groupId>net.ttddyy.observation</groupId>
3134
<artifactId>datasource-micrometer</artifactId>
3235
<version>...</version>
3336
</dependency>
3437
```
3538

39+
**Gradle**
40+
3641
```groovy
37-
// Gradle
3842
dependencies {
3943
implementation "net.ttddyy.observation:datasource-micrometer:..."
4044
}
4145
```
42-
**datasource-micrometer-opentelemetry**
46+
47+
### datasource-micrometer-opentelemetry
48+
49+
**Maven**
50+
4351
```xml
44-
<!-- Maven -->
4552
<dependency>
4653
<groupId>net.ttddyy.observation</groupId>
4754
<artifactId>datasource-micrometer-opentelemetry</artifactId>
4855
<version>...</version>
4956
</dependency>
5057
```
58+
59+
**Gradle**
60+
5161
```groovy
52-
// Gradle
5362
dependencies {
5463
implementation "net.ttddyy.observation:datasource-micrometer-opentelemetry:..."
5564
}
5665
```
5766

58-
**datasource-micrometer-spring-boot**
67+
### datasource-micrometer-spring-boot
68+
69+
**Maven**
5970

6071
```xml
61-
<!-- Maven -->
6272
<dependency>
6373
<groupId>net.ttddyy.observation</groupId>
6474
<artifactId>datasource-micrometer-spring-boot</artifactId>
6575
<version>...</version>
6676
</dependency>
6777
```
78+
79+
**Gradle**
80+
6881
```groovy
69-
// Gradle
7082
dependencies {
7183
implementation "net.ttddyy.observation:datasource-micrometer-spring-boot:..."
7284
}
7385
```
7486

75-
**datasource-micrometer-bom**
87+
### datasource-micrometer-bom
88+
89+
Import the BOM to align transitive versions (optional but recommended when you use multiple artifacts).
90+
91+
**Maven**
7692

7793
```xml
78-
<!-- Maven -->
7994
<dependencyManagement>
8095
<dependencies>
8196
<dependency>
@@ -88,19 +103,24 @@ dependencies {
88103
</dependencies>
89104
</dependencyManagement>
90105
```
106+
107+
**Gradle**
108+
91109
```groovy
92-
// Gradle
93110
dependencies {
94111
implementation platform("net.ttddyy.observation:datasource-micrometer-bom:...")
95112
}
96113
```
97114

98-
### Using Snapshot
115+
---
116+
117+
## Snapshot releases
118+
119+
Add the Maven Central Portal Snapshots repository, then use a snapshot version as usual.
99120

100-
To use snapshot releases, add the Maven Central Portal Snapshots repository to your project configuration.
121+
**Maven**
101122

102123
```xml
103-
<!-- Maven -->
104124
<repositories>
105125
<repository>
106126
<name>Central Portal Snapshots</name>
@@ -116,42 +136,46 @@ To use snapshot releases, add the Maven Central Portal Snapshots repository to y
116136
</repositories>
117137
```
118138

139+
**Gradle**
140+
119141
```groovy
120-
// Gradle
121142
repositories {
122143
maven {
123144
name = 'Central Portal Snapshots'
124145
url = 'https://central.sonatype.com/repository/maven-snapshots/'
125146
126-
// Only search this repository for the specific dependency
147+
// Only resolve datasource-micrometer artifacts from this repo
127148
content {
128149
includeModule("net.ttddyy.observation", "<datasource-micrometer artifacts>")
129150
}
130151
}
131152
mavenCentral()
132153
}
133154
```
134-
For full instructions, see [the official documentation.](https://central.sonatype.org/publish/publish-portal-snapshots/#consuming-snapshot-releases-for-your-project)
155+
156+
Full setup details: [Consuming snapshot releases](https://central.sonatype.org/publish/publish-portal-snapshots/#consuming-snapshot-releases-for-your-project) (Sonatype).
157+
158+
---
135159

136160
## Java versions
137161

138-
The produced jars support following JDK versions at runtime:
162+
Runtime JDK requirements by artifact:
163+
164+
| Artifact | JDK |
165+
|-------------------------------------|----------------------------------------|
166+
| `datasource-micrometer` | **8+** (aligned with Micrometer 1.x) |
167+
| `datasource-micrometer-spring-boot` | **17+** (aligned with Spring Boot 3.x) |
139168

140-
- `datasource-micrometer`: Java 8+ to match with micrometer 1.x java baseline.
141-
- `datasource-micrometer-spring-boot`: Java 17+ to match with Spring Boot 3.x java baseline.
169+
---
142170

143171
## Documentation
144172

145-
- Current release
146-
- [Reference Doc.][reference-current]
147-
- [API Doc.][javadoc-current]
148-
- [Changelog][changelog-current]
149-
- Snapshot
150-
- [Reference Doc.][reference-snapshot]
151-
- [API Doc.][javadoc-snapshot]
152-
- [Changelog][changelog-snapshot]
153-
- Other versions (TBD)
173+
| Channel | Reference | API | Changelog |
174+
|---------------------|----------------------------|-----------------------------|---------------------------------|
175+
| **Current release** | [HTML][reference-current] | [Javadoc][javadoc-current] | [CHANGELOG][changelog-current] |
176+
| **Snapshot** | [HTML][reference-snapshot] | [Javadoc][javadoc-snapshot] | [CHANGELOG][changelog-snapshot] |
154177

178+
Other versions: *TBD.*
155179

156180
[reference-current]: https://jdbc-observations.github.io/datasource-micrometer/docs/current/docs/html
157181
[reference-snapshot]: https://jdbc-observations.github.io/datasource-micrometer/docs/current-snapshot/docs/html
@@ -160,46 +184,36 @@ The produced jars support following JDK versions at runtime:
160184
[changelog-current]: https://jdbc-observations.github.io/datasource-micrometer/docs/current/CHANGELOG.txt
161185
[changelog-snapshot]: https://jdbc-observations.github.io/datasource-micrometer/docs/current-snapshot/CHANGELOG.txt
162186

163-
## Dependent Library Versions
187+
---
164188

165-
Spring Boot Support:
189+
## Compatible versions
166190

167-
| DataSource Micrometer | Spring Boot |
191+
### Spring Boot (summary)
192+
193+
| Datasource Micrometer | Spring Boot |
168194
|:---------------------:|:-----------:|
169-
| `2.x` | 4.x |
170-
| `1.x` | 3.x |
195+
| 2.x | 4.x |
196+
| 1.x | 3.x |
171197

198+
### Spring Boot, Micrometer BOM, and Micrometer Tracing BOM
172199

173-
| DataSource Micrometer | Spring Boot | Micrometer Tracing BOM | Micrometer BOM |
200+
| Datasource Micrometer | Spring Boot | Micrometer Tracing BOM | Micrometer BOM |
174201
|:---------------------:|:----------------:|:----------------------:|:--------------:|
175-
| `2.x` | 4.x | 1.6.x | 1.16.x |
176-
| `2.0.0-RC1` | 4.0.0-[M3,R1,R2] | 1.6.0-[M3,R1] | 1.16.0-[M3,R1] |
177-
| `1.0.0` | 3.0.0 and up | 1.0.0 | 1.10.2 |
178-
| `1.0.0-RC1` | 3.0.0-RC1 | 1.0.0-RC1 | 1.10.0-RC1 |
179-
| `1.0.0-M1` | 3.0.0-M6 | 1.0.0-M8 | 1.10.0-M5 |
180-
181-
## Development
182-
183-
To build the entire project, JDK-17 is required.
202+
| 2.x | 4.x | 1.6.x | 1.16.x |
203+
| 2.0.0-RC1 | 4.0.0-[M3,R1,R2] | 1.6.0-[M3,R1] | 1.16.0-[M3,R1] |
204+
| 1.0.0 | 3.0.0 and up | 1.0.0 | 1.10.2 |
205+
| 1.0.0-RC1 | 3.0.0-RC1 | 1.0.0-RC1 | 1.10.0-RC1 |
206+
| 1.0.0-M1 | 3.0.0-M6 | 1.0.0-M8 | 1.10.0-M5 |
184207

185-
```shell
186-
./mvnw install
187-
```
188-
189-
### Building document
190-
191-
```shell
192-
./mvnw install -Pdocs -pl docs
193-
```
208+
---
194209

195-
### Building javadoc
196-
197-
```shell
198-
./mvnw javadoc:aggregate
199-
```
210+
## Development
200211

201-
### Apply Source Code Format
212+
JDK **17** is required to build the project.
202213

203-
```shell
204-
./mvnw spring-javaformat:apply
205-
```
214+
| Task | Command |
215+
|--------------------------|----------------------------------|
216+
| Full build | `./mvnw install` |
217+
| Documentation site | `./mvnw install -Pdocs -pl docs` |
218+
| Aggregated Javadoc | `./mvnw javadoc:aggregate` |
219+
| Apply source formatting | `./mvnw spring-javaformat:apply` |

0 commit comments

Comments
 (0)