Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
66b3b15
chore: update flint to 0.20.4
zeitlinger Apr 23, 2026
5885a34
fix: remove legacy markdownlint tool pin
zeitlinger Apr 23, 2026
6ff2d33
fix: add flint-managed linter configs
zeitlinger Apr 23, 2026
c610fa6
fix: finish rust-native formatter cutover
zeitlinger Apr 23, 2026
04e9ec6
chore: remove obsolete lint excludes
zeitlinger Apr 23, 2026
8698697
chore: remove stale super-linter reference
zeitlinger Apr 23, 2026
2de2b13
chore: keep flint config under config dir
zeitlinger Apr 23, 2026
128b2e3
docs: fix flint markdown lint failures
zeitlinger Apr 25, 2026
5d5ddf2
chore: validate flint branch via cargo pre-release pin
zeitlinger Apr 25, 2026
305410c
chore: align lint config with editorconfig carve-outs
zeitlinger Apr 25, 2026
cf33f4e
chore: drop empty editorconfig-checker config
zeitlinger Apr 25, 2026
bbeb247
chore: drop redundant markdown suppression
zeitlinger Apr 25, 2026
9e847e3
chore: normalize tools and drop stale markdown suppressions
zeitlinger Apr 25, 2026
34ff197
chore: rerun flint setup with current preflight
zeitlinger Apr 26, 2026
371085d
chore: fix lint drift after flint rerun
zeitlinger Apr 26, 2026
5624906
chore: update flint to v0.21.0
zeitlinger Apr 27, 2026
d96bbb4
Merge remote-tracking branch 'upstream/main' into pr2045-step5-rerun
zeitlinger Apr 27, 2026
cb4657d
Merge remote-tracking branch 'upstream/main' into pr2045-step5-rerun
zeitlinger Apr 27, 2026
7fc2af6
chore: normalize flint setup
zeitlinger Apr 27, 2026
5c5b3bc
chore: remove lint pre-commit task
zeitlinger Apr 27, 2026
9627e32
chore: clarify yamllint ownership
zeitlinger Apr 27, 2026
110c77b
ci: pass current flint GitHub env vars
zeitlinger Apr 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ indent_size = 2
[{version-rules.xml,maven-wrapper.properties,checkstyle.xml,docker-compose.yaml,docker-compose.yml,Dockerfile,example_target_info.json,mise.toml,mvnm,mvnw.cmd,generate-protobuf.sh,.gitleaksignore,prometheus.properties}]
max_line_length = 200

[{grafana-dashboard-*.json,.editorconfig,super-linter.env,lychee.toml,renovate.json5,CODE_OF_CONDUCT.md}]
[{grafana-dashboard-*.json,.editorconfig,lychee.toml,renovate.json5,CODE_OF_CONDUCT.md}]
max_line_length = 300

[pom.xml]
Expand All @@ -20,3 +20,11 @@ max_line_length = 120

[{.mise/tasks/build-release.sh,.github/workflows/*.yml}]
max_line_length = 300

[*.java]
# Java line length is handled by google-java-format
max_line_length = off

[*.md]
# Markdown line length is handled by rumdl
max_line_length = off
4 changes: 0 additions & 4 deletions .github/config/.editorconfig-checker.json

This file was deleted.

5 changes: 5 additions & 0 deletions .github/config/.rumdl.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[MD013]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im not sure i understand why we have so many config files? can you explain a little bit how this is all is suposed to work? If i encounter a problem for example, is it going to be easy to know whether i need to update rumdl, taplo, yamllint, flint, etc?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great feedback - I'll create a PR to flint to explain it better - https://github.com/grafana/flint/#built-in-linter-registry already shows what linter is used per file type.

In essence, each linter has it's own config file and flint is just an glue layer on top.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its getting hard to know whether flint is adding or removing complexity here

enabled = true
line-length = 120
code-blocks = false
tables = false
3 changes: 3 additions & 0 deletions .github/config/.taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[formatting]
column_width = 120
indent_string = " "
8 changes: 8 additions & 0 deletions .github/config/.yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: relaxed

rules:
document-start: disable
# Line length is owned by the repo's root .editorconfig.
line-length: disable
# Keep indentation checks in yamllint so YAML structure issues still fail lint.
indentation: enable
11 changes: 2 additions & 9 deletions .github/config/flint.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
[settings]
# These paths are generated, vendored, or handled by other checks.
exclude = [
"CHANGELOG.md",
"**/src/main/generated/**",
"docs/themes/**",
"mvnw",
"simpleclient-archive/**",
]
exclude = ["CHANGELOG.md", "**/src/main/generated/**", "docs/themes/**", "mvnw", "simpleclient-archive/**"]
setup_migration_version = 2

[checks.renovate-deps]
# This inventory is regenerated from the files flint still inspects, so
# super-linter-era entries drop out when they are excluded or no longer used.
exclude_managers = ["github-actions", "github-runners", "maven"]
24 changes: 0 additions & 24 deletions .github/config/super-linter.env

This file was deleted.

15 changes: 8 additions & 7 deletions .github/renovate-tracked-deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,25 @@
"mise.toml": {
"mise": [
"actionlint",
"cargo:xmloxide",
"aqua:owenlamont/ryl",
"biome",
"editorconfig-checker",
"github:google/google-java-format",
"github:grafana/flint",
"github:jonwiggins/xmloxide",
"github:koalaman/shellcheck",
"go:github.com/gohugoio/hugo",
"go:github.com/grafana/oats",
"java",
"lychee",
"node",
"npm:@biomejs/biome",
"npm:markdownlint-cli2",
"npm:prettier",
"npm:renovate",
"pipx:codespell",
"pipx:ruff",
"protoc",
"shellcheck",
"shfmt"
"ruff",
"rumdl",
"shfmt",
"taplo"
]
},
"mvnw": {
Expand Down
2 changes: 1 addition & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
$schema: "https://docs.renovatebot.com/renovate-schema.json",
extends: ["config:best-practices", "config:recommended", "github>grafana/flint#v0.20.3"],
extends: ["config:best-practices", "config:recommended", "github>grafana/flint#v0.21.0"],
platformCommit: "enabled",
automerge: true,
ignorePaths: [
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
- name: Lint
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_BASE_REF: ${{ github.base_ref }}
GITHUB_HEAD_REF: ${{ github.head_ref }}
PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
run: mise run lint
2 changes: 0 additions & 2 deletions .gitleaksignore

This file was deleted.

2 changes: 0 additions & 2 deletions .markdownlint.yml

This file was deleted.

1 change: 0 additions & 1 deletion .mise/envs/native/mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ java = "oracle-graalvm-25.0.1"
depends = "build"
run = "../../mvnw test -PnativeTest"
dir = "../../../integration-tests/it-spring-boot-smoke-test"

1 change: 0 additions & 1 deletion .prettierignore

This file was deleted.

7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@

<!-- markdownlint-disable MD033 -->

[![Build](https://github.com/prometheus/client_java/actions/workflows/build.yml/badge.svg)](https://github.com/prometheus/client_java/actions/workflows/build.yml) <a href="#"><img src="https://img.shields.io/badge/JDK%20compatibility-8+-blue.svg" alt="java 8+"></a> <a href="#"><img src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" alt="Apache 2.0"></a>
[![Build][build-badge]][build-workflow]
<a href="#"><img src="https://img.shields.io/badge/JDK%20compatibility-8+-blue.svg" alt="java 8+"></a>
<a href="#"><img src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" alt="Apache 2.0"></a>

<!-- markdownlint-enable MD033 -->

[build-badge]: https://github.com/prometheus/client_java/actions/workflows/build.yml/badge.svg
[build-workflow]: https://github.com/prometheus/client_java/actions/workflows/build.yml

## Documentation

[https://prometheus.github.io/client_java](https://prometheus.github.io/client_java)
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ JMH parameter reference:

See Javadoc of the benchmark classes:

- [CounterBenchmark](https://github.com/prometheus/client_java/blob/main/benchmarks/src/main/java/io/prometheus/metrics/benchmarks/CounterBenchmark.java) <!-- editorconfig-checker-disable-line -->
- [HistogramBenchmark](https://github.com/prometheus/client_java/blob/main/benchmarks/src/main/java/io/prometheus/metrics/benchmarks/HistogramBenchmark.java) <!-- editorconfig-checker-disable-line -->
- [TextFormatUtilBenchmark](https://github.com/prometheus/client_java/blob/main/benchmarks/src/main/java/io/prometheus/metrics/benchmarks/TextFormatUtilBenchmark.java) <!-- editorconfig-checker-disable-line -->
- [CounterBenchmark](https://github.com/prometheus/client_java/blob/main/benchmarks/src/main/java/io/prometheus/metrics/benchmarks/CounterBenchmark.java)
- [HistogramBenchmark](https://github.com/prometheus/client_java/blob/main/benchmarks/src/main/java/io/prometheus/metrics/benchmarks/HistogramBenchmark.java)
- [TextFormatUtilBenchmark](https://github.com/prometheus/client_java/blob/main/benchmarks/src/main/java/io/prometheus/metrics/benchmarks/TextFormatUtilBenchmark.java)

## What Prometheus Java client optimizes for

Expand Down
2 changes: 1 addition & 1 deletion docs/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ synchronization. See Javadoc comments in
**More Info**

The Grafana Labs Blog has a post
[Introducing the Prometheus Java Client 1.0.0](https://grafana.com/blog/2023/09/27/introducing-the-prometheus-java-client-1-0-0/) <!-- editorconfig-checker-disable-line -->
[Introducing the Prometheus Java Client 1.0.0](https://grafana.com/blog/2023/09/27/introducing-the-prometheus-java-client-1-0-0/)
with a good overview of the release.

There will also be a presentation at the [PromCon](https://promcon.io) conference on 29 Sep 2023.
Expand Down
30 changes: 1 addition & 29 deletions docs/content/config/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ When the same property is defined in multiple sources, the following precedence

## Metrics Properties

<!-- editorconfig-checker-disable -->

| Name | Javadoc | Note |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| io.prometheus.metrics.exemplars_enabled | [Counter.Builder.withExemplars()](</client_java/api/io/prometheus/metrics/core/metrics/Counter.Builder.html#withExemplars()>) | (1) (2) |
Expand All @@ -90,8 +88,6 @@ When the same property is defined in multiple sources, the following precedence
| io.prometheus.metrics.summary_max_age_seconds | [Summary.Builder.maxAgeSeconds()](</client_java/api/io/prometheus/metrics/core/metrics/Summary.Builder.html#maxAgeSeconds(long)>) | |
| io.prometheus.metrics.summary_number_of_age_buckets | [Summary.Builder.numberOfAgeBuckets()](</client_java/api/io/prometheus/metrics/core/metrics/Summary.Builder.html#numberOfAgeBuckets(int)>) | |

<!-- editorconfig-checker-enable -->

### Notes

<!-- markdownlint-disable MD033 -->
Expand Down Expand Up @@ -126,42 +122,30 @@ This works for all Metrics properties.

## Exemplar Properties

<!-- editorconfig-checker-disable -->

| Name | Javadoc | Note |
| ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
| io.prometheus.exemplars.min_retention_period_seconds | [ExemplarsProperties.getMinRetentionPeriodSeconds()](</client_java/api/io/prometheus/metrics/config/ExemplarsProperties.html#getMinRetentionPeriodSeconds()>) | |
| io.prometheus.exemplars.max_retention_period_seconds | [ExemplarsProperties.getMaxRetentionPeriodSeconds()](</client_java/api/io/prometheus/metrics/config/ExemplarsProperties.html#getMaxRetentionPeriodSeconds()>) | |
| io.prometheus.exemplars.sample_interval_milliseconds | [ExemplarsProperties.getSampleIntervalMilliseconds()](</client_java/api/io/prometheus/metrics/config/ExemplarsProperties.html#getSampleIntervalMilliseconds()>) | |

<!-- editorconfig-checker-enable -->

## Exporter Properties

<!-- editorconfig-checker-disable -->

| Name | Javadoc | Note |
| ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
| io.prometheus.exporter.include_created_timestamps | [ExporterProperties.getIncludeCreatedTimestamps()](</client_java/api/io/prometheus/metrics/config/ExporterProperties.html#getIncludeCreatedTimestamps()>) | (1) |
| io.prometheus.exporter.exemplars_on_all_metric_types | [ExporterProperties.getExemplarsOnAllMetricTypes()](</client_java/api/io/prometheus/metrics/config/ExporterProperties.html#getExemplarsOnAllMetricTypes()>) | (1) |

<!-- editorconfig-checker-enable -->

(1) Boolean value, `true` or `false`. Default see Javadoc.

## Exporter Filter Properties

<!-- editorconfig-checker-disable -->

| Name | Javadoc | Note |
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
| io.prometheus.exporter.filter.metric_name_must_be_equal_to | [ExporterFilterProperties.getAllowedMetricNames()](</client_java/api/io/prometheus/metrics/config/ExporterFilterProperties.html#getAllowedMetricNames()>) | (1) |
| io.prometheus.exporter.filter.metric_name_must_not_be_equal_to | [ExporterFilterProperties.getExcludedMetricNames()](</client_java/api/io/prometheus/metrics/config/ExporterFilterProperties.html#getExcludedMetricNames()>) | (2) |
| io.prometheus.exporter.filter.metric_name_must_start_with | [ExporterFilterProperties.getAllowedMetricNamePrefixes()](</client_java/api/io/prometheus/metrics/config/ExporterFilterProperties.html#getAllowedMetricNamePrefixes()>) | (3) |
| io.prometheus.exporter.filter.metric_name_must_not_start_with | [ExporterFilterProperties.getExcludedMetricNamePrefixes()](</client_java/api/io/prometheus/metrics/config/ExporterFilterProperties.html#getExcludedMetricNamePrefixes()>) | (4) |

<!-- editorconfig-checker-enable -->

<!-- markdownlint-disable MD033 -->

(1) Comma separated list of allowed metric names. Only these metrics will be exposed.<br/>
Expand All @@ -174,18 +158,12 @@ Only metrics starting with these prefixes will be exposed.<br/>

## Exporter HTTPServer Properties

<!-- editorconfig-checker-disable -->

| Name | Javadoc | Note |
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | ---- |
| io.prometheus.exporter.http_server.port | [HTTPServer.Builder.port()](</client_java/api/io/prometheus/metrics/exporter/httpserver/HTTPServer.Builder.html#port(int)>) | |

<!-- editorconfig-checker-enable -->

## Exporter OpenTelemetry Properties

<!-- editorconfig-checker-disable -->

| Name | Javadoc | Note |
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
| io.prometheus.exporter.opentelemetry.protocol | [OpenTelemetryExporter.Builder.protocol()](</client_java/api/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.Builder.html#protocol(java.lang.String)>) | (1) |
Expand All @@ -199,8 +177,6 @@ Only metrics starting with these prefixes will be exposed.<br/>
| io.prometheus.exporter.opentelemetry.service_version | [OpenTelemetryExporter.Builder.serviceVersion()](</client_java/api/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.Builder.html#serviceVersion(java.lang.String)>) | |
| io.prometheus.exporter.opentelemetry.resource_attributes | [OpenTelemetryExporter.Builder.resourceAttributes()](</client_java/api/io/prometheus/metrics/exporter/opentelemetry/OpenTelemetryExporter.Builder.html#resourceAttribute(java.lang.String,java.lang.String)>) | (3) |

<!-- editorconfig-checker-enable -->

<!-- markdownlint-disable MD033 -->

(1) Protocol can be `grpc` or `http/protobuf`.<br>
Expand All @@ -216,17 +192,13 @@ See Javadoc for details.

## Exporter PushGateway Properties

<!-- editorconfig-checker-disable -->

| Name | Javadoc | Note |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- |
| io.prometheus.exporter.pushgateway.address | [PushGateway.Builder.address()](</client_java/api/io/prometheus/metrics/exporter/pushgateway/PushGateway.Builder.html#address(java.lang.String)>) | |
| io.prometheus.exporter.pushgateway.scheme | [PushGateway.Builder.scheme()](</client_java/api/io/prometheus/metrics/exporter/pushgateway/PushGateway.Builder.html#scheme(java.lang.String)>) | |
| io.prometheus.exporter.pushgateway.job | [PushGateway.Builder.job()](</client_java/api/io/prometheus/metrics/exporter/pushgateway/PushGateway.Builder.html#job(java.lang.String)>) | |
| io.prometheus.exporter.pushgateway.escaping_scheme | [PushGateway.Builder.escapingScheme()](</client_java/api/io/prometheus/metrics/exporter/pushgateway/PushGateway.Builder.html#escapingScheme(io.prometheus.metrics.config.EscapingScheme)>) | (1) |

<!-- editorconfig-checker-enable -->

(1) Escaping scheme can be `allow-utf-8`, `underscores`, `dots`, or `values` as described in
[escaping schemes](https://github.com/prometheus/docs/blob/main/docs/instrumenting/escaping_schemes.md#escaping-schemes) <!-- editorconfig-checker-disable-line -->
[escaping schemes](https://github.com/prometheus/docs/blob/main/docs/instrumenting/escaping_schemes.md#escaping-schemes)
and in the [Unicode documentation]({{< relref "../exporters/unicode.md" >}}).
10 changes: 5 additions & 5 deletions docs/content/exporters/httpserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ HTTPServer server = HTTPServer.builder()
```

By default, `HTTPServer` binds to any IP address, you can change this with
[hostname()](</client_java/api/io/prometheus/metrics/exporter/httpserver/HTTPServer.Builder.html#hostname(java.lang.String)>) <!-- editorconfig-checker-disable-line -->
or [inetAddress()](</client_java/api/io/prometheus/metrics/exporter/httpserver/HTTPServer.Builder.html#inetAddress(java.net.InetAddress)>). <!-- editorconfig-checker-disable-line -->
[hostname()](</client_java/api/io/prometheus/metrics/exporter/httpserver/HTTPServer.Builder.html#hostname(java.lang.String)>)
or [inetAddress()](</client_java/api/io/prometheus/metrics/exporter/httpserver/HTTPServer.Builder.html#inetAddress(java.net.InetAddress)>).

`HTTPServer` is configured with three endpoints:

Expand All @@ -24,13 +24,13 @@ or [inetAddress()](</client_java/api/io/prometheus/metrics/exporter/httpserver/H
- `/` the default handler is a static HTML page.

The default handler can be changed
with [defaultHandler()](</client_java/api/io/prometheus/metrics/exporter/httpserver/HTTPServer.Builder.html#defaultHandler(com.sun.net.httpserver.HttpHandler)>). <!-- editorconfig-checker-disable-line -->
with [defaultHandler()](</client_java/api/io/prometheus/metrics/exporter/httpserver/HTTPServer.Builder.html#defaultHandler(com.sun.net.httpserver.HttpHandler)>).

## Authentication and HTTPS

- [authenticator()](</client_java/api/io/prometheus/metrics/exporter/httpserver/HTTPServer.Builder.html#authenticator(com.sun.net.httpserver.Authenticator)>) <!-- editorconfig-checker-disable-line -->
- [authenticator()](</client_java/api/io/prometheus/metrics/exporter/httpserver/HTTPServer.Builder.html#authenticator(com.sun.net.httpserver.Authenticator)>)
is for configuring authentication.
- [httpsConfigurator()](</client_java/api/io/prometheus/metrics/exporter/httpserver/HTTPServer.Builder.html#httpsConfigurator(com.sun.net.httpserver.HttpsConfigurator)>) <!-- editorconfig-checker-disable-line -->
- [httpsConfigurator()](</client_java/api/io/prometheus/metrics/exporter/httpserver/HTTPServer.Builder.html#httpsConfigurator(com.sun.net.httpserver.HttpsConfigurator)>)
is for configuring HTTPS.

You can find an example of authentication and SSL in the
Expand Down
Loading