Skip to content

Commit 5f9726f

Browse files
committed
Merge branch 'main' into ftorres/utf-8
2 parents a593d4e + e8fb095 commit 5f9726f

File tree

416 files changed

+175734
-10437
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

416 files changed

+175734
-10437
lines changed

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,15 @@ root = true
44
max_line_length = 100
55
indent_size = 2
66

7+
[{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,super-linter.env,.gitleaksignore}]
8+
max_line_length = 200
9+
10+
[{grafana-dashboard-*.json,.editorconfig}]
11+
max_line_length = 300
12+
713
[pom.xml]
14+
max_line_length = 110
15+
16+
[*.py]
17+
# checked by black
818
indent_size = 4

.github/dependabot.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/release.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# .github/release.yml
2+
3+
changelog:
4+
categories:
5+
- title: 🏕 Features
6+
labels:
7+
- "*"
8+
exclude:
9+
labels:
10+
- chore
11+
- dependencies
12+
- title: 🧹 Chore
13+
labels:
14+
- chore
15+
- title: 👒 Dependencies
16+
labels:
17+
- dependencies

.github/renovate.json5

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
$schema: "https://docs.renovatebot.com/renovate-schema.json",
3+
extends: ["config:best-practices", "config:recommended"],
4+
platformCommit: "enabled",
5+
automerge: true,
6+
ignorePaths: [
7+
"**/simpleclient-archive/**", // old projects
8+
// agent resources packages an OTel API that is the minimum required API version
9+
"**/prometheus-metrics-exporter-opentelemetry-otel-agent-resources/pom.xml",
10+
],
11+
labels: ["dependencies"],
12+
}

.github/super-linter.env

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
FILTER_REGEX_EXCLUDE=mvnw|src/main/generated/.*|docs/themes/.*|keystore.pkcs12|.*.java|prometheus-metrics-exporter-opentelemetry-shaded/pom.xml|CODE_OF_CONDUCT.md
2+
IGNORE_GITIGNORED_FILES=true
3+
JAVA_FILE_NAME=google_checks.xml
4+
# disable kubernetes linter - complains about resource limits, etc
5+
VALIDATE_CHECKOV=false
6+
VALIDATE_CSS=false
7+
VALIDATE_CSS_PRETTIER=false
8+
VALIDATE_DOCKERFILE_HADOLINT=false
9+
VALIDATE_GIT_COMMITLINT=false
10+
# done by maven
11+
VALIDATE_GOOGLE_JAVA_FORMAT=false
12+
# times out
13+
VALIDATE_GO_MODULES=false
14+
VALIDATE_HTML=false
15+
# done by checkstyle
16+
VALIDATE_JAVA=false
17+
# contradicting with prettier
18+
VALIDATE_JAVASCRIPT_STANDARD=false
19+
# we have many duplicate code in our codebase for demo purposes
20+
VALIDATE_JSCPD=false
21+
VALIDATE_PYTHON_PYLINT=false
22+
23+
FIX_ENV=true
24+
FIX_GO=true
25+
FIX_JAVASCRIPT_PRETTIER=true
26+
FIX_JSON=true
27+
FIX_JSONC=true
28+
FIX_JSONC_PRETTIER=true
29+
FIX_JSON_PRETTIER=true
30+
FIX_MARKDOWN=true
31+
FIX_MARKDOWN_PRETTIER=true
32+
FIX_PYTHON_BLACK=true
33+
FIX_SHELL_SHFMT=true
34+
FIX_YAML_PRETTIER=true
Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,18 @@
1+
---
12
name: OpenTelemetry Acceptance Tests
23

3-
on:
4-
push:
5-
branches: [ "main" ]
6-
pull_request:
7-
branches: [ "main" ]
4+
on: [pull_request]
5+
6+
permissions: {}
87

98
jobs:
109
acceptance-tests:
1110
runs-on: ubuntu-24.04
1211
steps:
13-
- uses: actions/checkout@v4
14-
- name: Check out oats
15-
uses: actions/checkout@v4
16-
with:
17-
repository: grafana/oats
18-
ref: v0.1.0
19-
path: oats
20-
- name: Set up JDK
21-
uses: actions/setup-java@v4
12+
- name: Check out
2213
with:
23-
java-version: 17
24-
distribution: temurin
25-
cache: 'maven'
26-
- name: Set up Go
27-
uses: actions/setup-go@v5
28-
with:
29-
go-version: '1.23'
30-
cache-dependency-path: oats/go.sum
31-
- name: Run the Maven verify phase
32-
run: |
33-
./mvnw clean install -DskipTests
14+
persist-credentials: false
15+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
16+
- uses: jdx/mise-action@5cb1df66ed5e1fb3c670ea0b62fd17a76979826a # v2.3.1
3417
- name: Run acceptance tests
35-
run: ./scripts/run-acceptance-tests.sh
36-
- name: upload log file
37-
uses: actions/upload-artifact@v4
38-
if: failure()
39-
with:
40-
name: OATS logs
41-
path: oats/yaml/build/**/*.log
18+
run: mise run acceptance-test

.github/workflows/build.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,24 @@
1+
---
12
name: Build
23

3-
on:
4-
push:
5-
branches: [ "main" ]
6-
pull_request:
7-
branches: [ "main" ]
4+
on: [pull_request]
5+
6+
permissions: {}
87

98
jobs:
109
build:
1110
runs-on: ubuntu-24.04
1211
steps:
13-
- uses: actions/checkout@v4
14-
- name: Setup ASDF
15-
uses: equisoft-actions/with-asdf-vm@v2
12+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
13+
with:
14+
persist-credentials: false
15+
- uses: jdx/mise-action@5cb1df66ed5e1fb3c670ea0b62fd17a76979826a # v2.3.1
1616
- name: Cache local Maven repository
17-
uses: actions/cache@v4
17+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
1818
with:
1919
path: ~/.m2/repository
2020
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
2121
restore-keys: |
2222
${{ runner.os }}-maven-
2323
- name: Run the Maven verify phase
24-
env:
25-
PROTO_GENERATION: true
26-
REQUIRE_PROTO_UP_TO_DATE: true
27-
run: |
28-
mvn -v
29-
./mvnw clean install
30-
./mvnw javadoc:javadoc -P javadoc # just to check if javadoc is generated
24+
run: mise run ci

.github/workflows/github-pages.yaml

Lines changed: 23 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,12 @@ on:
1111
# Allows you to run this workflow manually from the Actions tab
1212
workflow_dispatch:
1313

14-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
15-
permissions:
16-
contents: read
17-
pages: write
18-
id-token: write
14+
permissions: {}
1915

20-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
16+
# Allow only one concurrent deployment, skipping runs queued between
17+
# the run in-progress and latest queued.
18+
# However, do NOT cancel in-progress runs as we want to allow
19+
# these production deployments to complete.
2220
concurrency:
2321
group: "pages"
2422
cancel-in-progress: false
@@ -31,56 +29,37 @@ defaults:
3129
jobs:
3230
# Build job
3331
build:
32+
if: github.repository == 'prometheus/client_java'
3433
runs-on: ubuntu-24.04
35-
env:
36-
HUGO_VERSION: 0.115.4
3734
steps:
38-
- uses: actions/checkout@v4
35+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
3936
with:
40-
fetch-tags: 'true'
37+
persist-credentials: false
38+
fetch-tags: "true"
4139
fetch-depth: 0
42-
- name: Set up JDK
43-
uses: actions/setup-java@v4
40+
- uses: jdx/mise-action@5cb1df66ed5e1fb3c670ea0b62fd17a76979826a # v2.3.1
4441
with:
45-
java-version: 17
46-
distribution: temurin
47-
cache: 'maven'
48-
- name: Set release version
49-
run: ./scripts/set-release-version-github-pages.sh
50-
- name: Install Hugo CLI
51-
run: |
52-
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
53-
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
54-
- name: Make Javadoc
55-
run: ./mvnw -B clean compile javadoc:javadoc javadoc:aggregate -P javadoc
56-
- name: Move the Javadoc to docs/static/api/
57-
run: mv ./target/reports/apidocs ./docs/static/api && echo && echo 'ls ./docs/static/api' && ls ./docs/static/api
42+
cache: "false"
5843
- name: Setup Pages
5944
id: pages
60-
uses: actions/configure-pages@v5
61-
- name: Install Node.js dependencies
62-
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
63-
working-directory: ./docs
64-
- name: Build with Hugo
45+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
46+
- name: Build GitHub Pages
47+
run: mise run build-gh-pages
6548
env:
66-
# For maximum backward compatibility with Hugo modules
67-
HUGO_ENVIRONMENT: production
68-
HUGO_ENV: production
69-
run: |
70-
hugo \
71-
--gc \
72-
--minify \
73-
--baseURL "${{ steps.pages.outputs.base_url }}/"
74-
working-directory: ./docs
75-
- name: ls ./docs/public/api
76-
run: echo 'ls ./docs/public/api' && ls ./docs/public/api
49+
BASE_URL: "${{ steps.pages.outputs.base_url }}/"
7750
- name: Upload artifact
78-
uses: actions/upload-pages-artifact@v3
51+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
7952
with:
8053
path: ./docs/public
54+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
8155

8256
# Deployment job
8357
deploy:
58+
if: github.repository == 'prometheus/client_java'
59+
permissions:
60+
contents: read
61+
pages: write
62+
id-token: write
8463
environment:
8564
name: github-pages
8665
url: ${{ steps.deployment.outputs.page_url }}
@@ -89,4 +68,4 @@ jobs:
8968
steps:
9069
- name: Deploy to GitHub Pages
9170
id: deployment
92-
uses: actions/deploy-pages@v4
71+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4

.github/workflows/lint-rest.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Lint What Super Linter Can't
3+
4+
on: [pull_request]
5+
6+
permissions: {}
7+
8+
jobs:
9+
lint:
10+
runs-on: ubuntu-24.04
11+
steps:
12+
- name: Check out
13+
with:
14+
persist-credentials: false
15+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
- uses: jdx/mise-action@5cb1df66ed5e1fb3c670ea0b62fd17a76979826a # v2.3.1
17+
- name: Lint
18+
run: mise run lint-rest

.github/workflows/native-tests.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1+
---
12
name: GraalVM Native Tests
23

3-
on:
4-
push:
5-
branches: [ "main" ]
6-
pull_request:
7-
branches: [ "main" ]
4+
on: [pull_request]
5+
6+
permissions: {}
87

98
jobs:
109
native-tests:
1110
runs-on: ubuntu-24.04
1211
steps:
13-
- uses: actions/checkout@v4
14-
- name: Set up JDK
15-
uses: actions/setup-java@v4
12+
- name: Check out
1613
with:
17-
java-version: '21'
18-
distribution: graalvm
19-
cache: 'maven'
20-
- name: Run the Maven verify phase
21-
run: ./scripts/run-native-tests.sh
14+
persist-credentials: false
15+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
16+
- uses: jdx/mise-action@5cb1df66ed5e1fb3c670ea0b62fd17a76979826a # v2.3.1
17+
env:
18+
MISE_ENV: native
19+
- name: Run native tests
20+
run: mise run test

0 commit comments

Comments
 (0)