Skip to content

Commit e270a1e

Browse files
committed
Merge branch 'develop' into update-from-template-merged
2 parents b0a5ee4 + 3c71d2f commit e270a1e

File tree

19 files changed

+469
-111
lines changed

19 files changed

+469
-111
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ body:
1515
attributes:
1616
label: "Checklist"
1717
options:
18-
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/template-placeholder/releases/latest)"
18+
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/prometheus-metrics-exposition-formats-no-protobuf/releases/latest)"
1919
required: true
20-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
20+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/prometheus-metrics-exposition-formats-no-protobuf/issues) or [closed](https://github.com/xdev-software/prometheus-metrics-exposition-formats-no-protobuf/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
2121
required: true
2222
- label: "I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise."
2323
required: true

.github/ISSUE_TEMPLATE/enhancement.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ body:
1313
attributes:
1414
label: "Checklist"
1515
options:
16-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
16+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/prometheus-metrics-exposition-formats-no-protobuf/issues) or [closed](https://github.com/xdev-software/prometheus-metrics-exposition-formats-no-protobuf/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
1717
required: true
1818
- label: "I have taken the time to fill in all the required details. I understand that the feature request will be dismissed otherwise."
1919
required: true

.github/ISSUE_TEMPLATE/question.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ body:
1212
attributes:
1313
label: "Checklist"
1414
options:
15-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
15+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/prometheus-metrics-exposition-formats-no-protobuf/issues) or [closed](https://github.com/xdev-software/prometheus-metrics-exposition-formats-no-protobuf/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
1616
required: true
1717
- label: "I have taken the time to fill in all the required details. I understand that the question will be dismissed otherwise."
1818
required: true

.run/Run Demo.run.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Run Demo" type="Application" factoryName="Application">
33
<option name="MAIN_CLASS_NAME" value="software.xdev.Application" />
4-
<module name="template-placeholder-demo" />
4+
<module name="prometheus-metrics-exposition-formats-no-protobuf-demo" />
55
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
66
<extension name="coverage">
77
<pattern>

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# 3.0.1
2+
* Migrated deployment to _Sonatype Maven Central Portal_ [#155](https://github.com/xdev-software/standard-maven-template/issues/155)
3+
* Updated dependencies
4+
5+
# 3.0.0
6+
* In theory the library is [no longer required](https://prometheus.github.io/client_java/exporters/formats/#exclude-protobuf-exposition-format), however [there are still some problems with how the changes have been implemented upstream](https://github.com/xdev-software/prometheus-metrics-exposition-formats-no-protobuf/issues/27).
7+
* Library now completely removes protobuf functionality
8+
* ``PrometheusProtobufWriter`` is no longer loaded in the first place
9+
* Removed shading once again
10+
11+
# 2.0.0
12+
* Make exclusion work in ``prometheus-metrics-exposition-formats`` 1.3.2+ #3
13+
* ``prometheus-metrics-exposition-formats`` is now directly included using shading
14+
* All protobuf code is removed during shading
15+
* This is a workaround until https://github.com/prometheus/client_java/pull/1190 is merged
16+
17+
# 1.0.0
18+
_Initial release_

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ You should have the following things installed:
3434
* Ensure that the JDK/Java-Version is correct
3535

3636

37-
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/template-placeholder/release.yml?branch=master)](https://github.com/xdev-software/template-placeholder/actions/workflows/release.yml)
37+
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/prometheus-metrics-exposition-formats-no-protobuf/release.yml?branch=master)](https://github.com/xdev-software/prometheus-metrics-exposition-formats-no-protobuf/actions/workflows/release.yml)
3838

3939
Before releasing:
40-
* Consider doing a [test-deployment](https://github.com/xdev-software/template-placeholder/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
40+
* Consider doing a [test-deployment](https://github.com/xdev-software/prometheus-metrics-exposition-formats-no-protobuf/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
4141
* Check the [changelog](CHANGELOG.md)
4242

4343
If the ``develop`` is ready for release, create a pull request to the ``master``-Branch and merge the changes

README.md

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,69 @@
1-
[![Latest version](https://img.shields.io/maven-central/v/software.xdev/template-placeholder?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/template-placeholder)
2-
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/template-placeholder/check-build.yml?branch=develop)](https://github.com/xdev-software/template-placeholder/actions/workflows/check-build.yml?query=branch%3Adevelop)
1+
[![Latest version](https://img.shields.io/maven-central/v/software.xdev/prometheus-metrics-exposition-formats-no-protobuf?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/prometheus-metrics-exposition-formats-no-protobuf)
2+
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/prometheus-metrics-exposition-formats-no-protobuf/check-build.yml?branch=develop)](https://github.com/xdev-software/prometheus-metrics-exposition-formats-no-protobuf/actions/workflows/check-build.yml?query=branch%3Adevelop)
33

4-
# template-placeholder
4+
# prometheus-metrics-exposition-formats-no-protobuf
55

6+
Reconfigures [prometheus-metrics-exposition-formats](https://github.com/prometheus/client_java) to remove [protobuf](https://github.com/protocolbuffers/protobuf).
7+
8+
This module is designed to integrate with [Spring Boot Actuator (Prometheus)](https://docs.spring.io/spring-boot/api/rest/actuator/prometheus.html) or similar services.
9+
10+
### Why remove Protobuf?
11+
12+
1. [Prometheus Protobuf format is obsolete/experimental](https://github.com/prometheus/docs/blob/432c621b67906c7cbfcfc293853017d762201ccf/docs/instrumenting/exposition_formats.md#protobuf-format), the chance that it's used is near 0
13+
2. The additional library can result in additional attack vectors. For example in [CVE-2024-7254](https://github.com/protocolbuffers/protobuf/security/advisories/GHSA-735f-pc8j-v9w8)
14+
* If the dependency is [reshaded](https://maven.apache.org/plugins/maven-shade-plugin/) it may not be detected by vulnerability scanners (as is the case in ``io.prometheus:prometheus-metrics-exposition-formats <= 1.3.1``)
15+
3. The protobuf dependency is huge (around 10x bigger) in comparison to the other libraries
16+
17+
_See also [prometheus/client_java#1173](https://github.com/prometheus/client_java/issues/1173)_
618

719
## Installation
8-
[Installation guide for the latest release](https://github.com/xdev-software/template-placeholder/releases/latest#Installation)
20+
[Installation guide for the latest release](https://github.com/xdev-software/prometheus-metrics-exposition-formats-no-protobuf/releases/latest#Installation)
21+
22+
### Compatibility with ``io.prometheus:prometheus-metrics-exposition-formats``
23+
24+
| ``io.prometheus:prometheus-metrics-exposition-formats`` version | ``prometheus-metrics-exposition-formats-no-protobuf`` version |
25+
| --- | --- |
26+
| 1.3.4+ | [``3`` (optional)](./CHANGELOG.md#300) |
27+
| 1.3.2+ | ``2`` |
28+
| < 1.3.2 | ``1`` |
29+
30+
### Spring Boot Actuator
31+
32+
```xml
33+
<dependencyManagement>
34+
<dependencies>
35+
<dependency>
36+
<groupId>org.springframework.boot</groupId>
37+
<artifactId>spring-boot-dependencies</artifactId>
38+
<version>...</version>
39+
<type>pom</type>
40+
<scope>import</scope>
41+
</dependency>
42+
</dependencies>
43+
</dependencyManagement>
44+
45+
<dependencies>
46+
<dependency>
47+
<groupId>software.xdev</groupId>
48+
<artifactId>prometheus-metrics-exposition-formats-no-protobuf</artifactId>
49+
<version>...</version>
50+
<scope>runtime</scope>
51+
</dependency>
52+
53+
<dependency>
54+
<groupId>io.micrometer</groupId>
55+
<artifactId>micrometer-registry-prometheus</artifactId>
56+
<exclusions>
57+
<!-- Exclude default module so that dependency is properly removed -->
58+
<exclusion>
59+
<groupId>io.prometheus</groupId>
60+
<artifactId>prometheus-metrics-exposition-formats</artifactId>
61+
</exclusion>
62+
</exclusions>
63+
<scope>runtime</scope>
64+
</dependency>
65+
</dependencies>
66+
```
967

1068
## Support
1169
If you need support as soon as possible and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services/support).
@@ -14,4 +72,4 @@ If you need support as soon as possible and you can't wait for any pull request,
1472
See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project.
1573

1674
## Dependencies and Licenses
17-
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/template-placeholder/dependencies)
75+
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/prometheus-metrics-exposition-formats-no-protobuf/dependencies)

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## Reporting a Vulnerability
44

5-
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/template-placeholder/security/advisories/new).
5+
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/prometheus-metrics-exposition-formats-no-protobuf/security/advisories/new).

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<modelVersion>4.0.0</modelVersion>
66

77
<groupId>software.xdev</groupId>
8-
<artifactId>template-placeholder-root</artifactId>
9-
<version>1.0.0-SNAPSHOT</version>
8+
<artifactId>prometheus-metrics-exposition-formats-no-protobuf-root</artifactId>
9+
<version>3.0.2-SNAPSHOT</version>
1010
<packaging>pom</packaging>
1111

1212
<organization>
@@ -15,8 +15,8 @@
1515
</organization>
1616

1717
<modules>
18-
<module>template-placeholder</module>
19-
<module>template-placeholder-demo</module>
18+
<module>prometheus-metrics-exposition-formats-no-protobuf</module>
19+
<module>prometheus-metrics-exposition-formats-no-protobuf-demo</module>
2020
</modules>
2121

2222
<properties>
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
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+
<parent>
8+
<groupId>software.xdev</groupId>
9+
<artifactId>prometheus-metrics-exposition-formats-no-protobuf-root</artifactId>
10+
<version>3.0.2-SNAPSHOT</version>
11+
</parent>
12+
13+
<artifactId>prometheus-metrics-exposition-formats-no-protobuf-demo</artifactId>
14+
<version>3.0.2-SNAPSHOT</version>
15+
<packaging>jar</packaging>
16+
17+
<organization>
18+
<name>XDEV Software</name>
19+
<url>https://xdev.software</url>
20+
</organization>
21+
22+
<properties>
23+
<javaVersion>17</javaVersion>
24+
<maven.compiler.release>${javaVersion}</maven.compiler.release>
25+
26+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
27+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
28+
29+
<mainClass>software.xdev.Application</mainClass>
30+
31+
<org.springframework.boot.version>3.5.6</org.springframework.boot.version>
32+
</properties>
33+
34+
<dependencyManagement>
35+
<dependencies>
36+
<dependency>
37+
<groupId>org.springframework.boot</groupId>
38+
<artifactId>spring-boot-dependencies</artifactId>
39+
<version>${org.springframework.boot.version}</version>
40+
<type>pom</type>
41+
<scope>import</scope>
42+
</dependency>
43+
</dependencies>
44+
</dependencyManagement>
45+
46+
<dependencies>
47+
<dependency>
48+
<groupId>software.xdev</groupId>
49+
<artifactId>prometheus-metrics-exposition-formats-no-protobuf</artifactId>
50+
<version>${project.version}</version>
51+
<scope>runtime</scope>
52+
</dependency>
53+
54+
<dependency>
55+
<groupId>org.springframework.boot</groupId>
56+
<artifactId>spring-boot-starter-web</artifactId>
57+
</dependency>
58+
<dependency>
59+
<groupId>org.springframework.boot</groupId>
60+
<artifactId>spring-boot-starter-actuator</artifactId>
61+
</dependency>
62+
63+
<dependency>
64+
<groupId>io.micrometer</groupId>
65+
<artifactId>micrometer-registry-prometheus</artifactId>
66+
<exclusions>
67+
<!-- Exclude default module so that dependency is properly removed -->
68+
<exclusion>
69+
<groupId>io.prometheus</groupId>
70+
<artifactId>prometheus-metrics-exposition-formats</artifactId>
71+
</exclusion>
72+
</exclusions>
73+
<scope>runtime</scope>
74+
</dependency>
75+
</dependencies>
76+
77+
<build>
78+
<finalName>${project.artifactId}</finalName>
79+
80+
<plugins>
81+
<plugin>
82+
<groupId>org.apache.maven.plugins</groupId>
83+
<artifactId>maven-compiler-plugin</artifactId>
84+
<version>3.14.1</version>
85+
<configuration>
86+
<release>${maven.compiler.release}</release>
87+
<compilerArgs>
88+
<arg>-proc:none</arg>
89+
</compilerArgs>
90+
</configuration>
91+
</plugin>
92+
<plugin>
93+
<groupId>org.springframework.boot</groupId>
94+
<artifactId>spring-boot-maven-plugin</artifactId>
95+
<version>${org.springframework.boot.version}</version>
96+
<configuration>
97+
<mainClass>${mainClass}</mainClass>
98+
</configuration>
99+
<executions>
100+
<execution>
101+
<id>repackage</id>
102+
<goals>
103+
<goal>repackage</goal>
104+
</goals>
105+
<phase>package</phase>
106+
</execution>
107+
</executions>
108+
</plugin>
109+
</plugins>
110+
</build>
111+
</project>

0 commit comments

Comments
 (0)